Linux Device mapper multipathing (DM Multipath) allows you to configure multiple I/O paths between server nodes and storage arrays into a single device. These I/O paths are physical SAN connections that can include separate cables, switches, and controllers. Multipathing aggregates the I/O paths, creating a new device that consists of the aggregated paths.
DM Multipath can be used to provide:
1. Redundancy
DM Multipath can provide failover in an active/passive configuration. In an active/passive configuration, only half the paths are used at any time for I/O. If any element of an I/O path (the cable, switch, or controller) fails, DM Multipath switches to an alternate path.
2. Improved Performance
DM Multipath can be configured in active/active mode, where I/O is spread over the paths in a round-robin fashion. In some configurations, DM Multipath can detect loading on the I/O paths and dynamically rebalance the load.
DELL EMC PowerPath is a software suite to automate data path management, failover and recovery, and optimize load balancing to ensure application availability and performance. When using it on Linux, the native dm-multipath needs to be disabled so that it will work properly.
Recently I worked on an OL7 system which had both dm-multipathing and PowerPath running. I could see same devices listed with their naming convention.
root@joetest:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdbu 68:128 0 1T 0 disk
└─mpathaa 252:54 0 1T 0 mpath
└─mpathaa1 252:57 0 1024G 0 part
sdy 65:128 0 1T 0 disk
└─mpathr 252:36 0 1T 0 mpath
└─mpathr1 252:39 0 1024G 0 part
sdbb 67:80 0 1T 0 disk
└─mpathg 252:14 0 1T 0 mpath
└─mpathg1 252:17 0 1024G 0 part
emcpowerv 120:336 0 1T 0 disk
emcpowerai 120:544 0 1T 0 disk
emcpowerc 120:32 0 1T 0 disk
I didn’t realize this would cause issues and I knew I should use PowerPath devices. So as usual, I just created partitions on PowerPath devices and mounted them. Everything seemed to be fine until I restarted the system.
After the reboot, none of partitions were mounted. When I checked the /dev directory, there were no PowerPath devices listed, but only devices from DM Multipath. I had no idea how PowerPath devices were found when the system was handled over to me.
Then I tried to run the command “partprobe” and PowerPath devices showed up after that. I was able to mount partitions fine. As a test, I restarted again and they wouldn’t show up until I ran “partprobe“.
After reading PowerPath guide, it seemed I needed to disable DM Multipath. Here is the procedure to do that:
- Blacklist all devices in /etc/multipath.conf
blacklist {
devnode "*"
}
2. Restart multipathd service to reload the configuration into effect. Then stop and disable the service.
systemctl restart multipathd
systemctl stop multipathd
systemctl disable multipathd
3. Optionally, recreate ramdisk image using dracut to exclude the dm-multipath module if you want a cleaner boot image.
dracut -o "multipath" --force
The command above will exclude the multipath module and overwrite the current initramfs boot image. You can also create a new initramfs, but then you need to add a grub menu entry for this new image into the file /etc/grub.d/40_custom and use “grub2-mkconfig” load the grub configuration and “grub2-set-default” to set the new initramfs as the default boot image.
Indeed, after I disabled the native DM Multipah, the problem has gone. PowerPath devices are automatically discovered during the boot process and mounted.