Device Mapper Multipathing

Device mapper multipathing (DM-Multipath) allows you to configure multiple I/O paths between server nodes and storage arrays into a single device. These I/O paths are physical SAN connections that can include separate cables, switches, and controllers. Multipathing aggregates the I/O paths, creating a new device that consists of the aggregated paths. This chapter provides a summary of the features of DM-Multipath that are new for the initial release of Ubuntu Server 12.04. Following that, this chapter provides a high-level overview of DM Multipath and its components, as well as an overview of DM-Multipath setup.

Fonctionnalités nouvelles et modifiées pour Ubuntu Serveur 12.04

Migrées de multipath-0.4.8 à multipath-0.4.9

Migration depuis 0.4.8

The priority checkers are no longer run as standalone binaries, but as shared libraries. The key value name for this feature has also slightly changed. Copy the attribute named prio_callout to prio, also modify the argument the name of the priority checker, a system path is no longer necessary. Example conversion:

device {
        vendor "NEC"
        product "DISK ARRAY"
        prio_callout mpath_prio_alua /dev/%n
        prio    alua

See Table Priority Checker Conversion for a complete listing

Priority Checker Conversion

v0.4.8 v0.4.9
prio_callout mpath_prio_emc /dev/%n prio emc
prio_callout mpath_prio_alua /dev/%n prio alua
prio_callout mpath_prio_netapp /dev/%n prio netapp
prio_callout mpath_prio_rdac /dev/%n prio rdac
prio_callout mpath_prio_hp_sw /dev/%n prio hp_sw
prio_callout mpath_prio_hds_modular %b prio hds

Since the multipath config file parser essentially parses all key/value pairs it finds and then makes use of them, it is safe for both prio_callout and prio to coexist and is recommended that the prio attribute be inserted before beginning migration. After which you can safely delete the legacy prio_calliout attribute without interrupting service.


DM-Multipath peut être utilisé pour fournir :

  • 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.

Composants DM-Multipath

Le tableau Composants DM-Multipath décrit les composants du paquet DM-Multipath.

Composants DM-Multipath

Composant Description
module du noyau dm_multipath Reroutes I/O and supports failover for paths and path groups.
commande multipath 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.
démon multipathd 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.
commande kpartx 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.

Présentation de la configuration de DM-Multipath

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:

  1. Installez les paquets multipath-tools et multipath-tools-boot

  2. Créer un fichier de configuration vide, /etc/multipath.conf, qui redéfinit ce qui suit

  3. Si nécessaire, modifiez le fichier de configuration multipath.conf pour modifier les valeurs par défaut puis enregistrez le fichier mis à jour.

  4. Démarrez le démon multipath

  5. Update initial ramdisk

For detailed setup instructions for multipath configuration see Section, Setting Up DM-Multipath.