LVM Volume Groups
The middle layer, and the one that makes LVM worth using: a volume group can grow by absorbing another disk while everything above it stays running. The physical extent size is set here and cannot be changed afterwards, which is why it gets a step.
Local Storage Guide 33 of 67 Intermediate
- OSRHEL 10.0
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 11 min
The default physical extent is 4 MiB, set with -s at vgcreate time. It is the granularity of every allocation in the group and cannot be changed once the group exists, so a group intended for very large volumes is usually created with a larger extent.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
This guide includes
Use this for the layer that makes LVM worth using. This matters because a volume group pools several devices into one allocation space - and the extent is the unit everything gets rounded to.
- creating a volume group
- growing it by adding another device
- seeing that extents are the unit of allocation
- shrinking it, and then removing it
Before you start
- Two physical volumes -
guide 32creates them. - Every destructive command on this page names a
/dev/sdadevice. On this machine the operating system is entirely on/dev/sdb. Check yours before running anything here - the first step shows how.
-
Creating a group
-
Growing it
-
Extents are the unit of allocation
-
Shrinking and removing