How do I rebuild the initramfs with multipath in Red Hat Enterprise Linux
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
initramfsfile? multipathmodules and configuration files are missing in initramfs image while installing new kernel in RHEL.
Resolution
-
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 -
Now rebuild the initramfs image with multipath, execute the
dracutcommand with the following options:# dracut -v -f -a multipath --include /etc/multipath /etc/multipath -
Alternatively, edit
/etc/dracut.confand 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) -
For RHEL7 you may want to follow Red Hat' s Documentation. For later kernel versions refernce the corresponding DM Multipath Guides.
-
Reboot the system with newly created initramfs image.
Root Cause
For RHEL6 Following Bug report and Errata are related:
- This has been identified in the following BZ This content is not included.642083
- Which is addressed in the following errata: RHBA-2011-0523:
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.