一.扩容分区
1.在esxi中调整硬盘大小
2.刷新硬盘
echo 1 > /sys/class/block/sda/device/rescan
3.调整分区大小
yum install cloud-utils-growpart xfsprogs -y
lsblk
LANG=en_US.UTF-8
growpart /dev/sda 2
4.扩容LVM
#扩容PV
pvresize /dev/sda2
#扩容vg
vgextend centos /dev/sda2
#扩容lv
# 将剩余的空间100%全部给lv扩容
lvextend -l +100%FREE /dev/mapper/centos-root
# 将lv额外增加5G空间
lvextend -L +5G /dev/mapper/centos-root
5.合并文件系统
#xfs
xfs_growfs /dev/centos/root
#ext*
resize2fs /dev/centos/root