Error Codes Wiki

LVM Errors — Logical Volume Manager Troubleshooting Guide

Errorfilesystem

About LVM Errors

Fix LVM errors including volume group not found, logical volume activation failures, snapshot issues, and recovering from corrupted LVM metadata. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.

Here are the key things to understand: 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. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.

The most common reasons this occurs include: 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. Identifying the root cause is the first step toward finding the right solution.

To resolve this, follow these recommended steps: Scan for physical volumes: pvscan to detect all PVs on the system. Check volume group status: vgdisplay to see VG status and free space. Activate LVs: vgchange -ay vgname to activate all LVs in the volume group. Restore LVM metadata: vgcfgrestore vgname to restore from /etc/lvm/backup/. Extend a full thin pool: lvextend -L +10G vgname/thinpool. Force activation of incomplete VG: vgchange -ay --partial vgname (caution: may have data loss). If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.

This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.

Quick Answer

How do I extend a logical volume and its filesystem?

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.

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.