第 2 章 多路径设备
Without DM Multipath, each path from a server node to a storage controller is treated by the system as a separate device, even when the I/O path connects the same server node to the same storage controller. DM Multipath provides a way of organizing the I/O paths logically, by creating a single multipath device on top of the underlying devices.
2.1. 多路径设备识别器
每个多路径设备都有一个全球识别号(WWID),它是一个全球唯一的无法更改的号码。默认情况下,多路径设备的名称将设为它的 WWID。另外,您还可以在多路径配置文件中设置
user_friendly_names
选项,该选项可将别名设为格式为 mpath
n
的节点唯一名称。
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. When the user_friendly_names
configuration option is set to yes
, the name of the multipath device is set to mpath
n
.
When new devices are brought under the control of DM Multipath, the new devices may be seen in two different places under the
/dev
directory: /dev/mapper/mpath
n
and /dev/dm-
n
.
/dev/mapper
中的设备是在引导过程中生成的。可使用这些设备访问多路径设备,例如在生成逻辑卷时。- Any devices of the form
/dev/dm-
n
are for internal use only should never be used by the administrator directly.
For information on the multipath configuration defaults, including the
user_friendly_names
configuration option, see 第 4.3 节 “配置文件默认设置”.
You can also set the name of a multipath device to a name of your choosing by using the
alias
option in the multipaths
section of the multipath configuration file. For information on the multipaths
section of the multipath configuration file, see 第 4.4 节 “多路径设备配置属性”.