LVM layers and growth plan
Understand PV -> VG -> LV before extending storage.
lvs -a
30 min read, 35 min lab
operator
LVM has physical volumes, volume groups, and logical volumes. Extending an LV is only part of growth; the filesystem may also need resizing. The safest plans prove free extents, target LV, filesystem type, and rollback or backup state.
`/var` needs more space. The host uses LVM and you need a written plan before touching it.
Worked command
$ pvs$ vgs$ lvs -a -o +devices$ lvextend -r -L +10G /dev/vg0/var
Do not run `pvcreate` or `lvextend` until target devices and backups are verified.
List PVs, VGs, LVs, free space, devices, filesystem, and exact target path.
You run lvextend -L +10G on an LV and it succeeds, but /var still shows no extra space. What was missed?
Show the answer
Correct: A. The logical volume grew but the filesystem on it was never resized
Extending the LV only enlarges the block container; the filesystem must also grow, which is exactly what the -r flag in lvextend -r does in one step. Assuming the space appears automatically is the classic LVM growth mistake.
Practice checklist
- Use a disposable VM or sample LVM output.
- Draw PV -> VG -> LV.
- Write a growth plan without executing it.
Deliverable evidence
- A layer map and a no-execute growth plan.
shows: How a mount point sits on a filesystem, on an LV stacked through VG and PV onto a block device, plus where growth and snapshots act.
does not prove: It is a schematic of the relationships, not evidence of your host's actual layout — only lsblk, findmnt, blkid, and lvs output prove that.
Commit these to memory, then drill them until recall is automatic.
cue In lvextend -r, what does -r do?
show recall target
Resizes the underlying filesystem (resize2fs for ext4, xfs_growfs for xfs) to match the new LV size