Persistent naming or binding is an option that enforces file names for loaders and tape drives, thus making them persist across reboots of the operating system. Without this feature the SCSI addresses may be changed during reboots, especially in environments with several tape libraries attached to a server, and the operating system might mix the SCSI addresses between different loaders and library tape drives. Consequently, SEP sesam may have problems accessing devices, such as unloading incorrect drives, read/open errors, volume errors, lost connections ...
Persistent naming means using symbolic names for loaders, tape drives in autoloaders and tape libraries, as well as for single tape drives. These names stay unique during server reboots, regardless of the order in which the operating system discovers the tape hardware. For example, while Tape0 is a logical name that could change during system restart, the persistent name Tape2147483644 is unique and will not change.
Configuration of persistent naming depends on the used driver. Once OS is configured for persistence naming, update SEP sesam configuration with the help of slu topology.
|Persistent naming is not part of SEP sesam as each hardware vendor handles it differently. If you need any assistance, consult your respective OS and hardware vendor support. The following information are only for reference and are not meant to replace the official vendor documentation.|
Configuring persistent naming on Windows
To enable persistent bindings of symbolic tape and library names, you have to modify the registry key. Make sure that you have a valid SEP sesam and operating system backup before proceeding!
- Standard Windows drivers
- For standard Windows drivers, proceed as follows:
- Open Registry Editor: use Start and type regedit.
- Locate and select the following registry subkey:
- From the Edit menu, select New and then DWORD Value.
- Type Persistence and then press ENTER.
- Right-click the Persistence registry entry, then click Modify.
- Type 1 in the Value data box, and then click OK.
- Close Registry Editor and restart the computer.
When you set the Persistence registry entry to 1, symbolic names become persistent. For example, if your tape drive has the name \\.\\tape1, this name is reserved for use by that device even after your server reboots.
- IBM drivers
- For IBM drivers, proceed as follows:
- Go to
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ibmtp2k''<x>''where value <x> in ibmtp2k specifies the Windows Server version, for example, ibmtp2k8 for Windows Server 2008, ibmtp2k12 for Windows 2012, and ibmtp2k16 for Windows 2016, respectively.
- Add DWORD:PersistentNaming=1.
- Close Registry Editor and ensure that AutoRun is set to 0 for the driver prior to rebooting; for details, see official Microsoft documentation, e.g., Windows Server 2003 cannot perform backup jobs to tape devices on a storage area network or refer to the article Disable Autorun/Autoplay.
- Restart the computer.
For more details, see IBM article Configuring drives with persistent naming with IBM devices on Windows.
- HP LTO drivers
- For HP LTO drivers, follow the procedure as provided by data-protector.org:
- Make sure that you have installed the required HP tape drivers.
- Copy the following code and insert it into text editor, then save the content as .reg file.
- Tape drives:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hplto] "AutoRun"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Tape] "Persistence"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NtmsSvc] "Start"=dword:00000004
If you have more than one medium changer include the following two lines as well:
Configuring persistent naming on Linux
Device persistence on Linux is based on preconfigured udev rules. These rules create aliases in the device filesystem in /dev/tape.
Once the persistent naming is configured, you have to identify the WWN of the device and its name. This is because after each reboot on Linux, if you have, for example, two tape drives: /dev/nst0 (typically, the automatically assigned name for the first tape drive on Linux) and /dev/nst1 (the second tape drive), they may be switched around. The device name of a loader may also be changed after reboot. For example, a loader is currently recognized as /dev/sg9, but after reboot its name is changed to /dev/sg6. Changing the device name(s) after each reboot makes it impossible for SEP sesam to recognize the devices without adjustment, causing automated backup processing to fail.
To correctly identify the persistent names of devices on Linux, use the slu scan command and then the /dev/tape/by-id, as shown in the example below.
For example, the slu scan output is as follows:
ID=9:0:9:0 Tape: STK T10000B 0105 (/dev/nst4) ID=9:0:10:0 Tape: STK T10000B 0105 (/dev/nst5) ID=9:0:11:0 Tape: STK T10000B 0105 (/dev/nst6) ID=9:0:12:0 Tape: STK T10000B 0105 (/dev/nst7) ID=9:0:0:0 Loader: STK L700 0105 (/dev/sg17) ID=9:0:8:0 Loader: STK L80 0105 (/dev/sg18)
The output of ls -l /dev/tape/by-id/ shows the following:
total 0 lrwxrwxrwx 1 root root 9 Dec 14 11:17 scsi-350223344ab000900 -> ../../st4 lrwxrwxrwx 1 root root 10 Dec 14 11:17 scsi-350223344ab000900-nst -> ../../nst4 lrwxrwxrwx 1 root root 9 Dec 14 11:17 scsi-350223344ab001000 -> ../../st5 lrwxrwxrwx 1 root root 10 Dec 14 11:17 scsi-350223344ab001000-nst -> ../../nst5 lrwxrwxrwx 1 root root 9 Dec 14 11:17 scsi-350223344ab001100 -> ../../st6 lrwxrwxrwx 1 root root 10 Dec 14 11:17 scsi-350223344ab001100-nst -> ../../nst6 lrwxrwxrwx 1 root root 9 Dec 14 11:17 scsi-350223344ab001200 -> ../../st7 lrwxrwxrwx 1 root root 10 Dec 14 11:17 scsi-350223344ab001200-nst -> ../../nst7 lrwxrwxrwx 1 root root 10 Dec 14 11:17 scsi-SSTK_L700_XYZZY_A -> ../../sg17 lrwxrwxrwx 1 root root 10 Dec 14 11:17 scsi-SSTK_L80_XYZZY_B -> ../../sg18
In our example, by using /dev/tape/by-id/scsi-350223344ab000900-nst instead of /dev/nst4 for the particular drive, the device name will automatically use the correct nst device even after reboot. The same is true for loader names, for example, /dev/tape/by-id/scsi-SSTK_L80_XYZZY_B should be used instead of /dev/sg18.
|Make sure that you use the non-rewind device name nst, in the above example scsi-350223344ab000900-nst, and not the auto rewind version st. If you specify auto rewind version st, a rewind command will be issued to the tape drive and the tape will be positioned at the beginning at the tape. When accessing a non-rewind tape device nst, a rewind command is not issued.|
For more details, refer to your hardware manufacturer documentation; for example, IBM article Configuring drives with persistent naming for IBM devices on Linux.
What is next?
Enabling persistent naming is only one step in a sequence for (re-)configuring storage hardware. For full procedure, including using slu topology for identifying the name of the tape hardware and re-configuring loaders and drives, refer to Configuring Loaders and Drives.