Ensure that the configuration file for lvm.conf points to the multipath-device names instead of fixed path names. This should happen automatically if boot.multipath is enabled and loads before boot.lvm.
By default, LVM2 does not recognize multipathed devices. To make LVM2 recognize the multipathed devices as possible physical volumes, you must modify /etc/lvm/lvm.conf to scan multipathed devices through the multipath I/O layer.
Adding a multipath filter prevents LVM from scanning and using the physical paths for raw device nodes that represent individual paths to the SAN (/dev/sd*). Ensure that you specify the filter path so that LVM scans only the device mapper names for the device (/dev/disk/by-id/dm-uuid-.*-mpath-.*) after multipathing is configured.
To modify /etc/lvm/lvm.conf for multipath use:
Open the /etc/lvm/lvm.conf file in a text editor.
If /etc/lvm/lvm.conf does not exist, you can create one based on your current LVM configuration by entering the following at a terminal console prompt:
sudo lvm dumpconfig > /etc/lvm/lvm.conf
Change the filter and types entries in /etc/lvm/lvm.conf as follows:
filter = [ "a|/dev/disk/by-id/.*|", "r|.*|" ] types = [ "device-mapper", 1 ]
This allows LVM2 to scan only the by-id paths and reject everything else.
If you are using user-friendly names, specify the filter path so that only the Device Mapper names are scanned after multipathing is configured. The following filter path accepts only partitions on a multipathed device:
filter = [ "a|/dev/disk/by-id/dm-uuid-.*-mpath-.*|", "r|.*|" ]
To accept both raw disks and partitions for Device Mapper names, specify the path as follows, with no hyphen (-) before mpath:
filter = [ "a|/dev/disk/by-id/dm-uuid-.*mpath-.*|", "r|.*|" ]
If you are also using LVM2 on non-multipathed devices, make the necessary adjustments in the filter and types entries to suit your setup. Otherwise, the other LVM devices are not visible with a pvscan after you modify the lvm.conf file for multipathing.
You want only those devices that are configured with LVM to be included in the LVM cache, so ensure that you are specific about which other non-multipathed devices are included by the filter.
For example, if your local disk is /dev/sda and all SAN devices are /dev/sdb and above, specify the local and multipathing paths in the filter as follows:
filter = [ "a|/dev/sda.*|", "a|/dev/disk/by-id/.*|", "r|.*|" ] types = [ "device-mapper", 253 ]
Save the file.
Add dm-multipath to /etc/dracut.conf.d/01-dist.conf by adding the following line:
Make a new initrd to ensure that the Device Mapper Multipath services are loaded with the changed settings. Running dracut is needed only if the root (/) device or any parts of it (such as /var, /etc, /log) are on the SAN and multipath is needed to boot.
Enter the following at a terminal console prompt:
dracut -f --add-drivers multipath
Reboot the server to apply the changes.