标签:shadow ase logic dump term https umount .com dia
前提:XFS是centos7 预装的操作系统,XFS只能扩大不能缩小,所以需要利用xfsdump / xfsrestore 工具在必须缩小lvm 的情况下,备份与还原资料。yum -y install xfsdump
xfsdump -f /home.xfsdump /home
please enter label for this dump session (timeout in 300 sec)
-> home
please enter label for media in drive 0 (timeout in 300 sec)
-> home
step3:缩减/dev/mapper/centos-home大小
卸載 /home
umount /home
將 /home 的 Logical Volume 縮減為 5GB
lvreduce -L 5G /dev/mapper/centos-home
Do you really want to reduce home? [y/n]: y
step4:增加/dev/mapper/centos-root的空间大小
lvextend -l +100%FREE /dev/centos/root
null
延展 xfs 空间
null
xfs_growfs /dev/centos/root
step5:恢复/home的内容
格式化 /home 的 lvmmkfs.xfs -f /dev/mapper/centos-home
挂载 /home /dev/mapper/centos-homemount /home
还原备份资料到 /homexfsrestore -f /home.xfsdump /home
调整过后的空间大小如下图示:
标签:shadow ase logic dump term https umount .com dia
原文地址:http://blog.51cto.com/13401435/2340551