Logical Volume Manager (LVM) is a flexible storage management layer built into the Linux kernel that lets you create, resize, and remove storage volumes without downtime. On RHEL 9, LVM is the default storage layout used during installation and is deeply integrated with the system tooling. Unlike partitions tied directly to physical disks, LVM abstracts storage into logical layers — physical volumes, volume groups, and logical volumes — giving you far greater control over how disk space is allocated and extended. This tutorial walks through the full LVM lifecycle on a RHEL 9 system using a secondary disk.

Prerequisites

  • RHEL 9 system with root or sudo access
  • One or more secondary block devices (e.g., /dev/sdb, /dev/sdc)
  • lvm2 package installed (included by default on RHEL 9)
  • Basic familiarity with Linux partitioning and filesystems

Step 1 — Initialize Physical Volumes

A physical volume (PV) is a block device — a whole disk or a partition — that LVM can use as raw storage. Use pvcreate to initialize one or more devices:

pvcreate /dev/sdb
pvcreate /dev/sdb /dev/sdc   # multiple at once

# Verify
pvs
pvdisplay /dev/sdb

The pvs command gives a concise summary of all PVs on the system, including their size and the volume group they belong to.

Step 2 — Create a Volume Group

A volume group (VG) pools one or more physical volumes into a single storage unit that logical volumes are carved from. Create one named myvg:

vgcreate myvg /dev/sdb
vgcreate myvg /dev/sdb /dev/sdc   # span multiple PVs

# Verify
vgs
vgdisplay myvg

You can extend a VG later by adding more physical volumes with vgextend myvg /dev/sdd.

Step 3 — Create Logical Volumes, Format, and Mount

Logical volumes (LVs) are the usable storage units — equivalent to partitions. Create a 20 GB volume named mydata inside myvg, format it with XFS (the default filesystem on RHEL 9), and mount it:

# Create the LV
lvcreate -L 20G -n mydata myvg

# Format with XFS
mkfs.xfs /dev/myvg/mydata

# Create a mount point and mount
mkdir -p /data
mount /dev/myvg/mydata /data

# Verify
df -h /data
lvs

To make the mount persistent across reboots, add an entry to /etc/fstab. Use the device mapper path or the UUID for reliability:

# Get UUID
blkid /dev/myvg/mydata

# Add to /etc/fstab (replace UUID with actual value)
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  /data  xfs  defaults  0 0

# Test the fstab entry without rebooting
mount -a

Step 4 — Extend a Logical Volume Online

One of LVM’s key advantages is the ability to grow a volume while it is mounted and in use. XFS (used by default on RHEL 9) supports online growth. The -r flag to lvextend resizes the filesystem automatically:

# Extend the LV by 10 GB and resize the XFS filesystem in one command
lvextend -L +10G -r /dev/myvg/mydata

# Or do it in two steps manually
lvextend -L +10G /dev/myvg/mydata
xfs_growfs /data

# Confirm
df -h /data
lvs

Note: XFS filesystems can only be grown, not shrunk. If you need to reduce storage, use ext4 which supports shrinking with resize2fs (the volume must be unmounted first).

Step 5 — Remove a Logical Volume

To cleanly remove an LV, unmount it, remove the /etc/fstab entry, then use lvremove:

# Unmount
umount /data

# Remove the LV (prompts for confirmation)
lvremove /dev/myvg/mydata

# Optionally remove the VG and PVs
vgremove myvg
pvremove /dev/sdb

Step 6 — Create LVM Snapshots for Backups

LVM snapshots capture the state of a logical volume at a point in time using copy-on-write. They are ideal for consistent backups of live filesystems without downtime:

# Create a 5 GB snapshot of mydata named mydata_snap
lvcreate -L 5G -s -n mydata_snap /dev/myvg/mydata

# Mount the snapshot read-only to back it up
mkdir -p /mnt/snap
mount -o ro /dev/myvg/mydata_snap /mnt/snap

# Copy snapshot data to backup destination
rsync -avz /mnt/snap/ /backup/mydata/

# Unmount and remove the snapshot when done
umount /mnt/snap
lvremove /dev/myvg/mydata_snap

Size the snapshot generously — if more data changes than the snapshot has space for, it becomes invalid. Monitor usage with lvs -o +snap_percent.

Conclusion

You have now covered the full LVM workflow on RHEL 9: initializing physical volumes, building volume groups, creating and mounting logical volumes, extending storage online without downtime, safely removing volumes, and using snapshots for consistent backups. LVM gives system administrators the flexibility to manage storage dynamically as needs evolve, all without repartitioning or system restarts.

Next steps: How to Set Up NFS File Sharing on RHEL 9, How to Set Up Software RAID with mdadm on RHEL 9, and How to Automate Backups with rsync and cron on RHEL 9.