Pcornel
Storage

Logical Volume Management

Cheat sheet · https://pcornel.dk/topic.php?topic=395

Back to the Topic

Answer

LVM maps one or more physical volumes into a volume group, allocates physical extents to logical volumes, and exposes those logical volumes as block devices to filesystems, databases, virtual machines or other consumers. Availability and capacity must be proven at every layer rather than inferred from one LVM object.

Remember

  • LVM ≠ filesystem.
  • Volume group capacity ≠ filesystem free space.
  • Logical volume size ≠ allocated application data.
  • LVM redundancy depends on the underlying layout; LVM itself is not automatically RAID or backup.

First checks

  • pvs; vgs; lvs — LVM summary
  • lvs -a -o +devices — LV to PV mapping
  • vgcfgbackup — config backup

Commands

pvs
Local state
vgs
lvs -a -o +devices

Verify in this order

disks/partitions → PV → VG → LV → filesystem

Where it usually breaks

First mismatch in member media → metadata/layout → allocation/placement → redundancy/recovery → logical object → consumer; preserve identity/pre-state before mutation.

Logical Volume Management LVM map

LVM boundaryWhat to verifyProof limit
Identity / mappingPV, VG, LV/thin-pool identity, size, membership and activation/mappingObject presence alone does not prove upper filesystem or lower path health
Allocation / capacityVG extents, LV size, thin data + metadata usage and upper-consumer capacityFree capacity at one layer does not prove allocation succeeds end to end
Failure boundaryAn active logical volume proves the mapped block device exists at that moment; it does not prove the filesystem is mounted, the application is healthy, all PV paths are stable, redundancy exists or backups are recoverable.Correlate LVM evidence with both consumer and lower block path before recovery
AcceptanceHealthy evidence: expected PVs belong to the intended VG, the VG is complete, target LVs are active with expected mappings, allocation headroom is understood and representative consumer I/O plus read-back succeeds.Close only after the original workload and independent read-back/consistency check succeeds

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=395

Confirmation

Confirm action

Continue?