Error Codes Wiki

LVM Errors — Logical Volume Manager Troubleshooting Guide

Errorfilesystem

Overview

Fix LVM errors including volume group not found, logical volume activation failures, snapshot issues, and recovering from corrupted LVM metadata.

Key Details

  • LVM (Logical Volume Manager) provides flexible disk management with physical volumes (PV), volume groups (VG), and logical volumes (LV)
  • LVM metadata is stored at the beginning of each PV and backed up in /etc/lvm/backup/
  • Inactive LVs must be activated before use: lvchange -ay /dev/vgname/lvname
  • LVM snapshots allow point-in-time copies but consume space for changed blocks
  • LVM thin provisioning allows over-provisioning but can fail if the pool runs out of space

Common Causes

  • Physical volume not detected after hardware change or cable issue
  • LVM metadata corrupted by power failure during a write operation
  • Volume group incomplete because a PV is missing (degraded RAID or removed disk)
  • Thin pool full causing all thin LVs to become read-only
  • LV not activated during boot due to missing initramfs configuration

Steps

  1. 1Scan for physical volumes: pvscan to detect all PVs on the system
  2. 2Check volume group status: vgdisplay to see VG status and free space
  3. 3Activate LVs: vgchange -ay vgname to activate all LVs in the volume group
  4. 4Restore LVM metadata: vgcfgrestore vgname to restore from /etc/lvm/backup/
  5. 5Extend a full thin pool: lvextend -L +10G vgname/thinpool
  6. 6Force activation of incomplete VG: vgchange -ay --partial vgname (caution: may have data loss)

Tags

lvmlogical-volumevolume-groupphysical-volumedisk-management

Related Items

More in Filesystem

Frequently Asked Questions

Extend the LV: lvextend -L +20G /dev/vgname/lvname. Then resize the filesystem: resize2fs /dev/vgname/lvname (ext4) or xfs_growfs /mountpoint (XFS). XFS can only grow, not shrink.