How to prevent RHV host entering emergency mode after upgrade from RHV 4.4 GA
Environment
- Red Hat Enterprise Virtualization 4.4 GA (4.4.1)
- Multipath setup on RHV Hosts for local boot devices
Issue
- According to This content is not included.BZ#1837864, RHV 4.4.1 host, once upgraded to 4.4.2 will not boot and go into emergency mode. What can be done to prevent this and have a smooth upgrade?
- After upgrading from RHV 4.4 GA, the host went into emergency mode and won't boot.
- A host was rebooted and would not boot.
Resolution
It is needed to manually remove the the lvm filter to allow the host to boot normally, upgrade to 4.4.2 or later, and let vdsm configure a new lvm filter on the host.
1.. Remove current lvm filter while on 4.4.1, or in emergency mode (if rebooted).
2. Reboot.
3. Upgrade to 4.4.2 (redeploy in case of already being on 4.4.2).
4. Run vdsm-tool config-lvm-filter to confirm there a new filter in place.
5. RHEL only - run "dracut --force --add multipath” to rebuild initramfs with the correct filter configuration
6. Reboot.
Root Cause
Automatic vdsm lvm-filter was using unstable identifiers for the local device, based on multipath friendly names. Then multipath would grab the device before lvm and lvm would not recognize it due to the incorrect filter and would not find the boot device. Starting RHV 4.4.2 this has been fixed and unique and stable identifiers are used now in automatic lvm filter created by vdsm.
# udevadm info /dev/sda2
P: /devices/pci0000:00/0000:00:01.0/0000:03:00.0/host1/target1:2:0/1:2:0:0/block/sda/sda2
N: sda2
S: disk/by-id/lvm-pv-uuid-pfuelt-KIYO-Ucin-Yvr0-Rjcw-BV2J-Dhe6Np
This content is not included.BZ#1837864
This content is not included.BZ#1859876
Problematic filter in /etc/lvm/lvm.conf:
# grep '^filter = ' /etc/lvm/lvm.conf
filter = ["a|^/dev/mapper/mpatha2$|", "r|.*|"]
New filter starting 4.4.2:
# lvm dumpconfig devices/filter
filter=["a|^/dev/disk/by-id/lvm-pv-uuid-pfuelt-KIYO-Ucin-Yvr0-Rjcw-BV2J-Dhe6Np$|","r|.*|"]
Note: just two different ways to grab the filter.
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.