Updated for 2026: originally written for RHEL 7 on vSphere. The dance hasn’t changed — grow the virtual disk, make the guest see it, grow the partition (if any), grow the filesystem — but the tooling is cleaner now (growpart, lvextend -r, XFS as the EL default). This version covers all three layouts you’re likely to meet on RHEL/AlmaLinux 9, online, without a reboot.
Step 0, whatever your layout: grow the disk and rescan
First expand the virtual disk in your hypervisor or cloud console (vSphere: edit VM settings; cloud: modify the volume). The guest won’t notice until you rescan the SCSI bus:
[root@server ~]# echo "- - -" > /sys/class/scsi_host/host0/scan [root@server ~]# lsblk
lsblk should now show the disk at its new size. (On NVMe cloud volumes, the new size usually appears on its own.)
Now find your layout — it decides everything else:
[root@server ~]# lsblk -f
Layout A: filesystem directly on the disk (the original case)
No partition, no LVM — lsblk -f shows the filesystem (ext4 or xfs) on the disk itself, e.g. sdc. Grow the filesystem in place, online, even if it’s the root filesystem:
# ext4 [root@server ~]# resize2fs /dev/sdc # xfs (XFS grows by mount point, not device) [root@server ~]# xfs_growfs /
Layout B: a plain partition
Grow the partition into the new space first (growpart is in the cloud-utils-growpart package), then the filesystem:
[root@server ~]# growpart /dev/sda 3 # partition 3 on /dev/sda [root@server ~]# resize2fs /dev/sda3 # ext4 [root@server ~]# xfs_growfs / # xfs, if that's what's mounted
Layout C: LVM (the EL default install)
Three layers, one command each — and note that modern lvextend can grow the filesystem for you with -r:
[root@server ~]# growpart /dev/sda 3 # if the PV sits on a partition [root@server ~]# pvresize /dev/sda3 # physical volume takes the new space [root@server ~]# lvextend -r -l +100%FREE /dev/mapper/almalinux-root [root@server ~]# df -h / # done — new size, no reboot
The -r flag handles resize2fs/xfs_growfs for whichever filesystem the logical volume carries, which is why this layout is the least error-prone of the three.
Verify
[root@server ~]# df -hT /
Filesystem size should match the new disk size (minus partition/LVM overhead). If df didn’t move but lsblk did, you grew a layer and skipped the next one down — re-check which layout you actually have.
Notes
- XFS only grows. There is no supported shrink for XFS. ext4 can shrink, offline only, and it’s the kind of operation you rehearse on a snapshot first.
- Snapshots: hypervisor snapshots block disk expansion in vSphere — consolidate them before you start, not after an error message.
- Backup first anyway. Growing is one of the safest storage operations there is, and “safest” is not “safe”. A snapshot or backup you never need costs less than the alternative.
Running your own server? These guides assume you have a Linux box somewhere — see our guide to choosing a VPS in 2026 for the 7 specs that actually matter before you spin one up.
