Linux LVM, RAID, and Encryption Cheat Sheet/Shrink an ext filesystem before LV reduction

For ext filesystems, shrink the filesystem before shrinking the LV.

Section: LVM Growth and Snapshots

Shrink an ext filesystem before LV reduction

bash
bash
sudo resize2fs /dev/vgdata/lvdata 45G
Explanation

For ext filesystems, shrink the filesystem before shrinking the LV.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing LVM Growth and Snapshots
Grow an ext filesystem after LV extension
Expand an ext filesystem to fill the larger LV.
OpenIn sheetbashsame section
Reduce an LV size
Dangerous if done without shrinking the filesystem first.
OpenIn sheetbashsame section
Add a PV to an existing VG
Increase free capacity in a volume group.
OpenIn sheetbashsame section
Extend an LV by fixed size
Grow the logical volume size.
OpenIn sheetbashsame section
Extend an LV and filesystem together
Grow both the LV and the contained filesystem when supported.
OpenIn sheetbashsame section
Grow XFS online
Expand an XFS filesystem using the mounted path.
OpenIn sheetbashsame section