After a system reboot, locally attached disks (eg /dev/sda1) are assigned device mapper multipath (“dm-multipath”, “dm-mp”) names (e.g. /dev/mapper/mpath1p1). Any SCSI device for that matter, which has a scsi ID and is not OPEN/mounted, will be assigned by dm-multipath during boot process unless blacklisted in multipath configuration.
Follow the stpes outlined below in order to blacklist a local disk using the “find_multipaths” directive:
1. Find the WWID of the internal drive which you do not want to be created as a multipath device.
$ sudo multipath -ll [WWN_ID-4]
$ sudo /lib/udev/scsi_id --whitelisted --device=/dev/sd[X] [WWN_ID-4]
2. Remove any reference of this WWID from /etc/multipath/wwids and /etc/multipath/bindings:
$ sudo vi /etc/multipath/wwids # Valid WWIDs: /[WWN_ID-0]/ /[WWN_ID-1]/ /[WWN_ID-2]/ /[WWN_ID-3]/ /[WWN_ID-4]/ <<<<< /[WWN_ID-5]/
3. Add "find_multipaths yes" to "defaults" OR device specific section in /etc/multipath.conf.
$ sudo vi /etc/multipath.conf defaults { user_friendly_names yes find_multipaths yes }
At this point you would need to plan a downtime and reboot the host to make sure that multipath is not assigning the internal drive.Please note that in some cases you might have to rebuild the initrd too. This is required if initramfs was built with dm-multipath support (e.g. if "Boot From SAN" support has been added).
a) Make a backup copy of the initrd in case the new version has an unexpected problem. Ensure /boot is mounted:
$ df -h $ sudo cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.`date +%Y-%m-%d-%H.%M.%S`
b) Rebuild the initramfs for the current kernel version:
$ sudo dracut -f
Note: Another commonly used method to blacklist a device is by using blacklist stanza in the /etc/multipath.conf file.