Shrinking an LVM logical volume reclaims extents for the volume group, but the filesystem must fit inside the new LV size before the block device is reduced. Reducing the LV first can remove blocks that still hold metadata or files, so the safe path starts with the mounted filesystem, its type, and a current backup.
For a shrink-capable ext4 volume, lvreduce with --resizefs calls the filesystem resize step before changing the logical-volume size. resize2fs can shrink unmounted ext2, ext3, and ext4 filesystems, and its minimum-size estimate helps confirm that the requested target leaves enough room.
Do not shrink a mounted application volume, root filesystem, XFS, GFS2, encrypted stack, database volume, or cluster volume without a maintenance and recovery plan. XFS and GFS2 do not support in-place shrinking; recreate a smaller filesystem and restore data instead of forcing lvreduce against the existing LV.
$ findmnt /srv/data --output TARGET,SOURCE,FSTYPE,SIZE,USED,AVAIL TARGET SOURCE FSTYPE SIZE USED AVAIL /srv/data /dev/mapper/vgdata-data ext4 973.4M 288K 905.9M
Replace /srv/data with the mount point to shrink. The SOURCE value is the LV device, and FSTYPE must be a filesystem that supports shrinking before continuing.
Shrinking storage is destructive when the target size is wrong, the wrong LV is selected, or the filesystem is damaged. Keep recovery media or a separate rollback path available before unmounting production data.
Related: How to create an LVM snapshot
$ sudo umount /srv/data
Stop the application first if umount reports that the target is busy. Use an offline root-filesystem procedure instead of unmounting / from the running system.
Related: How to grow the root filesystem on LVM
$ sudo e2fsck -f /dev/vgdata/data e2fsck 1.47.2 (1-Jan-2025) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/vgdata/data: 14/65536 files (0.0% non-contiguous), 13021/262144 blocks
Replace /dev/vgdata/data with the LV path from the previous step. Stop and repair the filesystem before resizing if the check reports errors that need operator decisions.
$ sudo resize2fs -P /dev/vgdata/data resize2fs 1.47.2 (1-Jan-2025) Estimated minimum size of the filesystem: 13046
The estimate is in filesystem blocks and is not a target size by itself. Choose a final LV size well above the used data plus filesystem metadata, because the minimum estimate can be too low on some filesystems.
$ sudo lvreduce --resizefs --size 768M /dev/vgdata/data File system ext4 found on vgdata/data. File system size (1.00 GiB) is larger than the requested size (768.00 MiB). File system reduce is required using resize2fs. File system fsck will be run before reduce. Reducing file system ext4 to 768.00 MiB (805306368 bytes) on vgdata/data... e2fsck /dev/vgdata/data /dev/vgdata/data: 14/65536 files (0.0% non-contiguous), 13021/262144 blocks e2fsck done resize2fs /dev/vgdata/data 786432k resize2fs 1.47.2 (1-Jan-2025) Resizing the filesystem on /dev/vgdata/data to 196608 (4k) blocks. The filesystem on /dev/vgdata/data is now 196608 (4k) blocks long. resize2fs done Reduced file system ext4 on vgdata/data. Size of logical volume vgdata/data changed from 1.00 GiB (256 extents) to 768.00 MiB (192 extents). Logical volume vgdata/data successfully resized.
--size 768M sets the final LV size in this example. Do not rely on LVM confirmation prompts or --test as proof that the shrink is safe; the filesystem must already be backed up and shrinkable.
$ sudo mount /dev/vgdata/data /srv/data
Use sudo mount /srv/data when /etc/fstab already contains the correct device or UUID entry for the mount point.
$ sudo lvs --options lv_name,vg_name,lv_size,lv_attr /dev/vgdata/data LV VG LSize Attr data vgdata 768.00m -wi-ao----
$ df -h /srv/data Filesystem Size Used Avail Use% Mounted on /dev/mapper/vgdata-data 722M 288K 668M 1% /srv/data
$ cat /srv/data/reports/summary.txt keep this file after shrink
If the mount, size check, or file read fails, leave the volume unmounted and restore from the backup or snapshot instead of retrying a smaller target.