调整home和根分区大小
目标:将VolGroup-lv_home缩小到100G,并将剩余的空间添加给VolGroup-lv_root
===========================================================================
解决过程:
-
# df -h //查看分区
-
# umount /home //取消挂载
-
# e2fsck -f /dev/mapper/VolGroup-lv_home
-
# resize2fs -p /dev/mapper/VolGroup-lv_home 100G //将lv_home虚拟分区设为100G
-
# mount /home //挂载home
-
# df -h
-
# lvreduce -L 100G /dev/mapper/VolGroup-lv_home
-
# vgdisplay
-
# lvextend -L +311.47G /dev/mapper/VolGroup-lv_root
-
# resize2fs -p /dev/mapper/VolGroup-lv_root //lv_root 重设分区大小
LVM(逻辑磁盘管理),灵活性很高.