I'm having a fun problem here, we have a 10.04 server running bacula with 2 SAS tape drives. Last friday I had to unplug the tape drives a couple of times. Today, the devices are "reversed" (nst0 is now nst1).
Is there a way to force the device name, so that nst0 is always assigned to the same drive? (as in, if nst0 is not plugged in, nst0 will not be assigned to another device.)
Here's the content of /dev/tape/by-id :
lrwxrwxrwx 1 root root 9 2010-11-26 13:38 scsi-3500e09e0001b81e6 -> ../../st1 lrwxrwxrwx 1 root root 10 2010-11-26 13:38 scsi-3500e09e0001b81e6-nst -> ../../nst1 lrwxrwxrwx 1 root root 9 2010-11-26 13:38 scsi-3500e09e0001b9804 -> ../../st0 lrwxrwxrwx 1 root root 10 2010-11-26 13:38 scsi-3500e09e0001b9804-nst -> ../../nst0
Thanks!
KERNEL=="nst[0-9]", SUBSYSTEM=="scsi_tape", ENV{ID_SERIAL}=="3500e09e0001b81e6", NAME="nst0", SYMLINK+="tape0" KERNEL=="st[0-9]", SUBSYSTEM=="scsi_tape", ENV{ID_SERIAL}=="3500e09e0001b81e6", NAME="st0"
KERNEL=="nst[0-9]", SUBSYSTEM=="scsi_tape", ENV{ID_SERIAL}=="3500e09e0001b9804", NAME="nst1", SYMLINK+="tape1" KERNEL=="st[0-9]", SUBSYSTEM=="scsi_tape", ENV{ID_SERIAL}=="3500e09e0001b9804", NAME="st1"
But this doesn't "reserve" nst0, it just assigns it if a device with the matching serial number is plugged in.
– Nov 29 '10 at 16:50