cat>/root/non.txt<<EOF n p 3 Z w q EOF fdisk /dev/vda </root/non.txt partprobe /dev/vda pvcreate /dev/vda3 vgextend centos /dev/vda3 lvextend /dev/mapper/centos-root -l +100%free xfs_growfs /dev/mapper/centos-root df -HView Code
1、查看分区
2、备份/home/分区
3、卸载分区
umount /home
fuser -km /home
4、删除/home所在的LV
lvremove /dev/mapper/centos-home
5、扩展/root所在的LV
lvextend -L +100G /dev/mapper/centos-root
6、扩展/root文件系统
xfs_growfs /dev/mapper/centos-root
7、重新创建/home lv
lvcreate -L 41G -n /dev/mapper/centos-home
8、创建文件系统
mkfs.xfs /dev/mapper/centos-home
9、挂载/home
mount /dev/mapper/centos-home
10、文件恢复
11、查看磁盘大小
df -H
标签:扩容,mapper,centos,dev,home,大小,磁盘,root From: https://www.cnblogs.com/vmsysjack/p/17693857.html