1 What happened?
When preparing a server for k8s, the swap was disabled, and to reuse the swap partition, it's removed.
# swapoff -a
# lvremove /dev/rhel/swap
# vi /etc/fstab ( delete swap entry)
# reboot
Then, the server failed to start and entered a dracut state.
2 Root cause
After swap partition was removed, the GRUB menu entries are still having it.
# cat /etc/grub2.cfg | grep swap
rd.lvm.lv=rhel/swap
3 Solution
Step 0: edit GRUB2 menu and boot system
Power on the server, and press "Down Arrow" key to enter GRUB UI.
Then press "e" to edit the menu temporarily by deleting "rd.lvm.lv=rhel/swap".
Press "Ctr + X" to boot into OS
Step 1: update /etc/default/grub by deletinig swap parameter
# vi /etc/default/grub
(delete "rd.lvm.lv=rhel/swap")
Step 2: Regenerate grub2.cfg
# grub2-mkconfig > /etc/grub2.cfg
Finally, reboot the system to verify.
No comments:
Post a Comment