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 (RHEL) 5 Update 5 or later
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • 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, uid and gid.  On boot, the devices are created with the correct alias name, but the uid & gid are not set.

Resolution

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

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

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

# 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 ram disk.  As of RHEL 5.5 and 6.0, the init process in the initrd will activate all multipath devices using these settings.  So, if the initrd has not been remade after making changes to /etc/multipath.conf, the old settings will still be used.

Diagnostic Steps

  • Open the initrd 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

   # 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.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.