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'
SUBSYSTEMS=="scsi", ATTRS{model}=="SAMSUNG HD320KJ ", SYMLINK+='samsung320'
From my understanding this should create one extra symlinks for each hard disc. But it doesn't. I know there's a trailing space but this is what "udevinfo -a -p /block/sdb" reports. Trimming this space doesn't help either.
I've also tried other rules that I've came across such as these.
Code:
SUBSYSTEM=="block", ATTR{size}=="488397168", SYMLINK+='samsung250'
SUBSYSTEMS=="scsi", KERNELS=="host5", SYMLINK+="Drawer"
The first one doesn't work at all, too. The second one kinda works but it creates a link to a (seemingly) random partition on that disc. As a result it doesn't work with smartctl.
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?