DM-Multipathing (DM-MPIO) provides input-output (I/O) fail-over and load-balancing by using multipath I/O within Linux for block devices. By utilizing device-mapper, the multipathd daemon provides the host-side logic to use multiple paths of a redundant network to provide continuous availability and higher-bandwidth connectivity between the host server and the block-level device.
DM-Multipath can be used to provide:
Redundancy DM-Multipath can provide failover in an active/passive configuration. In an active/passive configuration, only half the paths are used at any time for I/O. If any element of an I/O path (the cable, switch, or controller) fails, DM-Multipath switches to an alternate path.
Improved Performance Performance DM-Multipath can be configured in active/active mode, where I/O is spread over the paths in a round-robin fashion. In some configurations, DM-Multipath can detect loading on the I/O paths and dynamically re-balance the load.
Storage Array Overview
By default, DM-Multipath includes support for the most common storage arrays that support DM-Multipath. The supported devices can be found in the multipath.conf.defaults file. If your storage array supports DM-Multipath and is not configured by default in this file, you may need to add them to the DM-Multipath configuration file, multipath.conf. For information on the DM-Multipath configuration file, see Section, The DM-Multipath Configuration File. Some storage arrays require special handling of I/O errors and path switching. These require separate hardware handler kernel modules.
The figure below shows an active/passive configuration with two I/O paths from the server to a RAID device. There are 2 HBAs on the server, 2 SAN switches, and 2 RAID controllers.
Table DM-Multipath Components describes the components of the DM-Multipath package.
|dm_multipath kernel module||Reroutes I/O and supports failover for paths and path groups.|
|multipath command||Lists and configures multipath devices. Normally started up with /etc/rc.sysinit, it can also be started up by a udev program whenever a block device is added or it can be run by the initramfs file system.|
|multipathd daemon||Monitors paths; as paths fail and come back, it may initiate path group switches. Provides for interactive changes to multipath devices. This daemon must be restarted for any changes to the /etc/multipath.conf file to take effect.|
|kpartx command||Creates device mapper devices for the partitions on a device It is necessary to use this command for DOS-based partitions with DM-Multipath. The kpartx is provided in its own package, but the multipath-tools package depends on it.|
DM-Multipath Setup Overview
DM-Multipath includes compiled-in default settings that are suitable for common multipath configurations. Setting up DM-multipath is often a simple procedure. The basic procedure for configuring your system with DM-Multipath is as follows:
Install the multipath packages
Create an empty config file, /etc/multipath.conf, that re-defines the configuration
If necessary, edit the multipath.conf configuration file to modify default values and save the updated file.
Start the multipath daemon