扩容sda1 with xfs
yum install -y cloud-utils-growpart
LANG=en_US.UTF-8
growpart /dev/sda 1 -v
lsblk
xfs_growfs
xfs_growfs -d /dev/sda1
df -h
扩容vda1 with xfs
LANG=en_US.UTF-8
growpart /dev/vda 1 -v
lsblk
xfs_growfs
xfs_growfs -d /dev/vda1
df -h
扩容vdb with xfs
LANG=en_US.UTF-8
growpart /dev/vdb 1 -v
lsblk
xfs_growfs
xfs_growfs -d /dev/vdb
df -h
扩容sda1 with ext4
#yum install cloud-utils-growpart -y
# 少一步也不行哦
# 如果sda1后面有分区,那么sda怎么增加都无法扩容给sda1.如果sda2是一个扩展分区,sda5是一个swap分区,可以删掉这两个分区。记得chroot到系统,然后注释掉swap的/etc/fstab挂载。
growpart /dev/sda 1 # 1是分区编号
e2fsck -f /dev/sda1 -y
resize2fs /dev/sda1