learnitguide

Understand the Multipath Command Output & its terminology

Understand the Multipath Command Output and multipathing terminologies
This article explains to Understand the Multipath Command Output & its terminology. In the previous article, we have explained how to Configure Multipathing in Linux (RHEL7/CentOS7). Lets understand multipath command output to check further for troubleshooting any issue related with multipathing and also understand its terminologies.

Understand the Standard output of multipath command.
mphath1 (3600a0b800011a1ee0000040646828cc5) dm-1 Hitachi,lun0      FAStT
------  ---------------------------------  ---- --- ---------------
   |               |                         |    |          |-------> Product
   |               |                         |    |------------------> Vendor
   |               |                         |-----------------------> sysfs name
   |               |-------------------------------------------------> WWID of the device
   |-----------------------------------------------------------------> User defined Alias

[size=512M][features=1 queue_if_no_path][hwhandler=1 rdac]
 ---------  ---------------------------  ----------------
     |                 |                        |--------------------> Hardware Handler
     |                 |---------------------------------------------> Features supported
     |---------------------------------------------------------------> Size of the DM


Path Group 1:
\_ round-robin 0 [prio=6][active]
-- -------------  ------  ------
 |    |              |      |----------------------------------------> Path group state
 |    |              |-----------------------------------------------> Path group priority
 |    |--------------------------------------------------------------> Path selector
 |-------------------------------------------------------------------> Path group level

First path on Path Group 1:
 \_ 29:0:0:1 sdf 8:80  [active][ready]
    -------- --- ----   ------  -----
      |      |     |        |      |---------------------------------> Physical Path state
      |      |     |        |----------------------------------------> DM Path state
      |      |     |-------------------------------------------------> Major, minor numbers
      |      |-------------------------------------------------------> Linux device name
      |--------------------------------------------------------------> host,chan,scsiid,lun

Second path on Path Group 1:
 \_ 28:0:1:1 sdl 8:176 [active][ready]

Path Group 2:
\_ round-robin 0 [prio=0][enabled]
 \_ 28:0:0:1 sdb 8:16  [active][ghost]
 \_ 29:0:1:1 sdq 65:0  [active][ghost]


Understand the Multipathing Terminology

Path
Connection from the server through a HBA to a specific LUN. Without DM-MP, each path would appear as a separate device.
Path Group
Paths are grouped into a path groups. At any point of time only path group will be active. Path selector decides which path in the path group gets to send the next I/O. I/O will be sent only to the active path.
Path Priority
Each path has a specific priority. A priority callout program provides the priority for a given path. The user space commands use this priority value to choose an active path. In the group_by_prio path grouping policy, path priority is used to group the paths together and change their relative weight with the round robin path selector.
Path Group Priority
Sum of priorities of all non-faulty paths in a path group. By default, the multipathd daemon tries to keep the path group with the highest priority active.
Path Grouping Policy
Determines how the path group(s) are formed using the available paths. There are five different policies:

  1. multibus: One path group is formed with all paths to a LUN. Suitable for devices that are in Active/Active mode.
  2. failover: Each path group will have only one path.
  3. group_by_serial: One path group per storage controller(serial). All paths that connect to the LUN through a controller are assigned to a path group. Suitable for devices that are in Active/Passive mode.
  4. group_by_prio: Paths with same priority will be assigned to a path group.
  5. group_by_node_name: Paths with same target node name will be assigned to a path group.

Setting multibus as path grouping policy for a storage device in Active/Passive mode will reduce the I/O performance.
Path Selector
A kernel multipath component that determines which path will be chosen for the next I/O. Path selector can have an appropriate load balancing algorithm. Currently one one path selector exists, which is the round-robin.
Path Checker
Functionality in the user space that is used to check the availability of a path. This is implemented as a library function that is used by both multipath command and the multipathd daemon. Currently, there are 3 path checkers:

  1. readsector0: sends a read command to sector 0 at regular time interval. Produce lot of error messages in Active/Passive mode. Hence, suitable only for Active/Active mode.
  2. tur: sends a test unit ready command at regular interval.
  3. rdac: specific to the lsi-rdac device. Sends a inquiry command and sets the status of the path appropriately.

Path States
This refers to the physical state of a path. A path can be in one of the following states:
ready: Path is up and can handle I/O requests.
faulty: Path is down and cannot handle I/O requests.
ghost: Path is a passive path. This state is shown in the passive path in Active/Passive mode.
shaky: Path is up, but temporarily not available for I/O requests.
DM Path States
This refers to the DM module(kernel)'s view of the path's state. It can be in one of the two states:
active: Last I/O sent to this path successfully completed. Analogous to ready path state.
failed: Last I/O to this path failed. Analogous to faulty path state.
Path Group State
Path Groups can be in one of the following three states:
active: I/O will be sent to the multipath device will be sent to this path group. Only one path group will be in this state.
enabled: If none of the paths in the active path group is in the ready state, I/O will be sent these path groups. There can be one or more path groups in this state.
disabled: In none of the paths in the active path group and enabled path group is in the ready state. I/O will be sent to these path groups. There can be one or more path groups in this state. This state is available only for certain storage devices.
UID Callout (or) WWID Callout
A standalone program that returns a globally unique identifier for a path. multipath/multipathd invokes this callout and uses the ID returned to coalesce multiple paths to a single multipath device.
Priority Callout
A standalone program that returns the priority for a path. multipath/multipathd invokes this callout and uses the priority value of the paths to determine the active path group.
Hardware Handler
Kernel personality module for storage devices that needs special handling. This module is responsible for enabling a path (at the device level) during initialization, failover and failback. It is also responsible for handling device specific sense error codes.
Failover
When all the paths in a path group are in faulty state, one of the enabled path group (path with highest priority) with any paths in ready state will be made active. If there is no paths in ready state in any of the enabled path groups, then one of the disabled path group (path with highest priority) will be made active. Making a new path group active is also referred as switching of path group. Original active path group's state will be changed to enabled.
Failback
A failed path can become active at any point of time. multipathd keeps checking the path. Once it finds a path is active, it will change the state of the path to ready. If this action makes one of the enabled path group's priority to be higher than the current active path group, multipathd may choose to failback to the highest priority path group.
Failback Policy
Under failback situations multipathd can do one of the following three things:
immediate: Immediately failback to the highest priority path group.
# of seconds: Wait for the specified number of seconds, for I/O to stabilize, then failback to the highest priority path group.
do nothing: Do nothing, user explicitly fails back to the highest priority path group.
This policy selection can be set by the user through /etc/multipath.conf.
Active/Active
Storage devices with 2 controller can be configured in this mode. Active/Active means that both the controllers can process I/Os.
Active/Passive
Storage devices with 2 controller can be configured in this mode. Active/Passive means that one of the controllers(active) can process I/Os, and the other one(passive) is in a standby mode. I/Os to the passive controller will fail.
Alias
A user friendly and/or user defined name for a DM device. By default, WWID is used for the DM device. This is the name that is listed in /dev/disk/by-name directory. When the user_friendly_names configuration option is set, the alias of a DM device will have the form of mpath<n>. User also has the option of setting a unique alias for each multipath device.

Thanks for reading our post. share with your friends. We appreciate your feedback, Leave your comments if any.
We have more articles to be updated soon. To not miss any updates, Follow us on social networking sites and Subscribe us on our Youtube channel. Keywords : Enabling Multipathing in Linux, device mapper multipath, device mapper multipath linux, multipath in linux with device mapper, linux device mapper multipath howto, device mapper configuration file, how to enable multipathing in linux, working with linux multipathing, managing linux multipathing, how to manage multipath in linux, how to troubleshoot multipathing in linux, how to check multipathing in linux

Related Something You missed?

Server 5334308984521297401

item