[opensuse] Persistent Binding - udev rules
Hi, I have a system (openSUSE 12.1 (x86_64)) which has three tape drives on it; HP Ultrium 2-SCSI 460, HP Ultrium 4-SCSI 1840 and IBM ULT3580-HH5. I have the following settings in a file /etc/udev/rules.d/10-local.rules # HP Ultrium 2-SCSI 460 KERNEL=="st0", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b00001e5919", NAME="st0", MODE="666" KERNEL=="nst0", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b00001e5919-nst", NAME="nst0", MODE="666" # IBM ULT3580-HH5 KERNEL=="st1", BUS="scsi", SYMLINK="tape/by-id/scsi-350050763120d0ce3", NAME="st1", MODE="666" KERNEL=="nst1", BUS="scsi", SYMLINK="tape/by-id/scsi-350050763120d0ce3-nst", NAME="nst1", MODE="666" # HP Ultrium 4-SCSI 1840 KERNEL=="st2", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b0000ba6366", NAME="st2", MODE="666" KERNEL=="nst2", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b0000ba6366-nst", NAME="nst2", MODE="666" so that there are persistent bindings for the three tape drives: Ultrium 2-SCSI /dev/st0 & /dev/nst0 ULT3580-HH5 /dev/st1 & /dev/nst1 Ultrium 4-SCSI /dev/st2 & /dev/nst2 Following a system reboot, and using 'lsscsi' I get the following [5:0:0:0] tape IBM ULT3580-HH5 C7RD /dev/st1 [6:0:3:0] tape HP Ultrium 4-SCSI B32D /dev/st0 [7:0:6:0] tape HP Ultrium 2-SCSI F3AD /dev/st2 Following a subsequent reboot I get [5:0:0:0] tape IBM ULT3580-HH5 C7RD /dev/st0 [6:0:6:0] tape HP Ultrium 2-SCSI F3AD /dev/st2 [7:0:3:0] tape HP Ultrium 4-SCSI B32D /dev/st1 Neither of which is following the defined rules. More system reboots can result in the correct device bindings, sometimes not. Can anyone look through what I have; correct it (me) where I have it wrong; point me in the correct direction; or let me know that I can't do as I want. Thanks Peter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Wed, 31 Dec 2014 11:52:35 -0500 PmB <peter.bloomfield@camhpet.ca> пишет:
Hi,
I have a system (openSUSE 12.1 (x86_64)) which has three tape drives on it; HP Ultrium 2-SCSI 460, HP Ultrium 4-SCSI 1840 and IBM ULT3580-HH5.
I have the following settings in a file /etc/udev/rules.d/10-local.rules
Tape devices get /dev/tape/by-* persistent links already. Why do you need this file in the first place?
# HP Ultrium 2-SCSI 460 KERNEL=="st0", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b00001e5919", NAME="st0", MODE="666" KERNEL=="nst0", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b00001e5919-nst", NAME="nst0", MODE="666" # IBM ULT3580-HH5 KERNEL=="st1", BUS="scsi", SYMLINK="tape/by-id/scsi-350050763120d0ce3", NAME="st1", MODE="666" KERNEL=="nst1", BUS="scsi", SYMLINK="tape/by-id/scsi-350050763120d0ce3-nst", NAME="nst1", MODE="666" # HP Ultrium 4-SCSI 1840 KERNEL=="st2", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b0000ba6366", NAME="st2", MODE="666" KERNEL=="nst2", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b0000ba6366-nst", NAME="nst2", MODE="666"
so that there are persistent bindings for the three tape drives: Ultrium 2-SCSI /dev/st0 & /dev/nst0 ULT3580-HH5 /dev/st1 & /dev/nst1 Ultrium 4-SCSI /dev/st2 & /dev/nst2
Following a system reboot, and using 'lsscsi' I get the following [5:0:0:0] tape IBM ULT3580-HH5 C7RD /dev/st1 [6:0:3:0] tape HP Ultrium 4-SCSI B32D /dev/st0 [7:0:6:0] tape HP Ultrium 2-SCSI F3AD /dev/st2 Following a subsequent reboot I get [5:0:0:0] tape IBM ULT3580-HH5 C7RD /dev/st0 [6:0:6:0] tape HP Ultrium 2-SCSI F3AD /dev/st2 [7:0:3:0] tape HP Ultrium 4-SCSI B32D /dev/st1
Neither of which is following the defined rules.
Your rules do not define which device gets which stX name. So there nothing wrong here.
More system reboots can result in the correct device bindings, sometimes not.
Can anyone look through what I have; correct it (me) where I have it wrong; point me in the correct direction; or let me know that I can't do as I want.
Kernel device names are assigned in discovery order and are not predictable or persistent. That is why /dev/tape/by-{id,uuid,...} links are automatically created; these links are created based on intrinsic device properties (like connectivity path or device UUID) and are persistent. Use these names instead. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/31/2014 12:57 PM, Andrei Borzenkov wrote:
В Wed, 31 Dec 2014 11:52:35 -0500 PmB <peter.bloomfield@camhpet.ca> пишет:
Hi,
I have a system (openSUSE 12.1 (x86_64)) which has three tape drives on it; HP Ultrium 2-SCSI 460, HP Ultrium 4-SCSI 1840 and IBM ULT3580-HH5.
I have the following settings in a file /etc/udev/rules.d/10-local.rules Tape devices get /dev/tape/by-* persistent links already. Why do you need this file in the first place?
# HP Ultrium 2-SCSI 460 KERNEL=="st0", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b00001e5919", NAME="st0", MODE="666" KERNEL=="nst0", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b00001e5919-nst", NAME="nst0", MODE="666" # IBM ULT3580-HH5 KERNEL=="st1", BUS="scsi", SYMLINK="tape/by-id/scsi-350050763120d0ce3", NAME="st1", MODE="666" KERNEL=="nst1", BUS="scsi", SYMLINK="tape/by-id/scsi-350050763120d0ce3-nst", NAME="nst1", MODE="666" # HP Ultrium 4-SCSI 1840 KERNEL=="st2", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b0000ba6366", NAME="st2", MODE="666" KERNEL=="nst2", BUS="scsi", SYMLINK="tape/by-id/scsi-350060b0000ba6366-nst", NAME="nst2", MODE="666"
so that there are persistent bindings for the three tape drives: Ultrium 2-SCSI /dev/st0 & /dev/nst0 ULT3580-HH5 /dev/st1 & /dev/nst1 Ultrium 4-SCSI /dev/st2 & /dev/nst2
Following a system reboot, and using 'lsscsi' I get the following [5:0:0:0] tape IBM ULT3580-HH5 C7RD /dev/st1 [6:0:3:0] tape HP Ultrium 4-SCSI B32D /dev/st0 [7:0:6:0] tape HP Ultrium 2-SCSI F3AD /dev/st2 Following a subsequent reboot I get [5:0:0:0] tape IBM ULT3580-HH5 C7RD /dev/st0 [6:0:6:0] tape HP Ultrium 2-SCSI F3AD /dev/st2 [7:0:3:0] tape HP Ultrium 4-SCSI B32D /dev/st1
Neither of which is following the defined rules.
Your rules do not define which device gets which stX name. So there nothing wrong here.
More system reboots can result in the correct device bindings, sometimes not.
Can anyone look through what I have; correct it (me) where I have it wrong; point me in the correct direction; or let me know that I can't do as I want.
Kernel device names are assigned in discovery order and are not predictable or persistent. That is why /dev/tape/by-{id,uuid,...} links are automatically created; these links are created based on intrinsic device properties (like connectivity path or device UUID) and are persistent. Use these names instead. Many thanks. I don't need to define rules. Sorry for my ignorance, but can you let me know how to address the tape drive via 'connectivity or device UUID'?
Thanks Peter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Wed, 31 Dec 2014 13:01:49 -0500 PmB <peter.bloomfield@camhpet.ca> пишет:
Many thanks. I don't need to define rules. Sorry for my ignorance, but can you let me know how to address the tape drive via 'connectivity or device UUID'?
Do you have /dev/tape directory? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/31/2014 01:46 PM, Andrei Borzenkov wrote:
В Wed, 31 Dec 2014 13:01:49 -0500 PmB <peter.bloomfield@camhpet.ca> пишет:
Many thanks. I don't need to define rules. Sorry for my ignorance, but can you let me know how to address the tape drive via 'connectivity or device UUID'?
Do you have /dev/tape directory? Yes, and I now see how I can do it. Thanks
Peter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
PmB