Expanding Storage on RHEL Using Logical Volume Management (LVM)
Learn how to use RHEL Logical Volume Management (LVM) to expand storage online. This guide covers PV, VG, and LV configuration with specific commands for XFS and EXT4 filesystems.
03 Jan 2026, 17:54 UTC

The Problem: Fixed Partition Limitations
Standard disk partitions are rigid. If a database or application log directory fills up, expanding a standard partition often requires unmounting the drive, risking downtime, or moving data to a new disk entirely. Red Hat Enterprise Linux (RHEL) uses Logical Volume Management (LVM) to solve this by adding a layer of abstraction between the physical hardware and the filesystem.
The primary takeaway is that LVM allows you to pool multiple physical disks into a single storage reservoir, enabling you to resize volumes online without taking services offline.
LVM Architecture Overview
To manage LVM, you must understand the three-layer hierarchy:
- Physical Volume (PV): A raw disk or partition (e.g.,
/dev/sdb) initialized for LVM use. - Volume Group (VG): A pool created by combining one or more PVs. Think of this as a virtual disk.
- Logical Volume (LV): A slice of the VG that acts as a virtual partition where you format a filesystem (e.g., XFS or EXT4).
Prerequisites
- A RHEL system (Version 7, 8, or 9) with root or sudo privileges.
- An unallocated physical disk or a new virtual disk attached to the system.
- Knowledge of the target mount point that requires more space.
Procedure: Expanding a Logical Volume
This guide covers the scenario where you have added a new physical disk to a server and need to extend an existing volume.
Step 1: Initialize the New Physical Volume
Run this command on the host terminal to prepare the new disk for LVM. Replace /dev/sdb with your actual device identifier.
sudo pvcreate /dev/sdb
Risk: Running this on a disk containing data will overwrite the partition table.
Step 2: Extend the Volume Group
Add the new PV to your existing Volume Group. Use vgs to find the name of your VG (e.g., vg_data).
sudo vgextend vg_data /dev/sdb
Step 3: Expand the Logical Volume
Increase the size of the specific LV. The following example adds 50GB to the volume named lv_storage.
sudo lvextend -L +50G /dev/vg_data/lv_storage
Alternatively, to use all remaining free space in the VG, use -l +100%FREE instead of -L +50G.
Step 4: Resize the Filesystem
The LV is now larger, but the filesystem inside it does not yet recognize the new space. RHEL defaults to XFS, which supports online growing.
sudo xfs_growfs /mnt/data
Note: If you are using EXT4, use sudo resize2fs /dev/vg_data/lv_storage.
Comparison: XFS vs. EXT4 in LVM
| Feature | XFS (RHEL Default) | EXT4 |
|---|---|---|
| Online Expansion | Supported | Supported |
| Online Shrinking | Not Supported | Supported (Offline) |
| Growth Command | xfs_growfs |
resize2fs |
Verification and Diagnostics
To confirm the operation was successful, run these checks in order:
- Physical Layer: Run
sudo pvsto ensure the new disk is listed and assigned to the correct VG. - Group Layer: Run
sudo vgsto verify the total pool size has increased. - Logical Layer: Run
sudo lvsto see the new size of the specific LV. - Filesystem Layer: Run
df -h /mnt/data. The "Size" column should reflect the added capacity.
Limitations and Recovery
Snapshot Space: Do not allocate 100% of your Volume Group to Logical Volumes if you plan to use LVM snapshots. Snapshots require unallocated space in the VG to store the "diff" data between the original volume and the snapshot.
Rollback:LVM expansion is a non-destructive additive process. However, if you added a disk by mistake, you can remove it only if the disk contains no active data chunks. Use pvmove to migrate data off the disk first, then vgreduce to remove the PV from the group.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.