Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
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 Link kopierenLink in die Zwischenablage kopiert!
DM Multipath uses the find_multipaths parameter and device discovery rules to automatically determine when to create multipath devices for detected storage paths.
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
multipathcommand. - 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 (/):
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/wwidsfile. smart-
Multipath always accepts non-disabled devices in
udevas soon as they appear. Ifmultipathddoes not create the device within a timeout set with thefind_multipaths_timeoutparameter, 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
# multipath -w /dev/sdb wwid '3600d0230000000000e13954ed5f89300' removedCopy to Clipboard Copied! Toggle word wrap Toggle overflow Removing a multipath device by using the WWID of the device.
multipath -w 3600d0230000000000e13954ed5f89300
# multipath -w 3600d0230000000000e13954ed5f89300 wwid '3600d0230000000000e13954ed5f89300' removedCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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
# multipath -W
successfully reset wwids
5.2. Criteria for disabling multipathing on certain devices Link kopierenLink in die Zwischenablage kopiert!
Device exclusion from multipathing uses criteria such as, WWID, device name, type, property, or protocol, evaluated in priority order with exception lists taking precedence.
You can disable multipathing on devices by any of the following criteria:
- WWID
- device name
- device type
- property
- protocol
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:
-
property -
devnode -
device -
protocol -
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 Link kopierenLink in die Zwischenablage kopiert!
Exclude specific devices from multipath by disabling them by using their WWID in the multipath.conf file. This is useful for local disks, single-path devices, or storage needing special handling outside the multipath framework.
Procedure
Find WWID of a device:
multipathd show paths raw format "%d %w" | grep sdb
# multipathd show paths raw format "%d %w" | grep sdb sdb 3600508b4001080520001e00011700000Copy to Clipboard Copied! Toggle word wrap Toggle overflow Disable devices in the
/etc/multipath.confconfiguration file by using thewwidentry.The following example shows the lines in the DM Multipath configuration file that disable a device with a WWID of
3600508b4001080520001e00011700000:blacklist { wwid 3600508b4001080520001e00011700000 }blacklist { wwid 3600508b4001080520001e00011700000 }Copy to Clipboard Copied! Toggle word wrap Toggle overflow Validate the
/etc/multipath.conffile after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
multipath -t > /dev/null
# multipath -t > /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow To display the new configuration with the changes added, run:
multipath -t
# multipath -tCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Reload the
/etc/multipath.conffile and reconfigure themultipathddaemon for changes to take effect:service multipathd reload
# service multipathd reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.4. Disabling multipathing by device name Link kopierenLink in die Zwischenablage kopiert!
Disable multipathing for specific devices by using their device names, such as /dev/sda in the multipath.conf file. This prevents DM Multipath from grouping local disks, USB devices, or other storage into multipath devices, keeping them as individual block devices.
Procedure
Display device information:
udevadm info --query=all -n /dev/mapper/sd*
# udevadm info --query=all -n /dev/mapper/sd*Copy to Clipboard Copied! Toggle word wrap Toggle overflow Disable devices in the
/etc/multipath.confconfiguration file by using thedevnodeentry.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]" }blacklist { devnode "^sd[a-z]" }Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can use a
devnodeentry to disable individual devices rather than all devices of a specific type. However, this is not recommended because unless it is statically mapped byudevrules, there is no guarantee that a specific device will have the same name on reboot. For example, a device name could change from/dev/sdato/dev/sdbon reboot.By default, DM Multipath disables all devices that are not SCSI, NVMe, or DASD, by using the following
devnodeentry:blacklist { devnode "!^(sd[a-z]|dasd[a-z]|nvme[0-9])" }blacklist { devnode "!^(sd[a-z]|dasd[a-z]|nvme[0-9])" }Copy to Clipboard Copied! Toggle word wrap Toggle overflow The devices that this entry disables do not generally support DM Multipath.
Validate the
/etc/multipath.conffile after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
multipath -t > /dev/null
# multipath -t > /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow To display the new configuration with the changes added, run:
multipath -t
# multipath -tCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Reload the
/etc/multipath.conffile and reconfigure themultipathddaemon for changes to take effect:service multipathd reload
# service multipathd reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.5. Disabling multipathing by device type Link kopierenLink in die Zwischenablage kopiert!
Exclude entire categories of devices from multipath by specifying vendor and product info in the device section of multipath.conf. This prevents DM Multipath from grouping devices of certain models or vendors, keeping them as individual block devices.
Procedure
Display device type:
multipathd show paths raw format "%d %s" | grep sdb
# multipathd show paths raw format "%d %s" | grep sdb sdb HP,HSV210Copy to Clipboard Copied! Toggle word wrap Toggle overflow Disable devices in the
/etc/multipath.confconfiguration file by using thedevicesection.The following example disables multipathing on all IBM DS4200 and HP devices:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Validate the
/etc/multipath.conffile after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
multipath -t > /dev/null
# multipath -t > /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow To display the new configuration with the changes added, run:
multipath -t
# multipath -tCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Reload the
/etc/multipath.conffile and reconfigure themultipathddaemon for changes to take effect:service multipathd reload
# service multipathd reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.6. Disabling multipathing by udev property Link kopierenLink in die Zwischenablage kopiert!
Exclude devices from multipath using their udev properties in the multipath.conf file. This method allows flexible filtering based on system-detected attributes like hardware type or connection, giving precise control over which devices are excluded from multipathing.
Procedure
Display the
udevvariables for a device:udevadm info --query=all -n /dev/sdb
# udevadm info --query=all -n /dev/sdbCopy to Clipboard Copied! Toggle word wrap Toggle overflow Disable devices in the
/etc/multipath.confconfiguration file by using thepropertyparameter. This parameter is a regular expression string that matches against theudevenvironment variable name for the devices.The following example disables multipathing on all devices with the
udevpropertyID_ATA:blacklist { property "ID_ATA" }blacklist { property "ID_ATA" }Copy to Clipboard Copied! Toggle word wrap Toggle overflow Validate the
/etc/multipath.conffile after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
multipath -t > /dev/null
# multipath -t > /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow To display the new configuration with the changes added, run:
multipath -t
# multipath -tCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Reload the
/etc/multipath.conffile and reconfigure themultipathddaemon for changes to take effect:service multipathd reload
# service multipathd reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.7. Disabling multipathing by device protocol Link kopierenLink in die Zwischenablage kopiert!
Exclude devices from multipath based on their transport protocol by using the device protocol setting in multipath.conf. This is useful for preventing multipathing on local or specific protocols better managed outside the multipath framework. sa .Procedure
Optional: View the protocol that a path is using:
multipathd show paths raw format "%d %P" | grep sdb
# multipathd show paths raw format "%d %P" | grep sdb sdb scsi:fcpCopy to Clipboard Copied! Toggle word wrap Toggle overflow Disable devices in the
/etc/multipath.confconfiguration file by using theprotocolparameter.The
protocolparameter 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" }blacklist { protocol "nvme" }Copy to Clipboard Copied! Toggle word wrap Toggle overflow DM Multipath recognizes the
protocolstrings such asscsi: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, andundef.Validate the
/etc/multipath.conffile after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
multipath -t > /dev/null
# multipath -t > /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow To display the new configuration with the changes added, run:
multipath -t
# multipath -tCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Reload the
/etc/multipath.conffile and reconfigure themultipathddaemon for changes to take effect:service multipathd reload
# service multipathd reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.8. Adding exceptions for devices with disabled multipathing Link kopierenLink in die Zwischenablage kopiert!
Re-enable multipathing for specific devices by adding exceptions in multipath.conf. This is useful when broad exclusion rules are in place but certain devices still require multipathing, allowing precise control over which devices are managed by DM Multipath.
Prerequisites
- Multipathing is disabled on certain devices.
Procedure
Enable multipathing on the devices by using the
blacklist_exceptionssection of the/etc/multipath.confconfiguration file.When specifying devices in the
blacklist_exceptionssection of the configuration file, you must specify the exceptions by using the same criteria as they were specified in theblacklistsection. For example, a WWID exception does not apply to devices disabled by adevnodeentry, even if the disabled device is associated with that WWID. Similarly,devnodeexceptions apply only todevnodeentries, anddeviceexceptions apply only to device entries.Following is an example for adding exceptions for devices with disabled multipathing
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.conffile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, you could use an exclamation mark (
!) to invert theblacklistentry, which disables all devices except the specified WWID:blacklist { wwid "!3600d0230000000000e13955cc3757803" }blacklist { wwid "!3600d0230000000000e13955cc3757803" }Copy to Clipboard Copied! Toggle word wrap Toggle overflow An exception by udev property
The
propertyparameter works differently than the otherblacklist_exceptionparameters. The value of thepropertyparameter must match the name of a variable in theudevdatabase. 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)" }blacklist_exceptions { property "(SCSI_IDENT_|ID_WWN)" }Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Validate the
/etc/multipath.conffile after modifying the multipath configuration file by running one of the following commands:To display any configuration errors, run:
multipath -t > /dev/null
# multipath -t > /dev/nullCopy to Clipboard Copied! Toggle word wrap Toggle overflow To display the new configuration with the changes added, run:
multipath -t
# multipath -tCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Reload the
/etc/multipath.conffile and reconfigure themultipathddaemon for changes to take effect:service multipathd reload
# service multipathd reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow