Why are changes I made to /etc/multipath.conf not taking effect on boot on my boot-from-multipath RHEL system?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 5.5 or later, 6, 7, 8, 9
  • device-mapper-multipath
  • root (/) on a multipath device

Issue

  • Settings we've configured in /etc/multipath.conf are not taking effect when I boot the system. If I flush my maps and remap the devices with the multipath command after boot, the settings are applied.
  • We have added multipath entries into /etc/multipath.conf to give an alias, UIDandGID. On boot, the devices are created with the correct alias name, but the UIDandGID are not set.

Resolution

Important: Ensure that your /etc/fstab entry has a valid multipath device or UUID of multipath device partition (Example: /dev/mapper/mpathap1), instead of UUID or LABEL of individual path of multipath device (Example: /dev/sda1). Otherwise, even if multipath is correctly enabled at boot time, your system will address the individual device instead of multipath device.

Remake the initrd (RHEL5) / initramfs (RHEL6, 7, 8 9):

RHEL 5

# mv /boot/initrd-$(uname -r).img /boot/initrd-$(uname -r).img.bak
# mkinitrd /boot/initrd-$(uname -r).img $(uname -r)

RHEL 6, 7, 8, 9

# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
# dracut

Root Cause

When booting from a multipath device (the root file system is on a multipath device), /etc/multipath.conf is included in the initial ramdisk. As of RHEL 5.5 and later, as well as RHEL 6, 7, 8, 9, the init process in the initrd or initramfs will activate all multipath devices using these settings. So, if the initrd or initramfs has not been remade after making changes to /etc/multipath.conf, the old settings will still be used.

Diagnostic Steps

Open the initrd or initramfs and look at the version of multipath.conf it contains, comparing it to the current version in /etc.

RHEL 5

# zcat initrd-2.6.18-238.1.1.el5.img | cpio -id
# cat ./etc/multipath.conf

RHEL 6, 7, 8, 9

# zcat initramfs-2.6.32-131.17.1.el6.x86_64.img | cpio -id
# cat ./etc/multipath.conf

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments