How to configure device files for SCSI media changers on Linux platforms
Ensure that device files for SCSI media changers, which provide access to Library Managers for TSLM servers that run on Linux® platforms, are properly configured. The configuration is critical for the correct operation of TSLM. This way, Library Managers can refer to the correct device files needed to handle the respective target libraries. The device files for the SCSI media changers are configured with the Linux Tape and Medium Changer Device Driver (lin_tape driver) and Linux udev service. The following important information and examples are provided to help avoid configuration errors for the device files on Linux platforms.
When you use multiple control paths to a target library
In most cases, a tape library has multiple tape drives, which can provide multiple control paths to the library through them. For higher availability, configure the tape library so that it has at least two control paths.
You must configure the lin_tape driver so that it can use the control path failover (CPF) function for the multiple control paths. With the CPF function, one of the control paths for the same SCSI media changer is used as the primary control path. Any other control paths are each used as an alternate path. This way, an application can continue to use the same SCSI media changer by referring to a device file on one of the control paths, even if the control path becomes unavailable.
/etc/modprobe.conf directory, or the /etc/modprobe.conf.local directory.
Or, if you are running RHEL 6 or higher, in a user-customized configuration file, for example
lin_tape.conf under the /etc/modprobe.d
directory.options lin_tape alternate_pathing=1- lin_taped stop
- modprobe -r lin_tape
- depmod
- modprobe lin_tape
- lin_taped
Also, verify that the primary and alternative control path can be referenced in the
/proc/scsi/IBMchanger file.
When you create a Library Manager configuration file by using the ermmLmConfig command, you must specify the device file on the primary control path for the SCSI media changer of the target library. You must not create another configuration file for the same SCSI media changer by specifying a different device file because it can cause an inconsistent configuration in the TSLM database.
How to use persistent names for the device files
When a Library Manager is configured, the device file for the target SCSI media changer is tied
with the serial number for the device. However, the device file name for the SCSI media changer (for
example, /dev/IBMchanger0, /dev/IBMchanger1) might change when a system restart, a
reload of the lin_tape driver, or changes in connected devices occur, because detecting connected devices is not done with the same sequence. Therefore, you must use persistent names for the device files to avoid this type of problem. Linux udev provides a
dynamic device management function. You can make symbolic links with persistent names to the device
files for the SCSI media changer by using a rule-based configuration file for the
udev.
Before you make the rules file, use the udevadm info command (for RHEL 6 or SLES 11 systems) to look into the serial numbers for the devices that the udev handles.
udevadm info --attribute-walk --name /dev/IBMchanger0 | grep serial_numATTR{serial_num}=="0000078A03810403"/dev/IBMchanger0 and /dev/IBMchanger2) in the
following example refers to the same SCSI media changer, but with different control
paths.
Device file SCSI media changer serial number
/dev/IBMchanger0 0000078A03810403
/dev/IBMchanger1 0000078A03810405For the preceding configuration, create a rules file named 98-lin_tape.rules
under the /etc/udev/rules.d directory to describe the rules to make persistent
names to corresponding serial numbers.
Describe one rule per line to create a symbolic link (SYMLINK=="...") for a
device file (KERNEL=="...") that has a specific attribute (for example,
SYSFS{serial_num}=="..."). Optionally, you can set the file attributes for owner
(OWNER="..."), group (GROUP="..."), and access mode
(MODE="...") to the device file. It is useful to ensure that the TSLM user
ermm
can access the devices.
- Symbolic link with persistent name SCSI media changer serial
number
" /dev/lin_tape/by-id/IBMchanger0 0000078A03810403 /dev/lin_tape/by-id/IBMchanger1 0000078A03810405" - The rule file includes the following rules. The rules must be described in two lines for
respective symbolic links. Apply the rules by reloading the lin_tape
driver.
KERNEL=="IBMchanger*", SYSFS{serial_num}=="0000078A03810403", SYMLINK="lin_tape/by-id/IBMchanger0" OWNER="root" GROUP="root" MODE="666"KERNEL=="IBMchanger*", SYSFS{serial_num}=="0000078A03810405", SYMLINK="lin_tape/by-id/IBMchanger1" OWNER="root" GROUP="root" MODE="666"
ls -l /dev/lin_tape/by-id/lrwxrwxrwx 1 root root 17 Oct 24 22:18 IBMchanger0 -> ../../IBMchanger0
lrwxrwxrwx 1 root root 17 Oct 24 22:18 IBMchanger1 -> ../../IBMchanger1udevadm control --reload-rules
udevadm triggerdev/lin_tape/by-id/IBMchanger0)./dev/IBMtape0, /dev/IBMtape1), on the TSLM client host. You can see the
t/IBM/ermm/conf/hdmdrive.cfg file, which is generated at the HDM restart time. The
tape drive configuration is sent to the Media Manager on the TSLM server. An impact is that any obsolete Drive
Manager definitions remain if the tape device file name is changed on the TSLM client side.