How do I rebuild the initramfs with multipath in Red Hat Enterprise Linux

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • device-mapper-multipath
  • initramfs

Issue

  • How do I rebuild the initramfs with multipath.
  • What parameters I need to modify to include multipath modules in initramfs file?
  • multipath modules and configuration files are missing in initramfs image while installing new kernel in RHEL.

Resolution

  1. It is recommended you make a backup copy of the initramfs in case the new version has an unexpected problem:

     # cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.$(date +%m-%d-%H%M%S).bak
    
  2. Now rebuild the initramfs image with multipath, execute the dracut command with the following options:

     # dracut -v -f -a multipath --include /etc/multipath /etc/multipath
    
  3. Alternatively, edit /etc/dracut.conf and modify the add_dracutmodules line:

    Find:

     # Dracut modules to add to the default
     #add_dracutmodules+=""
    

    Change to:

     # Dracut modules to add to the default
     add_dracutmodules+=" multipath "
    

    Rebuild initramfs:

     # dracut -v -f /boot/initramfs-$(uname -r).img $(uname -r)
    
  4. For RHEL7 you may want to follow Red Hat' s Documentation. For later kernel versions refernce the corresponding DM Multipath Guides.

  5. Reboot the system with newly created initramfs image.

Root Cause

For RHEL6 Following Bug report and Errata are related:

Category

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.