Primary and alternative paths

When the lin_tape device driver is loaded into kernel memory with path failover support enabled, the first logic device that lin_tape sees always becomes the primary path. The other logical devices that lin_tape sees are configured as the alternative paths. The device driver supports up to 16 physical paths for a single device.

The primary and alternative path information can be obtained by the following command.
>cat /proc/scsi/IBMtape
The following is an example of a /proc/scsi/IBMtape:
lin_tape version: 3.0.3
lin_tape major number: 253
Table 1. Attached tape devices
Number Model SN HBA FO Path
0 03592 IBM1234567 qla2xxx Primary
1 03592 IBM1234567 qla2xxx Alternate

The labeling of a logical device as either a primary or alternative path is for information only and is used for following purpose:

  • Identify the actual number of physical devices that are configured on the system and a specific logical device that is associated with them. Only one logical device is labeled the primary path for each physical device. However, many (multiple) logical devices can be labeled as an alternative path for the same device.
  • Provide information about which logical devices configured on the system have path failover support enabled.

The numbers listed in Table 1 are the ones used for IBMchanger special files at /dev directory (see Special files for the tape device). An attempt to open a device file name not listed at /dev directory will fail. Per file systems handling and due to path removal, usually a device file name is deleted after a device closes or before a device opens. Using Persistent naming support will maintain device file names listed under ls -l /dev/lin_tape/by-id/.

When lin_tape_as_sfmp is set, st and sg paths can be queried through pfo paths as follows:
cat /sys/class/pfo/*/paths
Example output:
pfo9  sg=/dev/sg9  st=/dev/st0  sf=yes fo=no  wwnn=500507630f04be07 type=tape
2:0:1:0  up   last -      wwpn=500507630f44be07
3:0:1:0   -     -    -      -
Only one st and one sg device file name per device can use all the paths for that device.