CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

Extending LVM Volumes and Filesystems

The objective is one line and the mistake is universal: growing the logical volume does not grow the filesystem on it. That is captured - a 300 MiB volume becomes 600 MiB while `df` still reports it full at 236 MiB - and then fixed two ways, including the single flag that does both.

File Systems Guide 40 of 67 Intermediate

Written against the versions above. **`lvextend -r`** resizes the filesystem as well, calling `xfs_growfs` or `resize2fs` as appropriate. It is the form to memorise: it works while mounted, it cannot be done in the wrong order, and it removes the need to remember which tool goes with which filesystem.

Every command on this page runs on RHCSA-A01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0 (Coughlan)Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

Before you start

  1. A filesystem that has run out

  2. Growing the volume alone changes nothing

  3. Growing the filesystem

  4. The one command that does both

  5. Filling the group, and what happens then

  6. ext4 uses a different tool

Official sources