Hands-on Lab·LPIC-2
Building LVM on a real disk
The whole LVM stack on a genuinely spare 5 GB disk: physical volume, volume group, logical volume, filesystem, mount. Then the operation that is the reason LVM exists - extending a mounted filesystem while it stays in use - and the two-step nature of it that catches people out.
201: Filesystems and Storage Guide 6 of 29 Intermediate
- OSUbuntu 26.04 LTS
- Kernel7.0.0-30-generic
- systemd259
- Block devicesone 50 GB disk
- TimeAbout 20 min
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| LPIC2-A01 | 192.168.0.78 | Ubuntu 26.04 LTS | Primary service host - BIND, Apache, Samba, Postfix. Topic 204 RAID runs on loop devices; this machine has no spare disk | 2 Core | 4 GB | 50 GB |
This guide includes
Use this for the whole LVM stack on a genuinely spare disk. This matters because proving the disk is safe before destroying it is the habit worth building - everything after that step is reversible, and that step is not.
- proving the disk is safe before you destroy it
- building the two layers, physical volume then volume group
- making a logical volume, a filesystem and a mount
- growing it while it stays mounted, which is what LVM exists for
Before you start
- the-lab-a-service-needs-a-client
-
Prove the disk is safe before you destroy it
-
Physical volume, then volume group
-
A logical volume, a filesystem, a mount
-
Growing it while it stays mounted