Hands-on Lab·Linux Foundation Certified System Administrator
LVM, from physical volume to logical
LVM puts a layer between disks and filesystems so that neither has to match the other. This guide builds the whole stack on two loop devices - physical volume, volume group, logical volume, filesystem - and shows what each layer is actually for.
Storage Guide 33 of 38 Intermediate
- OSUbuntu 26.04 LTS
- LVM2.03.31 (Ubuntu) / 2.03.36 (AlmaLinux)
- nftables1.1.6 (Ubuntu) / 1.1.5 (AlmaLinux)
- TimeAbout 18 min
LVM 2.03.31 on Ubuntu, 2.03.28 on RHEL. The commands are identical. Ubuntu's own installer put root on LVM here, which is why ubuntu-vg appears alongside the one this page creates.
- Firewallufw 0.36.2 enabled but reporting inactive / firewalld active
- Network confignetplan + systemd-networkd / NetworkManager 1.56.0
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LFCS-A01 | 192.168.0.70 | Ubuntu 26.04 LTS | Primary host - most guides run only here | 2 Core | 4 GB | 50 GB |
This guide includes
Use this for the layer between disks and filesystems. This matters because LVM is what lets a filesystem grow later, without the disk and the filesystem having to match each other.
- building on two devices, which LVM does not distinguish between
- claiming both as physical volumes
- pooling one into a volume group, and reading the extent size
- slicing a logical volume, formatting it and mounting it
Before you start
-
Two devices to build on
-
Physical volumes
-
A volume group, and the extent
-
A logical volume, and a filesystem on it