Documente Academic
Documente Profesional
Documente Cultură
Release Notes
says:
Starting with NetBackup 8.1.2, the NetBackup Device Manager (ltid) uses persistent device paths
for tape drives. Instead of /dev/nstXXX device paths, NetBackup uses /dev/tape/by-path/YYY-nst
device paths. The paths persist across SAN interruptions. Upon NetBackup Device Manager (ltid)
startup, /dev/nstXXX paths are converted to the equivalent /dev/tape/by-path/YYY-nst path.
Recently I had pretty big installation with different hardware and I had some feedback that might
be useful for others.
Unfortunately, persistent binding works correctly out of the box for FC drives only.
It isn't because of NetBackup but it's because of default Linux udev rule and SAS connected Tape
Libraries specialty. By default the rule's part we're interested in (60-persistent-storage-tape.rules)
looks like:
# by-path (parent device path)
KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{builtin}="path_id"
KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}"
KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-
nst"
The main thing you should know it that symlink will be created using ID_PATH value. It's easy to
get this value manually:
# udevadm info -n /dev/nst0 | grep ID_PATH
E: ID_PATH=pci-0000:12:00.0-fc-0x50012345678cc567-lun-0
E: ID_PATH_TAG=pci-0000_12_00_0-fc-0x50012345678cc567-lun-0
It works fine for FC connected drives because their paths are unique:
# ls -la /dev/tape/by-path/
total 0
drwxr-xr-x 2 root root 280 Dec 19 12:33 .
drwxr-xr-x 4 root root 80 Dec 19 12:28 ..
lrwxrwxrwx 1 root root 9 Dec 19 12:28 pci-0000:12:00.0-fc-0x50012345678cc567-lun-0 ->
../../st0
lrwxrwxrwx 1 root root 10 Dec 19 12:28 pci-0000:12:00.0-fc-0x50012345678cc567-lun-0-nst
-> ../../nst 0
lrwxrwxrwx 1 root root 9 Dec 19 12:28 pci-0000:12:00.0-fc-0x50012345678cc56a-lun-0 ->
../../st2
lrwxrwxrwx 1 root root 10 Dec 19 12:28 pci-0000:12:00.0-fc-0x50012345678cc56a-lun-0-nst
-> ../../nst 2
lrwxrwxrwx 1 root root 9 Dec 19 12:33 pci-0000:12:00.1-fc-0x50012345678cc566-lun-0 ->
../../st4
lrwxrwxrwx 1 root root 10 Dec 19 12:33 pci-0000:12:00.1-fc-0x50012345678cc566-lun-0-nst
-> ../../nst 4
lrwxrwxrwx 1 root root 9 Dec 19 12:28 pci-0000:d8:00.0-fc-0x50012345678cc567-lun-0 ->
../../st1
lrwxrwxrwx 1 root root 10 Dec 19 12:28 pci-0000:d8:00.0-fc-0x50012345678cc567-lun-0-nst
-> ../../nst 1
lrwxrwxrwx 1 root root 9 Dec 19 12:28 pci-0000:d8:00.0-fc-0x50012345678cc56a-lun-0 ->
../../st3
lrwxrwxrwx 1 root root 10 Dec 19 12:28 pci-0000:d8:00.0-fc-0x50012345678cc56a-lun-0-nst
-> ../../nst 3
lrwxrwxrwx 1 root root 9 Dec 19 12:33 pci-0000:d8:00.1-fc-0x50012345678cc566-lun-0 ->
../../st5
lrwxrwxrwx 1 root root 10 Dec 19 12:33 pci-0000:d8:00.1-fc-0x50012345678cc566-lun-0-nst
-> ../../nst
And tpautoconf shows correct information (drives are available via multiple paths):
# /usr/openv/volmgr/bin/tpautoconf -t
TPAC60 HPE Ultrium 8-SCSI J4DB CZ00000VGV -1 -1 -1 -1 /dev/tape/by-path/pci-
0000:d8:00.1-fc-0x50 012345678cc566-lun-0-nst - -
TPAC60 HPE Ultrium 8-SCSI J4DB CZ00000VGV -1 -1 -1 -1 /dev/tape/by-path/pci-
0000:12:00.1-fc-0x50 012345678cc566-lun-0-nst - -
TPAC60 HPE Ultrium 8-SCSI J4DB CZ00000VGW -1 -1 -1 -1 /dev/tape/by-path/pci-
0000:d8:00.0-fc-0x50 012345678cc56a-lun-0-nst - -
TPAC60 HPE Ultrium 8-SCSI J4DB CZ00000VGW -1 -1 -1 -1 /dev/tape/by-path/pci-
0000:12:00.0-fc-0x50 012345678cc56a-lun-0-nst - -
TPAC60 HPE Ultrium 8-SCSI J4DB CZ00000VGV -1 -1 -1 -1 /dev/tape/by-path/pci-
0000:d8:00.0-fc-0x50 02345678cc567-lun-0-nst - -
TPAC60 HPE Ultrium 8-SCSI J4DB CZ00000VGV -1 -1 -1 -1 /dev/tape/by-path/pci-
0000:12:00.0-fc-0x50 012345678cc567-lun-0-nst - -
But when we're working with SAS connected drives we might have some problems. For example
after adding Tape Library via SAS we have symlinks:
# ls -la /dev/tape/by-path/
total 0
drwxr-xr-x 2 root root 80 Dec 6 13:41 .
drwxr-xr-x 4 root root 80 Dec 6 13:41 ..
lrwxrwxrwx 1 root root 9 Dec 6 13:41 pci-0000:12:00.0-sas-0x0000000000000000-lun-0
-> ../../st1
lrwxrwxrwx 1 root root 10 Dec 6 13:41 pci-0000:12:00.0-sas-0x0000000000000000-lun-0-nst
-> ../../nst1
But when we check configuration we'll see one drive that has no symlinks:
# /usr/openv/volmgr/bin/tpautoconf -t
TPAC60 HPE Ultrium 8-SCSI J4DB CZ00000PH9 -1 -1 -1 -1 /dev/tape/by-path/pci-
0000:12:00.0-sas-0x0000000000000000-lun-0-nst - -
TPAC60 HPE Ultrium 8-SCSI J4DB CZ00000CVY -1 -1 -1 -1 - - -
We need to modify the default udev rule (or create a new custome one because during the upgrade
default udev rules might be overwritten) to have different values for different drives. The easiest
way you can do it is to use:
# by-path (parent device path)
KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{builtin}="path_id"
KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/
$env{ID_SCSI_SERIAL}"
KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/
$env{ID_SCSI_SERIAL}-nst"
but it isn't a universal solutions and it depends on the Tape Library you're using.
In my case I had different TapeLibraries and some of then presented all drives via multiple paths
and I had to use minor numbers because it was the only unique value (I didn't have enough time
for deep investigation because the TLs were on the remote site). It isn't the best thing to use
because after reboot minor name can be different but in some cases you have no choice: