Primary and alternative paths

When lin_tape is loaded into kernel memory, the first logical medium changer device that lin_tape sees in the system is the primary path for that medium changer. The other logical medium changers that lin_tape attached for the same medium changer are configured as 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/IBMchanger

An example of a /proc/scsi/IBMchanger file:

  • lin_tape version: 3.0.3
  • lin_tape major number: 253
Table 1. Attached changer devices
Number Model SN HBA FO Path
0 03584L22 IBM1234567 qla2xxx Primary
1 03584L22 IBM1234567 qla2xxx Alternate
2 03584L22 IBM1234567 qla2xxx Alternate

The labeling of a logical device as either a primary or alternative path is for information only, to

  • 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 as the primary path for each physical device. However, multiple logical devices can be labeled as an alternative path for the same devices.
  • 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 Medium Changer 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, sg paths can be queried through pfo paths as follows:
cat /sys/class/pfo/*/paths
Example output:
pfo10 sg=/dev/sg10 st=none sf=yes fo=no  wwnn=0000013400140405 type=changer
2:0:1:1  up   last -      -
3:0:1:1  -      -     -      -
There is only one sg device file name per device that uses all the paths for this device.