第 2 章 Multipath devices
DM Multipath creates a single multipath device over multiple I/O paths to the same storage, organizing them logically. Without it, each path is seen as a separate device, even if they connect the same server to the same storage controller.
2.1. Multipath device identifiers 复制链接链接已复制到粘贴板!
Multipath devices use specific naming conventions that determine how they appear in the file system. They can be identified by their World Wide Identifier (WWID) or user-friendly names like mpathN, depending on your configuration preferences.
When new devices are under the control of DM Multipath, these devices are created in the /dev/mapper/ and /dev/ directory.
Any devices of the form /dev/dm-X are for internal use only and should never be used by the administrator directly.
The following describes multipath device names:
-
When the
user_friendly_namesconfiguration option is set tono, the name of the multipath device is set to World Wide Identifier (WWID). By default, the name of a multipath device is set to its WWID. The device name would be/dev/mapper/WWID. It is also created in the/dev/directory, named as/dev/dm-X. -
Alternately, you can set the
user_friendly_namesoption toyesin the/etc/multipath.conffile. This sets thealiasin themultipathsection to a node-unique name of the formmpathN. The device name would be/dev/mapper/mpathNand/dev/dm-X. But the device name is not guaranteed to be the same on all nodes using the multipath device. Similarly, if you set thealiasoption in the/etc/multipath.conffile, the name is not automatically consistent across all nodes in the cluster.
This should not cause any difficulties if you use LVM to create logical devices from the multipath device. To keep your multipath device names consistent in every node, disable the user_friendly_names option.
For example, a node with two HBAs attached to a storage controller with two ports by means of a single unzoned FC switch sees four devices: /dev/sda, /dev/sdb, /dev/sdc, and /dev/sdd. DM Multipath creates a single device with a unique WWID that reroutes I/O to those four underlying devices according to the multipath configuration.
In addition to the user_friendly_names and alias options, a multipath device also has other attributes. You can modify these attributes for a specific multipath device by creating an entry for that device in the multipaths section of the /etc/multipath.conf file. For more information, see:
-
multipath(8)andmultipath.conf(8)man pages on your system -
/etc/multipath.conffile