The mpath_prio_alua command returns the following values:
on success. In this case the priority for the device is printed to
stdout. The priority value is:
for devices that are in the active, optimized group
for devices that are in an active but non-optimized group
for devices that are in the standby group
for all other groups
The reason for the widely spaced priority values is the way multipath handles
them. It will multiply the number of paths in a group with the priority value
and select the group with the highest result. Thus, if there are six paths in
the active, non-optimized group and only one in the active, optimized one,
the non-optimized group would be used.
Indicates an error parsing the command line.
The given devices could not be opened for reading.
The device does not support target port groups.
The inquiry command did not return a target port group for the given device.
The report target port group command failed or did not return a target
port group that was obtained from the inquiry command.
This example queries a device directly and returns the priority string:
#> mpath_prio_alua /dev/sda
Now the major and minor number is used to specify the device and verbose
output is selected:
#> mpath_prio_alua -v 8:0
Target port groups are implicitly supported.
Reported target port group is 0 [active/optimized]
The following example shows the entries in the devices section of the
multipath-tool configuration file (/etc/multipath.conf) to support an IBM DS6000 storage system:
"/sbin/mpath_prio_alua -d/tmp %d"
Depending on your default configuration not all keywords are required
(e.g. if your path_checker is set to tur you dont have to
use the path_checker statement in the device section).
The entries for vendor and product must be strings that are 8
characters long (for vendor) and 16 characters long (for product). The strings have to be padded with blanks if necessary.
If you are working with hotpluggable devices whose device nodes are created
by udev you should use the %d flag in the
prio_callout statement. This is because a short time elapses between the devices being available
and udev creating the device nodes.
If under certain circumstances your storage subsystem temporarily reports
failures on all paths, you should use the features statement showed in the example.
This will configure the multipath volume to requeue I/O until a path becomes
available again, instead of reporting failures in that case.