Setting the preferred path – HP StoreEver MSL6480 Tape Library User Manual

Page 45

Advertising
background image

Example 1 Example paths

# cat /sys/class/pfo/*/paths
sg=/dev/sg0 st=/dev/st0 wwnn=50014382c6c2f001 type=tape
0:0:3:0 up - - wwpn=50014382c6c2f003
0:0:0:0 up - - wwpn=50014382c6c2f002
1:0:0:0 up - - wwpn=50014382c6c2f002
1:0:2:0 up - - wwpn=50014382c6c2f003
sg=/dev/sg1 st=none wwnn=50014382c6c2f800 type=changer session_key=cae82d14
0:0:3:1 up - - active_drive
0:0:0:1 up last prefer active_drive
0:0:1:1 up - - -
0:0:2:1 up - - -
1:0:0:1 up - - active_drive
1:0:1:1 up - - -
1:0:2:1 up - - active_drive
1:0:3:1 up - - -
sg=/dev/sg2 st=/dev/st1 wwnn=50014382c6c2f007 type=tape
0:0:1:0 up - - wwpn=50014382c6c2f008
0:0:2:0 up open - wwpn=50014382c6c2f009
1:0:1:0 up - - wwpn=50014382c6c2f008
1:0:3:0 up - - wwpn=50014382c6c2f009

In this example, the tape drive at the top of the list can be accessed via either /dev/sg0 or /dev/st0.
The other tape drive is available via either /dev/sg2 or /dev/st1. An application has a device
file open to the drive at the bottom of the list; and the most recent command was sent to the drive
via the path 0:0:2:0.

The library is accessed via /dev/sg1. The path most recently used to access the library was
0:0:0:1

. At some time in the past an administrator specified path 0:0:0:1 to be the “preferred”

path to the library.

There are four paths to each drive. Since both drives are connected to the library there appear to
be eight paths available to the library. The drive at /dev/st0 is the “active_drive,” which means
that the driver will use that drive to access the library. The active drive can be inferred by looking
at the path numbers. The last digit (e.g. the 1 in 0:0:0:1) is the lun number of the device accessed
by that path. A drive has a LUN of 0. A library has a LUN of 1. The port names are not reported
by the library because the library uses ports on the drives so the port names are not available in
the report.

All of the paths show their status as being “up”. This means that the driver believes that all of those
paths are currently available for use. The state of “down” is temporary. It is only visible while the
path is being destroyed. Once the path becomes completely unusable, the driver removes it from
the list. Any path that remains in a “down” state for more than a second should be disconnected
and reconnected to reestablish a reliable connection. The path cannot be disconnected via the
Linux operating system; disconnect the path by physically disconnecting the FC cable, disabling
the port in the FC switch, or power cycling the drive.

Setting the preferred path

Normally the driver will attempt to use the last known good path. You can override the path by
selecting a "preferred" path. The preferred path is the path that the driver will attempt to use at
the next open() of the device file.

The path will not switch to the preferred path if there is any other thread holding the /dev file
open. If multiple threads have the /dev file open, the driver will not interfere with the path selection
that has been made by another thread.

The path will not change to the preferred path if it is indicating a library control path using a
passive drive. In this case, the driver will select a control path hosted by an active drive instead.

You can configure the preferred path by writing to a /sys file. For example, to configure a
preferred path on /dev/sg5:

Command line user interface

45

Advertising