删除其他分区,合并到对应分区上增加磁盘空间

- 删除开机默认挂载
/dev/mapper/centos-home
sql
vim /etc/fstab 把 /dev/mapper/centos-home 这一行删除掉
- 命令行取消挂载
/dev/mapper/centos-home
powershell
umount /dev/mapper/centos-home

- 删除掉逻辑卷
home
powershell
lvs

powershell
df -h

powershell
lvremove /dev/centos/home

- 查看vg 卷组,并把剩余容量给逻辑卷 root
因为释放了 home卷组所占用的硬盘,所以vg卷组有了剩余的容量
powershell
vgs
添加到 /root卷组中
powershell
lvextend -L +220G /dev/mapper/centos-root

- 最后需要执行下命令,让系统知道磁盘容量已经发生变化
powershell
xfs_growfs /dev/centos/root

linux自动分区后devmappercentos-home
删除执行成功磁盘容量已经全部都在/ 目录下