LVM — Logical Volume Manager
The problem LVM solves
You install Linux. You give /home 200 GB and /var 50 GB. Six months later /home is full and /var has 40 GB free. With traditional partitions, you’re stuck. You cannot just move space from one partition to another — the boundaries are fixed.
LVM removes that limitation. It sits between your physical disks and your filesystems, turning rigid fixed-size partitions into flexible pools you can resize, combine, snapshot, and move at will — usually without even unmounting.
Three ways to understand LVM
Pick whichever one clicks for you:
🧱 The Lego analogy
Imagine your hard drives as boxes of Lego bricks. Each box has a fixed number of bricks — that’s your disk space.
Without LVM: You build a house using only one box at a time. Once that box is empty, you can’t add more bricks to the house — you’d have to knock it down and start again with a bigger box.
With LVM: You tip all your boxes into one giant pile (the Volume Group). Then you build whatever you want from that pile. You need your house bigger? Just grab more bricks from the pile. You bought a new box of bricks? Tip it into the pile and keep going.
| LVM term | Lego equivalent |
|---|---|
| Physical disk | A box of Lego |
| Physical Volume (PV) | That box, opened and ready to contribute |
| Volume Group (VG) | The big communal pile of all your bricks |
| Logical Volume (LV) | The thing you built from the pile |
💧 The water tank analogy
Think of your disks as individual water tanks — a 500 GB tank, a 1 TB tank, a 2 TB tank — all sitting separately.
Without LVM: Each application gets piped to exactly one tank. When that tank runs dry, it’s done, even if the other tanks are half full.
With LVM: You connect all the tanks together into one reservoir (Volume Group). You then run separate pipes (Logical Volumes) out of the reservoir — one pipe for /home, one for /var, one for /data. If one pipe needs more water, you open a valve. If the reservoir runs low, you add another tank.
🗂️ The whiteboard analogy
Picture a big whiteboard (your Volume Group). You divide it with tape into sections: one section labelled /home, one /var, one /data.
Without LVM: The tape is glued permanently. Moving it means wiping everything and starting fresh.
With LVM: The tape is just marker lines. Move them any time. The data stays where it is; you just shift the boundary.
The three building blocks
Physical Disk → Physical Volume (PV) → Volume Group (VG) → Logical Volume (LV)
/dev/sda /dev/sdb tagged for LVM combined pool what you use
| Layer | What it is | Created with |
|---|---|---|
| Physical Volume (PV) | A disk (or partition) that LVM knows about | pvcreate |
| Volume Group (VG) | One big pool made from one or more PVs | vgcreate |
| Logical Volume (LV) | A slice of the VG — this is what you format and mount | lvcreate |
Why use LVM?
| Capability | Without LVM | With LVM |
|---|---|---|
| Resize a partition | Dangerous, often requires reboot | lvextend + resize2fs, online |
| Span two disks as one | Not possible | Yes — add a PV to a VG |
| Take an instant backup snapshot | No | lvcreate -s |
| Move data to a new disk | Manual, risky | pvmove — LVM does it live |
| Use drives of different sizes | Wastes space | Perfectly fine |
Quick overview diagram
Where to go next
| Page | What you’ll learn |
|---|---|
| The Three Layers | PVs, VGs, and LVs explained with diagrams |
| Your First LVM Setup | Step-by-step: create PV → VG → LV → mount |
| Resizing Volumes | Grow live, shrink safely, add new disks |
| Snapshots | Instant backups with copy-on-write |
| LVM with SAN / LUNs on Proxmox | iSCSI, Fibre Channel, multipath, Proxmox storage |
| VMware vs Proxmox Storage | Concept mapping: VMFS, VMDK, RDM, vSAN → Proxmox |
| Migrating VMs from VMware | OVA export, qemu-img, virt-v2v, SAN reuse |
| Cheat Sheet | All commands in one place |