Changes the operational status of paths to a multipath I/O (MPIO) capable device.
chpath -l Name -s OpStatus [ -D ] [ -p Parent ] [ -w Connection ] [ -v Level ]
chpath -h
The chpath command changes the operational status of paths to the specified device (the -l Name flag). The set of paths to change is obtained by taking the set of paths from the Customized Paths (CuPath) object class for the specified device whose Path_Status descriptor is set to Path_Available and qualifying these paths based on matching the objects' Parent and Connection descriptors against any -p Parent and -w Connection flags specified. If neither the -p nor the -w flag is specified, the set of paths changed consists of all the device's paths in the CuPath object class that are configured.
The operational status of a path refers to the usage of the path as part of MPIO path selection. The value of enable indicates that the path is to be used while disable indicates that the path is not to be used. disable impacts future I/O, not I/O already in progress. As such, a path can be disabled, but still have outstanding I/O until such time that all of the I/O that was already in progress completes. If -s disable is specified for a path and I/O is outstanding on the path, this is indicated in the command's output. When the chpath command finishes, it displays the results for each path impacted by this command.
Note: This command changes the operational status of the paths in the system; the path_status descriptor in the corresponding CuPath objects is not changed. It is possible for this command to change the operational status for some paths and not for others.
chpath -l hdisk1 -p scsi0 -s disable
The system displays a message similar to one of the following (where the second variant indicates that there is outstanding I/O for the path):
disk1 path from parent scsi0 connection 5,0 disabled
or
disk1 path from parent scsi0 connection 5,0 disabling
chpath -l hdisk1 -s enable
The system displays a message similar to the following:
hdisk1 path from parent scsi0 connection 5,0 enabled
hdisk1 path from parent scsi1 connection 5,0 enabled
/usr/sbin/chpath | Contains the chpath command. |