3.3. Ignoring local disks when generating multipath devices
To prevent DM Multipath from using local SCSI disks, you can configure it to ignore these devices during multipath device generation. Setting find_multipaths to on simplifies this process; otherwise, manual exclusion is required in the configuration file.
Procedure
Identify the internal disk using any known parameters such as the device’s model, path or vendor, and determine its WWID by using any one of the following options:
Display existing multipath devices:
# multipath -v2 -l mpatha (WDC_WD800JD-75MSA3_WD-WMAM9FU71040) dm-2 ATA,WDC WD800JD-75MS 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 runningDisplay additional multipath devices that DM Multipath could create:
# multipath -v2 -d : mpatha (WDC_WD800JD-75MSA3_WD-WMAM9FU71040) dm-2 ATA,WDC WD800JD-75MS 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 runningDisplay device information:
# multipathd show paths raw format "%d %w" | grep sda sda WDC_WD800JD-75MSA3_WD-WMAM9FU71040In this example,
/dev/sdais the internal disk and its WWID isWDC_WD800JD-75MSA3_WD-WMAM9FU71040.
Edit the
blacklistsection of the/etc/multipath.conffile to ignore this device, using its WWID attribute:blacklist { wwid WDC_WD800JD-75MSA3_WD-WMAM9FU71040 }警告Although you could identify the device using its
devnodeparameter, such assda, it would not be a safe procedure, because/dev/sdais not guaranteed to refer to the same device on reboot.Check for any configuration errors in the
/etc/multipath.conffile:# multipath -t > /dev/nullTo see the full report, do not discard the command output:
# multipath -t-
Remake the initramfs if the disk is included in
initramfs. For more information, see Configuring multipathing in initramfs. Reload the
/etc/multipath.conffile by reconfiguring themultipathddaemon:# systemctl reload multipathd注意Multipath devices on top of local disks cannot be removed when in use. To ignore such device, stop all users of the device. For example, by unmounting any filesystem on top of it and deactivating any logical volumes using it. If this is not possible, you can reboot the system to remove the multipath device.
Verification
Verify that the internal disk is ignored and it is not displayed in the multipath output:
List the multipathed devices:
# multipath -v2 -lList the additional devices that DM Multipath could create:
# multipath -v2 -d