The complete LVM disk-expansion flow: hot-adding a disk, vgextend, lvextend -r growing xfs online (field record)
What you will learn
Section titled “What you will learn”What to do when the disk fills up. This page is a complete field record of hot-adding a disk → growing online → taking effect without a reboot, covering how to read the factory default layout and xfs’s boundary.
First, understand the factory layout
Section titled “First, understand the factory layout”lsblk /dev/sdasda├─sda1 1M BIOS Boot├─sda2 2G /boot ← standard partition (not in LVM)└─sda3 18G LVM PV ← VG "ol"vgs && lvs# VG #PV #LV VSize VFree# ol 1 2 18.00g 0g# LV root 16G / swap 2GKey points: the VG is called ol (the counterpart of RHEL’s rhel); /boot sits outside it, so growing the root disk does not touch the boot path; there is no separate /home LV under root (unlike Rocky/Alma’s autopart).
Four steps to grow (all online)
Section titled “Four steps to grow (all online)”# 1. Create a PV on the new disk (/dev/sdb here is the hot-added 5G disk)pvcreate /dev/sdb# Physical volume "/dev/sdb" successfully created.
# 2. Add it to the existing VGvgextend ol /dev/sdb# Volume group "ol" successfully extended.vgs --units g# ol 2 2 22.99g 5.00g
# 3. Grow the root LV and the filesystem together (-r = invokes xfs_growfs automatically)lvextend -r -l +100%FREE /dev/ol/root# xfs_growfs done# Logical volume ol/root successfully resized.
# 4. Verifydf -h /# /dev/mapper/ol-root 21G 2.7G 19G 13% /Measured: 16G → 21G with no reboot, nothing unmounted. Hot-adding disks on virtualization platforms (PVE qm set <vmid> --scsi1 local-lvm:5) and cloud-volume expansion (OCI block volume) follow the same flow; adding a physical disk works identically.
Adding only part of it: a fixed increment
Section titled “Adding only part of it: a fixed increment”lvextend -r -L +5G /dev/ol/root # grow by 5Glvextend -r -L 20G /dev/ol/root # grow to 20G (absolute)The xfs boundary: grow only, never shrink
Section titled “The xfs boundary: grow only, never shrink”xfs grows online effortlessly, but shrinking does not exist. For “root is 100G, too big, want 40G”, the correct answer on xfs is backup → rebuild → restore. If shrinking is a hard requirement, choose ext4 for that volume at install time (the filesystem dropdown in manual partitioning). OL defaults everything to xfs for performance and large-capacity scenarios — understand your workload before deciding.
Growing swap along the way
Section titled “Growing swap along the way”The added disk can also grow swap (or host a swapfile):
lvextend -r -L +2G /dev/ol/swap # xfs is wrong for swap; the swap LV uses mkswap formatmkswap /dev/ol/swap && swapon -aEvidence and limits on this page
Section titled “Evidence and limits on this page”- Measured: the default layout, the full four-step expansion (online, no reboot), and the xfs_growfs automation (E3 run record);
- Not measured: striped PVs across disks, LV migration (pvmove) — advanced operations scenarios to be measured and added later;
- Sources: the OL 10 documentation storage chapter,
lvm(8),xfs_growfs(8).