磁盘扩容
centos7.x(lvm)验证有效:
yum install -y cloud-utils-growpart xfsprogs
LANG=en_US.UTF-8
growpart /dev/sda 2
partprobe (partprobe /dev/sda)
lvextend -l +100%FREE /dev/centos/root
xfs_growfs /dev/mapper/centos-root
partprobe
注意:2T以上硬盘需要GPT分区格式,如当前是MBR格式,需要先转成GPT(先备份数据),LVM大概率失败
yum install -y gdisk
gdisk /dev/sda w y
部分参考:https://leif.fun/articles/2020/06/26/1593159154169.html