udev doesn't update the links to scsi disks properly.
Hi All,
udev doesn't update the links to scsi disks properly after removing and
reinserting a disk, which means that disks can't be accessed automatically by using the same name.
However after removing one disk physically and reinserting it we have the links below, note that kernel name changes but it shouldn't be a problem with udev, but it's not working and doesn't create the link for /dev/sdc.
lrwxrwxrwx 1 root root 33 Jan 9 12:40 /dev/sdb ->
scsi/host0/bus0/target2/lun0/disc
lrwxrwxrwx 1 root root 34 Jan 9 12:40 /dev/sdb1 ->
scsi/host0/bus0/target2/lun0/part1
lrwxrwxrwx 1 root root 34 Jan 9 12:40 /dev/sdb2 ->
scsi/host0/bus0/target2/lun0/part2
brw-rw---- 1 root disk 8, 32 Jan 9 12:47 /dev/sdc
lrwxrwxrwx 1 root root 34 Jan 9 12:47 /dev/sdc1 ->
scsi/host0/bus0/target1/lun0/part1
lrwxrwxrwx 1 root root 34 Jan 9 12:47 /dev/sdc2 ->
scsi/host0/bus0/target1/lun0/part2
After some investigation I found that udev rule for sdc
doesn't match any of the rules in devfs.rules and related script never run.However partitions on the disks match and works fine.
rules for:-
/dev/sd[a-z] and /dev/sd[a-z][0-9]*
BUS="scsi", KERNEL="sd[a-z]",
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", NAME="%c{1}",
SYMLINK+="%k %c{2}"
BUS="scsi", KERNEL="sd[a-z][0-9]*",
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", NAME="%c{1}",
SYMLINK+="%k %c{2}"
First rule doesn't match when the disk is inserted. Interestingly, when the udev is restarted it works.Kernel reports the device name correctly but there is a problem with the BUS name. It works with partitions but not with the main disk. Assuming that we'll only have sd[a-z] names from scsi bus I removed the BUS="scsi" rule from the first rule and it's working flawlessly. i am not sure is removing BUS option right method or not? could any one please help me in solveing this issue.
Thanks
Last edited by kshitij_dixit; 01-10-2009 at 06:53 AM.
|