Monitoring
The multipath command can be used to monitor the status of multipaths. When used with one -l option, it will show a quick overview of multipath topologies. If the -l option is specified twice (-ll), it will also perform a check on all paths to see if it is active. If everything is fine, a path will be reported as active ready.
The output of multipath -ll provides information on each discovered multipath device. This is comprised of three sections. The sections provide information on the multipath device, information its path group(s), and the path(s) which comprise each path group. The following is an example of the information provided for a multipath device.
mpatha (360014053bd9ea2a35914e39a556051cf) dm-0 LIO-ORG ,clusterstor size=4.0G features:'0' hwhandler='0' wp=rw |- + - policy='service-time 8:0 active |- + - 2:0:0:0 active ready running `- + - policy='service-time 0' prio=1 status=enabled `- + - 3:0:0:0 sdb 8:16 active ready running
The first section of the output provides information on the multipath device. Alias, wwid, device name, vendor, and product information are provided in the first line. The second line displays the size, enabled features, hardware handlers, and write permission settings for the multipath device.
mpatha (360014053bd9ea2a35914e39a556051cf) dm-0 LIO-ORG ,clusterstor size=4.0G features='0' hwhandler='0' wp=rw
For each multipath device, the multipath -ll command also provides information on each of its path groups. The scheduling policy, priority, and status of each path group is displayed for each path group. This is followed by a listing of the path(s) that makes up the path group.
For each path, the device node name, along with the device major and minor information, is provided. Path status is also reported and is useful for assessing the health of each path.
|- + - policy='service-time 0' prio=1 status=active |`- + - 2:0:0:0 sda 8:0 active ready running
A path which is up and ready for 1/0 operations will be reported with a status of ready.
| `- 2:0:0:0 sda 8:0 active ready running
On the other hand, a path which is down will be reported with a status of faulty.
|`- 3:0:0:0 sdb 8:16 failed faulty offline
Identifying path grouping policy
While the path grouping policy configured for a multipath device is not explicitly stated in the output of multipath -ll, it is indicated by the path grouping displayed in the output. For example, a multipath device configured with a path grouping policy of failover will have only one path in each group. As shown in the following example, multiple path groups are displayed, with each path group containing a single path.
multipath { wwid 360014053bd9ea2a35914e39a556051cf path_grouping_policy failover }
# multipath -ll mpatha (360014053bd9ea2a35914e39a556051cf) dm-0 LIO-ORG ,clusterstor size=4.0G features='0' hwhandler='0' wp=rw |- + - policy%'service-time 0 1 prio=1 status=active | ` - 2:0:0:0 sda 8:0 active ready running `- + - policy='service-time 0' prio=1 status=enabled ` - 3:0:0:0 sdb 8:16 active ready running
On the other hand, when configured with a path grouping policy of multibus, a multipath device will group all paths into one priority group. As shown in the following example, with this configuration, only a single path group is displayed and all paths in the multipath device are members of this single group.
multipath { wwid 360014053bd9ea2a35914e39a556051cf path_grouping_policy multibus }
# multipath -ll mpatha (360014053bd9ea2a35914e39a556051cf) dm-0 LIO-ORG ,clusterstor size=4.0G features='0' hwhandler='0' wp=rw `- + - policy='service-time 0' prio=1 status=active | - 2:0:0:0 sda 8:0 active ready running ` - 3:0:0:e sdb 8:16 active ready running
Observing path failover
The multipath -ll command can also be useful in assessing the failover activities of multipath devices configured with the failover path grouping policy. The failover policy implements an active-passive multipath configuration. Therefore, at any given time, only one path group will be in active status while the remaining path groups are waiting in enabled status, as shown in the following example.
# multipath -ll mpatha (360014053bd9ea2a35914e39a556051cf) dm-0 LIO-ORG ,clusterstor size=4.0G features='0' hwhandler='0' wp=rw |- + - policy='service-time 0' prio=1 status=active | ` - 2:0:0:0 sda 8:0 active ready running `- + - policy='service-time 0' prio=1 status=enabled ` - 3:0:0:0 sdb 8:16 active ready running
The following example illustrates the change in the output of the multipath -11 command when the path failure occurs on a passive path group. While the status for the path in the passive path group has changed, the status of the active path group and its corresponding path remains unchanged and unimpaired.
# multipath -ll mpatha (360014053bd9ea2a35914e39a556051cf) dm-0 LIO-ORG ,clusterstor size=4.0G features='0' hwhandler='0' wp=rw |- + - policy='service-time 0 1 prio=l status=active | ` - 2:0:0:0 sda 8:0 active ready running `- + - policy='service-time 0 1 prio=0 status=enabled ` - 3:0:0:0 sdb 8:16 failed faulty offline
The following example illustrates the change in the output of the multipath -ll command when the path failure occurs on a path in the active path group. The status for the previously active path has changed to failed faulty offline. Consequently, the status of the corresponding path group has also changed, from active to enabled. Due to the failover configuration, the previous passive path has transitioned to a status of active ready running. The corresponding path group’s status has also changed from enabled to active.
# multipath -11 mpatha (360014053bd9ea2a35914e39a556051cf} dm-0 LIO-ORG ,clusterstor size=4.0G features•01 hwhandler='0' wp=rw | - + - policy='service-time 0' prio=0 status=enabled | ` - 2:0:0:0 sda 8:0 failed faulty offline ` - + - policy='service-time 0 1 prio=l status=active ` - 3:(:):0:0 sdb 8:16 active ready running