LVM & Disk Management
Physical volumes, volume groups, logical volumes, snapshots, thin provisioning, and live resize.
Overview
LVM (Logical Volume Manager) adds a layer of abstraction between physical storage and filesystems. Instead of putting a filesystem straight on one disk, you pool disks together and cut flexible volumes out of the pool.
Three-Tier Hierarchy
LVM stacks three layers, each built from the one below it.
- Physical Volumes (PVs) are raw disks initialized for LVM: pvcreate /dev/sdb.
- Volume Groups (VGs) pool one or more PVs: vgcreate myvg /dev/sdb /dev/sdc.
- Logical Volumes (LVs) are virtual partitions cut from a VG: lvcreate -L 100G -n data myvg.
The LVM Architecture figure draws this stack for three disks.
Key concepts
- Physical Volume (PV)
- Volume Group (VG)
- Logical Volume (LV)
- LVM snapshot
- pvmove
Interview questions
- Your /data partition is 95% full. How do you extend it online without restarting the service?
Sign up free to read the full topic
More Linux topics
Start free on Cariara · Coding problems · System design studio