lspath Command
Purpose
Displays information about paths to an MultiPath I/O (MPIO) capable device.
Syntax
lspath [ -F Format | –t ] [ -H ] [ -l Name ] [ -p Parent ] [ -s Status ] [ -w Connection ] [ -i PathID ]
lspath -A -l Name -p Parent [ -w Connection ] [ -i PathID ] {-D [ -O ] | -E [ -O ] | -F Format [ -Z character ] } [ -a Attribute ] ...[ -f File ] [ -H ]
lspath -A -l Name -p Parent [ -w Connection ] [ -i PathID ]-R -a Attribute [ -f File ] [ -H ]
lspath -h
Description
The lspath command displays one of two types of information about paths to an MPIO capable device. It either displays the operational status for one or more paths to a single device, or it displays one or more attributes for a single path to a single MPIO capable device. The first syntax shown above displays the operational status for one or more paths to a particular MPIO capable device. In this instance, the lspath command is similar to the lsdev command. The second syntax (keyed by the presence of the -A flag) displays one or more attributes for a single path to a particular MPIO capable device. In this instance, the lspath command is similar to the lsattr command. In fact, all of the flags for the lsattr command are supported on the lspath command when displaying path attributes.
Displaying Path Status with the lspath Command
- The target device name matches the device specified with the -l flag. If the -l flag is not present, then the target device is not used in the criteria.
- The parent device name matches the device specified with the -p flag. If the -p flag is not present, then parent is not used in the criteria.
- The connection matches the connection specified with the -w flag. If the -w flag is not present, then connection is not used in the criteria.
- The path status matches status specified with the -s flag. If the -s flag is not present, the path status is not used in the criteria.
If none of the -l, -p, -w, -s flags are specified, then all paths known to the system are displayed.
status device parent
The
default display format can be overridden by using the -F Format flag.
The -F Format flag displays the output in a user-specified
format where the Format parameter is a quoted list of field
names separated by, and possibly ended by, non-alphanumeric characters
or white space. The field names are the fields defined in the CuPath class
or one of the column heading defined above. - enabled
- Indicates that the path is configured and operational. It will
be considered when paths are selected for IO. Note: The AIX® MPIO does not fail the last path. Even though all paths to the storage are lost, the last path displays the status as enabled. In such a case, an IO error indicates the actual loss of the last path to the disk.
- disabled
- Indicates that the path is configured, but not currently operational. It has been manually disabled and will not be considered when paths are selected for IO.
- failed
- Indicates that the path is configured, but it has had IO failures that have rendered it unusable. It will not be considered when paths are selected for IO.
- defined
- Indicates that the path has not been configured into the device driver.
- missing
- Indicates that the path was defined in a previous boot, but it was not detected in the most recent boot of the system.
- detected
- Indicates that the path was detected in the most recent boot of the system, but for some reason it was not configured. A path should only have this status during boot and so this status should never appear as a result of the lspath command.
Displaying Path Attributes with the lspath Command
- if only one path exists to a device, the -l flag is required
- if only one path between a device and a specific parent, the -l and -p flags are required
- if there are multiple paths between a device and a specific parent, the -l, -p, and -w flags are required
The same rules used by the lsattr command for displaying device attributes applies to the lspath command for displaying path attributes.
attribute value description user_settable
Flags
Item | Description |
---|---|
-a Attribute | Identifies the specific attribute to list. The 'Attribute' is the name of a path specific attribute. When this flag is provided, only the identified attribute is displayed. Multiple instances of this flag may be used to list multiple attributes. If this flag is not specified at all, all attributes associated with the identified path will be listed. |
-A | Indicates that attributes for a specific path are to be displayed. When the -A flag is present, the -s Status flag is not allowed. However, the -l Name, -p Parent, and -w Connection flags must be present to fully qualify the path. |
-D | Displays the attribute names, default values, descriptions, and user-settable flag values for a specific path when not used with the -O flag. The -D flag displays only the attribute name and default value in colon format when used with the -O flag. This flag is only valid when displaying path attributes and it cannot be used with the -E, -F, or -R flag. |
-E | Displays the attribute names, current values, descriptions, and user-settable flag values for a specific path when not used with the -O flag. The -E flag displays only the attribute name and current value in colon format when used with the -O flag. This flag is only valid when displaying path attributes and it cannot be used with the -D, -F, or -R flag. |
-f File | Reads the needed flags from the File parameter. |
-F Format | Displays the output in a user-specified format, where the Format parameter is a quoted list of column names separated by non-alphanumeric characters or white space. Using white space as the separator, the lspath command displays the output in aligned columns. Valid column names depends upon the type of information requested. For path display, column names from the CuPath object class can be specified. For path attribute display (the -A flag is specified), column names from the PdPathAt and CuPathAt object classes can be specified. In addition to the column names, there are two special purpose names that can be used. The name description can be used to obtain a display of attribute descriptions and user-settable can be used to obtain an indication as to whether or not an attribute can be changed. This flag cannot be used with the -E, -D, -O or -R flag. |
-h | Displays the command usage message. |
-H | Displays headers above the column output. To use the -H flag with the -O flag is meaningless, the -O flag prevails. To use the -H flag with the -R flag is meaningless; the -R flag prevails. |
-i PathID | Indicates the path ID associated with the path to be displayed. |
-l Name | Specifies the logical device name of the target device whose path information is to be displayed. This flag is optional for displaying path status, but is required for displaying path attributes. |
-O | Displays all attribute names separated by colons and, on the second line, displays all the corresponding attribute values separated by colons. The attribute values are current values when the -E flag is also specified and default values when the -D flag is specified. This flag is only valid when displaying path attributes and it cannot be used with the -F and -R flags. |
-p Parent | Indicates the logical device name of the parent device, whose paths are to be displayed. This flag is optional for displaying path status, but it is required for displaying path attributes. |
-R | Displays the legal values for an attribute name.
The -R flag cannot be used with the -D, -E, -F and -O flags.
The -R flag displays the list attribute values in a vertical
column as follows: The -R flag displays the range attribute
values as x...n(+i) where x is the start of the range, n is the end
of the range, and i is the increment. |
-s Status | The -s Status flag indicates the
status to use in qualifying the paths to be displayed. When displaying
path information, the allowable values for this flag are:
|
-t | Displays the path ID in addition to the current default output. The -t flag cannot be used with the -F or the -A flags. |
-w Connection | Indicates the connection information to use in qualifying the paths to be displayed. This flag is optional for displaying path status, but is required for displaying path attributes. |
-Z Character | The -Z Character flag is meant to be used for programs that need to deal with ODM fields that may have embedded new line characters. The -Z Character flag is used to change the record separator character for each record (line) of output generated. The new record separator is the 'Character' argument to this flag. The -Z Character flag is only relevant when the -A and the -F Format flags are specified. The -Z Character flag cannot be used with the -D, -E, -O, or the -R flags. |
Security
Privilege Control: All users can execute this command.
Auditing Events: None.
Examples
Examples of displaying path status:
- To display the status of all paths to hdisk1 with column headers,
enter the following command:
The system will display a message similar to the following:lspath -H -l hdisk1
status device parent enabled hdisk1 scsi0 disabled hdisk1 scsi1 missing hdisk1 scsi2
- To display, without column headers, the set of paths whose operational
status is disabled, enter the following command:
The system will display a message similar to the following:lspath -s disabled
disabled hdisk1 scsi1 disabled hdisk2 scsi1 disabled hdisk23 scsi8 disabled hdisk25 scsi8
- To display the set of paths whose operational status is
failed
, enter the following command:
The system will display a message similar to the following:lspath -s failed
failed hdisk1 scsi1 failed hdisk2 scsi1 failed hdisk23 scsi8 failed hdisk25 scsi8
- To display in a user-specified format, without column headers,
the set of paths to hdisk1 whose path status is available enter the
following command:
The system will display a message similar to the following:lspath -l hdisk1 -s available -F"connection:parent:path_status:status"
Note that this output shows both the path status and the operational status of the device. The path status simply indicates whether the path is configured or not. The operational status indicates how the path is being used with respect to path selection processing in the device driver. Only paths with a path status of5,0:scsi0:available:enabled 6,0:scsi1:available:disabled
available
also have an operational status. If a path is not currently configured into the device driver, it does not have an operational status.
- If the target device is a SCSI disk, to display all attributes
for the path to parent scsi0 at connection 5,0, enter the following
command:
The system will display a message similar to the following:lspath -AHE -l hdisk10 -p scsi0 -w "5,0"
attribute value description user_settable weight 1 Order of path failover selection true