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 uses the find_multipaths parameter and device discovery rules to automatically determine when to create multipath devices for detected storage paths.
DM Multipath has default rules to determine whether to create a multipath device for a path or ignore it. You can configure the behavior.
If find_multipaths is set to off, multipath always tries to create a multipath device for every non-disabled path. 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 previously created multipath device, even if that device no longer exists. Whenever a multipath device is created, multipath remembers its WWID. It then automatically recreates the device when it detects a path with that WWID. This lets multipath automatically choose the correct paths to make into multipath devices, without having to disable multipathing on other devices.
If you created a multipath device without using find_multipaths and later set it to on, remove unwanted device WWIDs from /etc/multipath/wwids. 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/
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 the timeout set in thefind_multipaths_timeoutparameter, it releases 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 find_multipaths is set to on, disable multipathing only on devices with multiple paths that you do not want multipathed. Because of this, it will generally not be necessary to disable multipathing on devices.
If you add a multipath device to blacklist, remove its WWID from the /etc/multipath/wwids file by using the -w option. This avoids 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/sdbwwid '3600d0230000000000e13954ed5f89300' removedRemoving a multipath device by using the WWID of the device.
# multipath -w 3600d0230000000000e13954ed5f89300wwid '3600d0230000000000e13954ed5f89300' removed
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