• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to monitor the status of dm-multipathing and multipath devices (path groups) in Linux

By admin

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
Note: Once a failed path recovers, the current active path will remain active. This is the case even if the failed path was the previously active path. Path group tailback does not occur without manual intervention. This behavior is controlled in /etc/multipath.conf by the tailback option, which defaults to manual.
Search or use up and down arrow keys to select an item. Understanding Linux multipath using dm-multipath

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Fedora, Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL LVM : Backing Up Volume Group Metadata
  2. Audit rules to log reboot command executions in CentOS/RHEL
  3. How to configure iSCSI Initiator (client) in CentOS / RHEL 7
  4. How to make alias command work in bash script or bashrc file
  5. RPM : package installation Error : cpio: read failed
  6. rm: cannot remove ‘doc/by-app’: Function not implemented (CentOS/RHEL 7)
  7. CentOS / RHEL : How to configure an DHCP server
  8. CentOS / RHEL 7 : GRUB2 configuration file /boot/grub2/grub.cfg explained
  9. OpenLDAP Server and Client Utilities list
  10. CentOS / RHEL : How to assemble a software RAID in Rescue mode

You May Also Like

Primary Sidebar

Recent Posts

  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • How to rename a KVM VM with virsh
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary