Thursday, 29 August 2024
RHEL 9.4 goes to emergency mode
This was my life saver: https://kb.synology.com/en-me/DSM/tutorial/My_virtual_machine_running_RHEL_9_enters_emergency_mode
Diagnosis
In RHEL 9.0, the use_devicesfile option in Logical Volume Manager (LVM) is enabled by default, checking whether the Physical Volume Identifier (PVID) of the LVM volume is identical to the last time the virtual machine was running. When it is not identical, the virtual machine may enter emergency mode. However, the following operations will result in different PVIDs:
Change the virtual disk controller from VirtIO SCSI to IDE or SATA.
Clone a virtual machine with VirtIO SCSI controller.
Import a virtual machine with VirtIO SCSI controller which was exported previously.
Therefore, after the operations above, your virtual machine may enter emergency mode.
Resolution
Recover the virtual machine from the emergency mode
In emergency mode, enter the root password of the virtual machine.
Enter the command below to delete the original device file.
[root@localhost ~]# rm /etc/lvm/devices/system.devices
Enter the command below to create a new device file.
[root@localhost ~]# vgimportdevices -a
Enter the command below to reboot the virtual machine.
[root@localhost ~]# reboot
Prevent the virtual machine from entering emergency mode
Open the configuration file /etc/lvm/lvm.conf.
Locate the use_devicesfile option.
# use_devicesfile = 0
Uncomment the option and make sure it is set to 0.
use_devicesfile = 0
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment