Updated: 28 September 2026 · Applies to: LVM 2.03 and xfsprogs/xfsdump on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13
XFS file systems cannot be shrunk; there is no command for it. To make an LVM volume that holds XFS smaller, you back up the data, reduce the volume, create a new XFS file system on it and restore the data. We tested the steps below on AlmaLinux 9 with LVM 2.03.33, including the --fs ignore option that current LVM versions need.
Before you start
- The file system will be unmounted for the whole procedure, so plan downtime. This method does not work for the root file system (
/) of a running system; for that, boot from rescue media, or move the data to a new, smaller volume instead. - You need free space elsewhere for the backup, at least the size of the used data (
df -h). - Stop the services that use the file system.
- Install the tools:
dnf install xfsdumporapt install xfsdump.
Shrink the volume
The example shrinks /dev/vg00/data, mounted on /data, to 50 GB.
- Back up the file system to a file on another disk:
xfsdump -l 0 -L data -M backup -f /backup/data.xfsdump /data
It must end with "Dump Status: SUCCESS". Copy the file off the server too if the data matters. - Unmount it:
umount /data - Reduce the logical volume. Choose a size larger than the used data:
lvreduce --fs ignore -L 50G /dev/vg00/data
Current LVM (2.03.17 and later, on AlmaLinux, Rocky Linux and RHEL 9 and 10, Debian 13 and Ubuntu 26.04) refuses to reduce a volume that contains XFS, with "File system reduce is required and not supported (xfs)".--fs ignoretells it you will re-create the file system yourself. Ubuntu 24.04 has LVM 2.03.16, which does not know this option; leave it out there. - Create a new XFS file system on the smaller volume:
mkfs.xfs -f /dev/vg00/data
- Mount it again. If
/etc/fstabrefers to the file system by UUID, update the UUID first: the new file system has a new one (seeblkid /dev/vg00/data).mount /data
- Restore the data:
xfsrestore -f /backup/data.xfsdump /data
It must end with "Restore Status: SUCCESS". - Check the size and the data, then start your services again:
df -h /data
The space you freed is now free in the volume group (vgs) and can be given to another volume with lvextend -r.
Common problems
- "File system reduce is required and not supported (xfs)": add
--fs ignoreas in step 3. - "lvreduce: unrecognized option '--fs'": your LVM is older than 2.03.17; run the command without it.
- mount fails after reboot: the UUID in
/etc/fstabis the old one. Update it fromblkid.
To grow an XFS file system instead, see how to grow an XFS file system with xfs_growfs.
Official documentation: lvreduce manual page and xfsdump manual page.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
