系统是xfs文件格式。/root空间不够了。必须对空间进行调整,悲剧的是xfs只能增加空间,不能缩减空间,必须曲线救国了。
查看一下,缺省有两个lvm的分区
1/dev/mapper/centos-root 40G
2/dev/mapper/centos-home 20G
只能减小home分区,再增大root分区了。
先备份home分区,并缩小到2G:
1# yum -y install xfsdump
2# xfsdump -f /home.xfsdump /home
3please enter label for this dump session (timeout in 300 sec)
4-> home
5please enter label for media in drive 0 (timeout in 300 sec)
6-> home
7# umount /home
8# lvreduce -L 2G /dev/mapper/centos-home
9Do you really want to reduce home? [y/n]: y
然后扩充root分区:
1# lvextend -L +18G /dev/mapper/centos-root
2# xfs_growfs /dev/mapper/centos-root
最后恢复home分区
1# mkfs.xfs -f /dev/mapper/centos-home
2# mount /home
3# xfsrestore -f /home.xfsdump /home
搞定