Logical Volume Management
Cheat sheet · https://pcornel.dk/topic.php?topic=395
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 summarylvs -a -o +devices— LV to PV mappingvgcfgbackup— config backup
Commands
pvs- Local state
vgslvs -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 boundary | What to verify | Proof limit |
|---|---|---|
| Identity / mapping | PV, VG, LV/thin-pool identity, size, membership and activation/mapping | Object presence alone does not prove upper filesystem or lower path health |
| Allocation / capacity | VG extents, LV size, thin data + metadata usage and upper-consumer capacity | Free capacity at one layer does not prove allocation succeeds end to end |
| Failure boundary | An 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 |
| Acceptance | Healthy 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