udev keeps changing sd* devices
My system has two SATA controllers. Two harddiscs are connected to the onboard (VIA) controller and a DVD-writer is connected to a PCIe-controller with a SIL chipset.
Depending on the "mood of the system" the DVD-writer is either /dev/sda or /dev/sdc. But the HDDs and writer can be used without trouble. I'm already using UUIDs in /etc/fstab. BUT ... I run munin to constantly check on the SMART values and this is the part where it's becoming trouble some. Because /dev/sda is not constantly linked to a HDD smartctl fails and cannot track. Using udev I try to create two extra symlinks to the HDD devices but this is where I fail. With the help of several guides I came up with the following rules, but they don't work. And I simply cannot find out why. I created an extra rules-file named /etc/udev/rules.d/60-misel.rules. The 60 is taken from the README which suggests to use 60 for "60 rules that add symlinks to device nodes (adds to those set in earlier rules)". Code:
SUBSYSTEMS=="scsi", ATTRS{model}=="SAMSUNG SP2504C ", SYMLINK+='samsung250' I've also tried other rules that I've came across such as these. Code:
SUBSYSTEM=="block", ATTR{size}=="488397168", SYMLINK+='samsung250' I'm using Xubuntu 8.10 and it's quite frustrating not to have udevtest around which is mentioned on some sites. So I have to reboot each time I want to test a change. I also don't get very much out of the udev logs. I fear it's something really obvious but I just can't find it. Can you please help me? |
|
I cannot count the number of udev guides that I already read. And the first link you provided suggests exactly that rule, that I already tried and didn't work.
From the guide: Code:
SUBSYSTEM=="block", ATTR{size}=="234441648", SYMLINK+="my_disk" Code:
SUBSYSTEM=="block", ATTR{size}=="488397168", SYMLINK+='samsung250' I entered a faulty rule in the file and got a message that there is an error. So my own-rules-file is not ignored. Here's the output of udevinfo for this drive Quote:
|
I know they are diff sizes but are these disks used in a raid?
if not in raid...are they both used in essential fstab mounting system partitions...not data etc? I am thinking...lets try removing the non-essential from bios...and make a funny udev rule that proves the rule works....and then try again with both drives |
Quote:
Quote:
Quote:
|
There might be 2 more tools in the udev toolbox, dunno if you have seen them. One is udevtest to see which rules are being applied, the other one is udevtrigger, which let you re-iterate thru the device creation process without actually unplugging the hardware.
Also, you can set the log level to debug an discover why udev renames devices by looking into the logs. (Set the log level to debug, restart udev, trigger the devices) There have been some changes in the udev programs, udevtest disappeared in favor of 'udevadm test', etc. Use the man page for udevadm and try to find from there the test and trigger programs I mentioned. jlinkels |
All times are GMT -5. The time now is 02:32 PM. |