Red Hat Training

A Red Hat training course is available for RHEL 8

Chapter 3. Setting up DM Multipath

Before setting up DM Multipath on your system, ensure that your system has been updated and includes the device-mapper-multipath package.

3.1. Basic DM Multipath setup

You set up DM Multipath with the mpathconf utility, which creates the multipath configuration file /etc/multipath.conf.

  • If the /etc/multipath.conf file already exists, the mpathconf utility will edit it.
  • If the /etc/multipath.conf file does not exist, the mpathconf utility will create the /etc/multipath.conf file from scratch.

For more information on the mpathconf utility, see the mpathconf(8) man page.

If you do not need to edit the /etc/multipath.conf file, you can set up DM Multipath for a basic failover configuration by running the following mpathconf command. This command enables the multipath configuration file and starts the multipathd daemon.

# mpathconf --enable --with_multipathd y

If you need to edit the /etc/multipath.conf file before starting the multipathd daemon. use the following procedure to set up DM Multipath for a basic failover configuration.

  1. Enter the mpathconf command with the --enable option specified:

    # mpathconf --enable

    For information on additional options to the mpathconf command you may require, see the mpathconf(8) man page or enter the mpathconf command with the --help option specified.

    # mpathconf --help
    usage: /sbin/mpathconf <command>
    Enable: --enable
    Disable: --disable
    Set user_friendly_names (Default y): --user_friendly_names <y|n>
    Set find_multipaths (Default y): --find_multipaths <y|n>
    Load the dm-multipath modules on enable (Default y): --with_module  <y|n>
    start/stop/reload multipathd (Default n): --with_multipathd  <y|n>
  2. Edit the /etc/multipath.conf file if necessary. The default settings for DM Multipath are compiled in to the system and do not need to be explicitly set in the /etc/multipath.conf file.

    The default value of path_grouping_policy is set to failover, so in this example you do not need to edit the /etc/multipath.conf file.

    The initial defaults section of the configuration file configures your system so that the names of the multipath devices are of the form /dev/mapper/mpathn; without this setting, the names of the multipath devices would be aliased to the WWID of the device. If you do not want to use user friendly names, you can enter the following command:

    # mpathconf --enable --user_friendly_names n
  3. Save the configuration file and exit the editor, if necessary.
  4. Execute the following command:

    # systemctl start multipathd.service

If you find that you need to edit the multipath configuration file after you have started the multipath daemon, you must execute the systemctl reload multipathd.service command for the changes to take effect.

3.2. Ignoring local disks when generating multipath devices

Some machines have local SCSI cards for their internal disks. DM Multipath is not recommended for these devices. If you set the find_multipaths configuration parameter to on, you do not have to disable multipathing on these devices. If you do not set the find_multipaths configuration parameter to on, you can use the following procedure to modify the DM Multipath configuration file to ignore the local disks when configuring multipath.


  1. Determine which disks are the internal disks. In these examples, /dev/sda is the internal disk:

    • Display existing multipath devices:

      # multipath -v2 -l
      SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1 dm-2 WINSYS,SF2372
      size=33 GB features="0" hwhandler="0" wp=rw
      `-+- policy='round-robin 0' prio=0 status=active
        |- 0:0:0:0 sda 8:0 active undef running
    • Display additional multipath devices that DM Multipath could create:

      # multipath -v2 -d
      : SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1 undef WINSYS,SF2372
      size=33 GB features="0" hwhandler="0" wp=undef
      `-+- policy='round-robin 0' prio=1 status=undef
        |- 0:0:0:0 sda 8:0  undef ready running
  2. Edit the blacklist section of the /etc/multipath.conf file to include this device.

    Identify the device using its WWID attribute. Although you could identify the sda device using a devnode type, that would not be a safe procedure because /dev/sda is not guaranteed to be the same on reboot.

    In the previous example, the WWID of the /dev/sda device is SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1. To ignore this device, include the following in the /etc/multipath.conf file:

    blacklist {
          wwid SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1
  3. Reload the updated /etc/multipath.conf file:

    # systemctl reload multipathd.service

Additional resources

  • For information on the find_multipaths configuration parameter and the meaning of the values to which you can set this parameter to, see the multipath.conf(5) man page.

3.3. Configuring additional storage devices

By default, DM Multipath includes support for the most common storage arrays that themselves support DM Multipath. For information on the default configuration value, including supported devices, run either of the following commands.

# multipathd show config
# multipath -t

If you need to add a storage device that is not supported by default as a known multipath device, edit the /etc/multipath.conf file and insert the appropriate device information.

For example, to add information about the HP Open-V series the entry looks like this. This example sets the device to queue for a minute (or 12 retries and 5 seconds per retry) after all paths have failed.

devices {
        device {
                vendor "HP"
                product "OPEN-V"
                no_path_retry 12

3.4. Setting up multipathing in the initramfs file system

You can set up multipathing in the initramfs file system. After configuring multipath, you can rebuild the initramfs file system with the multipath configuration files by executing the dracut command with the following options:

# dracut --force --add multipath

If you run multipath from the initramfs file system and you make any changes to the multipath configuration files, you must rebuild the initramfs file system for the changes to take effect.