이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 5. Preventing devices from multipathing


You can configure DM Multipath to ignore selected devices when it configures multipath devices. DM Multipath does not group these ignored devices into a multipath device.

5.1. Conditions when DM Multipath creates a multipath device for a path

DM Multipath has a set of default rules to determine whether to create a multipath device for a path or whether to ignore the path. You can configure the behavior.

If the find_multipaths configuration parameter is set to off, multipath always tries to create a multipath device for every path that is not explicitly disabled. If the find_multipaths configuration parameter is set to on, then multipath creates a device, only if one of following conditions is met:

  • There are at least two paths with the same World-Wide Identification (WWID) that are not disabled.
  • You manually force the creation of the device by specifying a device with the multipath command.
  • A path has the same WWID as a multipath device that was previously created even if that multipath device does not currently exist. Whenever a multipath device is created, multipath remembers the WWID of the device so that it automatically creates the device again as soon as it sees a path with that WWID. This allows you to have multipath automatically choose the correct paths to make into multipath devices, without having to disable multipathing on other devices.

If you have previously created a multipath device without using the find_multipaths parameter and then you later set the parameter to on, you might need to remove the WWIDs of any device you do not want created as a multipath device from the /etc/multipath/wwids file. The following example shows a sample /etc/multipath/wwids file. The WWIDs are enclosed by slashes (/):

# Multipath wwids, Version : 1.0
# NOTE: This file is automatically maintained by multipath and multipathd.
# You should not need to edit this file in normal circumstances.
#
# Valid WWIDs:
/3600d0230000000000e13955cc3757802/
/3600d0230000000000e13955cc3757801/
/3600d0230000000000e13955cc3757800/
/3600d02300069c9ce09d41c31f29d4c00/
/SWINSYS  SF2372         0E13955CC3757802/
/3600d0230000000000e13955cc3757803/
Copy to Clipboard

In addition to on and off, you can also set find_multipaths to the following values:

strict
Multipath never accepts paths that have not previously been multipathed and are therefore not in the /etc/multipath/wwids file.
smart
Multipath always accepts non-disabled devices in udev as soon as they appear. If multipathd does not create the device within a timeout set with the find_multipaths_timeout parameter, it will release its claim on the device.

The built-in default value of find_multipaths is off. The default multipath.conf file created by mpathconf, however, will set the value of find_multipaths to on.

When the find_multipaths parameter is set to on, disable multipathing only on the devices with multiple paths that you do not want to be multipathed. Because of this, it will generally not be necessary to disable multipathing on devices.

If you add a previously created multipath device to blacklist, removing the WWID of that device from the /etc/multipath/wwids file by using the -w option can help avoid issues with other programs. For example, to remove the device /dev/sdb with WWID 3600d0230000000000e13954ed5f89300 from the /etc/multipath/wwids file, you can use either of the following methods.

  • Removing a multipath device by using the device name.

    # multipath -w /dev/sdb
    wwid '3600d0230000000000e13954ed5f89300' removed
    Copy to Clipboard
  • Removing a multipath device by using the WWID of the device.

    # multipath -w 3600d0230000000000e13954ed5f89300
    wwid '3600d0230000000000e13954ed5f89300' removed
    Copy to Clipboard

You can also use the -W option to update the /etc/multipath/wwids file. This would reset the /etc/multipath/wwids file to only include the WWIDs of the current multipath devices. To reset the file, run the following:

# multipath -W
successfully reset wwids
Copy to Clipboard

5.2. Criteria for disabling multipathing on certain devices

You can disable multipathing on devices by any of the following criteria:

  • WWID
  • device name
  • device type
  • property
  • protocol
Note

By default, a variety of device types are disabled, even after you comment out the initial blacklist section of the configuration file.

For every device, DM Multipath evaluates these criteria in the following order:

  1. property
  2. devnode
  3. device
  4. protocol
  5. wwid

If a device turns out to be disabled by any of the mentioned criteria, DM Multipath excludes it from handling by multipathd, and does not evaluate the later criteria. For each criteria, the exception list takes precedence over the list of disabled devices, if a device matches both.

5.3. Disabling multipathing by WWID

You can disable multipathing on individual devices by their World-Wide Identification (WWID).

Procedure

  1. Find WWID of a device:

    # multipathd show paths raw format "%d %w" | grep sdb
    sdb 3600508b4001080520001e00011700000
    Copy to Clipboard
  2. Disable devices in the /etc/multipath.conf configuration file by using the wwid entry.

    The following example shows the lines in the DM Multipath configuration file that disable a device with a WWID of 3600508b4001080520001e00011700000:

    blacklist {
           wwid 3600508b4001080520001e00011700000
    }
    Copy to Clipboard
  3. Validate the /etc/multipath.conf file after modifying the multipath configuration file by running one of the following commands:

    • To display any configuration errors, run:

      # multipath -t > /dev/null
      Copy to Clipboard
    • To display the new configuration with the changes added, run:

      # multipath -t
      Copy to Clipboard
  4. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload
    Copy to Clipboard

5.4. Disabling multipathing by device name

You can disable multipathing on device types by device name, so that DM Multipath will not group them into a multipath device.

Procedure

  1. Display device information:

    # udevadm info --query=all -n /dev/mapper/sd* 
    Copy to Clipboard
  2. Disable devices in the /etc/multipath.conf configuration file by using the devnode entry.

    The following example shows the lines in the DM Multipath configuration file that disable all SCSI devices, because it disables all sd* devices as well:

    blacklist {
           devnode "^sd[a-z]"
    }
    Copy to Clipboard

    You can use a devnode entry to disable individual devices rather than all devices of a specific type. However, this is not recommended because unless it is statically mapped by udev rules, there is no guarantee that a specific device will have the same name on reboot. For example, a device name could change from /dev/sda to /dev/sdb on reboot.

    By default, DM Multipath disables all devices that are not SCSI, NVMe, or DASD, by using the following devnode entry:

    blacklist {
           devnode "!^(sd[a-z]|dasd[a-z]|nvme[0-9])"
    }
    Copy to Clipboard

    The devices that this entry disables do not generally support DM Multipath.

  3. Validate the /etc/multipath.conf file after modifying the multipath configuration file by running one of the following commands:

    • To display any configuration errors, run:

      # multipath -t > /dev/null
      Copy to Clipboard
    • To display the new configuration with the changes added, run:

      # multipath -t
      Copy to Clipboard
  4. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload
    Copy to Clipboard

5.5. Disabling multipathing by device type

You can disable multipathing on devices by using the device section.

Procedure

  1. Display device type:

    # multipathd show paths raw format "%d %s" | grep sdb
    sdb HP,HSV210
    Copy to Clipboard
  2. Disable devices in the /etc/multipath.conf configuration file by using the device section.

    The following example disables multipathing on all IBM DS4200 and HP devices:

    blacklist {
           device {
                   vendor  "IBM"
                   product "3S42"       #DS4200 Product 10
           }
           device {
                   vendor  "HP"
                   product ".*"
           }
    }
    Copy to Clipboard
  3. Validate the /etc/multipath.conf file after modifying the multipath configuration file by running one of the following commands:

    • To display any configuration errors, run:

      # multipath -t > /dev/null
      Copy to Clipboard
    • To display the new configuration with the changes added, run:

      # multipath -t
      Copy to Clipboard
  4. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload
    Copy to Clipboard

5.6. Disabling multipathing by udev property

You can disable multipathing on devices by their udev property parameter.

Procedure

  1. Display the udev variables for a device:

    # udevadm info --query=all -n /dev/sdb
    Copy to Clipboard
  2. Disable devices in the /etc/multipath.conf configuration file by using the property parameter. This parameter is a regular expression string that matches against the udev environment variable name for the devices.

    The following example disables multipathing on all devices with the udev property ID_ATA:

    blacklist {
            property "ID_ATA"
    }
    Copy to Clipboard
  3. Validate the /etc/multipath.conf file after modifying the multipath configuration file by running one of the following commands:

    • To display any configuration errors, run:

      # multipath -t > /dev/null
      Copy to Clipboard
    • To display the new configuration with the changes added, run:

      # multipath -t
      Copy to Clipboard
  4. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload
    Copy to Clipboard

5.7. Disabling multipathing by device protocol

You can disable multipathing on devices by using the device protocol.

Procedure

  1. Optional: View the protocol that a path is using:

    # multipathd show paths raw format "%d %P" | grep sdb
    sdb scsi:fcp
    Copy to Clipboard
  2. Disable devices in the /etc/multipath.conf configuration file by using the protocol parameter.

    The protocol parameter takes a regular expression and blacklists all devices with matching protocol strings. For example, to disable multipathing on all nvme devices, use the following:

    blacklist {
            protocol "nvme"
    }
    Copy to Clipboard

    DM Multipath recognizes the protocol strings such as scsi:fcp, scsi:spi, scsi:ssa, scsi:sbp, scsi:srp, scsi:iscsi, scsi:sas, scsi:adt, scsi:ata, scsi:unspec, ccw, cciss, nvme:pcie, nvme:rdma, nvme:fc, nvme:tcp, nvme:loop, nvme:apple-nvme, nvme:unspec, and undef.

  3. Validate the /etc/multipath.conf file after modifying the multipath configuration file by running one of the following commands:

    • To display any configuration errors, run:

      # multipath -t > /dev/null
      Copy to Clipboard
    • To display the new configuration with the changes added, run:

      # multipath -t
      Copy to Clipboard
  4. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload
    Copy to Clipboard

5.8. Adding exceptions for devices with disabled multipathing

You can enable multipathing by adding exceptions on devices where multipathing is currently disabled.

Prerequisites

  • Multipathing is disabled on certain devices.

Procedure

  1. Enable multipathing on the devices by using the blacklist_exceptions section of the /etc/multipath.conf configuration file.

    When specifying devices in the blacklist_exceptions section of the configuration file, you must specify the exceptions by using the same criteria as they were specified in the blacklist section. For example, a WWID exception does not apply to devices disabled by a devnode entry, even if the disabled device is associated with that WWID. Similarly, devnode exceptions apply only to devnode entries, and device exceptions apply only to device entries.

    Example 5.1. An exception by WWID

    If you have a large number of devices and want to multipath only one of them with the WWID of 3600d0230000000000e13955cc3757803, instead of individually disabling each of the devices except the one you want, you could disable all of them, and then enable only the one you want by adding the following lines to the /etc/multipath.conf file:

    blacklist {
            wwid ".*"
    }
    
    blacklist_exceptions {
            wwid "3600d0230000000000e13955cc3757803"
    }
    Copy to Clipboard

    Alternatively, you could use an exclamation mark (!) to invert the blacklist entry, which disables all devices except the specified WWID:

    blacklist {
            wwid "!3600d0230000000000e13955cc3757803"
    }
    Copy to Clipboard

    Example 5.2. An exception by udev property

    The property parameter works differently than the other blacklist_exception parameters. The value of the property parameter must match the name of a variable in the udev database. Otherwise, the device is disabled. Using this parameter, you can disable multipathing on certain SCSI devices, such as USB sticks and local hard drives.

    To enable multipathing only on SCSI devices that could reasonably be multipathed, set this parameter to (SCSI_IDENT_|ID_WWN) as in the following example:

    blacklist_exceptions {
            property "(SCSI_IDENT_|ID_WWN)"
    }
    Copy to Clipboard
  2. Validate the /etc/multipath.conf file after modifying the multipath configuration file by running one of the following commands:

    • To display any configuration errors, run:

      # multipath -t > /dev/null
      Copy to Clipboard
    • To display the new configuration with the changes added, run:

      # multipath -t
      Copy to Clipboard
  3. Reload the /etc/multipath.conf file and reconfigure the multipathd daemon for changes to take effect:

    # service multipathd reload
    Copy to Clipboard
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat