一、xfs文件系統不支持減容操作,官方說法 :https://xfs.org/index.php/XFS_FAQ#Q:_Is_there_a_way_to_make_a_XFS_filesystem_larger_or_smaller.3F
Q: Is there a way to make a XFS filesystem larger or smaller?
You can NOT make a XFS partition smaller online. The only way to shrink is to do a complete dump, mkfs and restore.
二、新裝系統自動分區方式,需求縮減/home分區容量。
1、系統環境
系統版本: CentOS Linux release 7.6.1810 (Core)
內核版本: 3.10.0-957.1.3.el7.x86_64
容量:11T /home xfs文件系統分區
2、安裝xfsdump套件備份/home分區文件
yum -y install xfsdump
xfsdump -f /home.xfsdump /home
...
->home
...
->home
...
xfsrestore: Restore Status: SUCCESS
3、減容操作
umount /home
lvreduce -L 2048G /dev/cl/home
4、格式化
5、恢復/home分區數據
6、查看減容效果