最近centos7.5 /root 空間不夠用了,而/home還有很多空間,所以重新分區,把空間挪過去一些
查看磁盤空間 df -h
卸載 /home umount /home/
刪除/home的邏輯分區 lvremove /dev/centos/home
擴展/root所在的邏輯分區 lvextend -L +600G /dev/centos/root
同步/root的文件系統 xfs_growfs /dev/centos/root
接下來重建home的分區,大小根據vgdisplay的Free PE / Size來確定
lvcreate -L 369G -n home centos
創建home文件系統 mkfs.xfs /dev/centos/home
掛載home文件系統 mount /dev/centos/home /home
至此,重新分區完成
原文連接:https://blog.csdn.net/Since_lily/article/details/80747657