How disks, partitions and volumes fit together
The layers between a physical disk and a folder you can write to: disks, partitions, LVM, file systems and mount points.
The layers
Between the hardware and a folder like /data there are up to five layers. Each one has its own tool.
flowchart LR
D["Disk
/dev/sdb"] --> P["Partition
/dev/sdb1"]
P --> PV["LVM
PV → VG → LV"]
PV --> FS["File system
ext4 / XFS"]
FS --> M["Mount point
/data"]
| Layer | What it is | Tool |
|---|---|---|
| Disk | The physical or virtual drive: /dev/sda, /dev/nvme0n1, /dev/vda | lsblk |
| Partition | A slice of a disk with fixed start and end: /dev/sda1 | parted, fdisk, growpart |
| LVM (optional) | A flexible layer that pools disks and cuts them into volumes | pvcreate, vgcreate, lvcreate |
| File system | The structure that stores files and folders | mkfs.ext4, mkfs.xfs |
| Mount point | The folder where the file system appears | mount, /etc/fstab |
You can skip layers. A data disk can be formatted without a partition or LVM. But the order always stays the same, and to grow something you grow it bottom-up: disk, then partition, then LVM, then the file system.
Partitions
A partition table at the start of the disk describes the slices. Use GPT (modern, many partitions, disks over 2 TB). The old MBR/msdos format is only for legacy systems.
Partitions are rigid: a partition can only grow into free space directly behind it.
LVM: the flexible layer
LVM (Logical Volume Manager) is the reason Ubuntu Server’s default install is easy to grow. It has three parts:
| Part | Short | Think of it as |
|---|---|---|
| Physical Volume | PV | A disk or partition handed to LVM |
| Volume Group | VG | A storage pool built from one or more PVs |
| Logical Volume | LV | A “virtual partition” cut out of the pool, where the file system goes |
flowchart TB
subgraph VG["Volume Group: ubuntu-vg"]
PV1["PV /dev/sda3"]
PV2["PV /dev/sdb"]
end
VG --> LV1["LV ubuntu-lv
mounted at /"]
VG --> LV2["LV data
mounted at /data"]
VG --> F["free space"]
Why use it?
- Grow online: add a disk to the pool and extend a volume while it is mounted.
- Span disks: one volume can be bigger than any single disk.
- Snapshots: freeze a volume’s state before an upgrade.
LVM volumes show up as /dev/VGNAME/LVNAME and /dev/mapper/VGNAME-LVNAME. Both point to the same thing.
Note: The Ubuntu installer creates
ubuntu-vg/ubuntu-lvbut often uses only part of the disk (max. 100 GB by default). Checksudo vgs: the free space can be added in one command. See Extend a disk or volume.
File system and mount
A fresh partition or LV is just empty blocks. Formatting (mkfs) writes a file system onto it. Mounting attaches it to a folder. Mounts made with mount are gone after a reboot; to make them permanent, add them to /etc/fstab.
Which file system? See File systems compared.