ArticlesRocky Linux

LVM Physical Volumes Not Detected in Rocky Linux

Introduction

This article addresses an issue where a Rocky Linux server fails to boot and is waiting on mount points. The system drops to emergency mode because LVM physical volumes are not detected, even though some logical volumes remain available.

Problem

After applying system patches, the server fails to boot normally. The OS drops to emergency mode, reporting missing logical volumes (such as /var and /tmp). LVM commands do not detect any physical volumes, though some logical volumes (like root and swap) may still be available.

Symptoms

  • System fails to boot into multi-user mode and drops to emergency mode.
  • Boot process hangs waiting for logical volumes.
  • LVM commands (pvs, pvscan, lvmdiskscan) return no results.
  • Some logical volumes are available and mountable.
  • When booted from rescue media, lsblk shows the logical volumes, but LVM commands still show nothing.

Resolution

Boot into Rescue Mode

Boot from any Rocky Linux installation ISO and select Troubleshooting from the boot menu.

Choose Rescue a Rocky Linux system.

Once the new environment is loaded, it will ask if you would like to automatically detect an existing installation. Press 1 to continue to boot into a shell.

Verify LVM State

Run the following commands to check the state of LVM:

lvs -a -o +devices
pvdisplay
lsblk

If lsblk shows the logical volumes but LVM commands do not, proceed to the next step.

Rebuild LVM Device Settings

Back up the current LVM devices file:

mv /etc/lvm/devices/system.devices /root/system.devices.backup

Recreate LVM device settings:

vgimportdevices -a

Reboot the system:

reboot

After rebooting, the system should detect all LVM physical volumes and boot normally.

Root Cause

This issue is typically caused by a corrupted or outdated /etc/lvm/devices/system.devices file, which prevents LVM from detecting physical volumes after system changes such as patching or kernel updates. Rebuilding the device settings allows LVM to rescan and recognize the correct devices.

Notes

  • LVM backup metadata is stored in /etc/lvm/backup/ and /etc/lvm/archive/. Always ensure these backups are preserved before making changes.
  • Removing or moving the system.devices file is safe as long as a backup is created.

References

Rocky Linux LVM Documentation
vgimport man page