Ali云官方文档
fdisk -lu
type sgdisk || yum install -y gdisk
sgdisk -g /dev/vdb
fdisk -lu /dev/vdb
type growpart || yum install -y cloud-utils-growpart
type sgdisk || yum install -y gdisk
以云盘分区名称/dev/vdc1为例,运行如下命令。命令参数中的/dev/vdc和1之间需要空格分隔,1是分区编号。
LC_ALL=en_US.UTF-8 growpart /dev/vdb 1
umount /data00
1.resize2fs /dev/vdb1
2.e2fsck -f /dev/vdb1
一直按着y即可
第2步完成后,重新执行第1步
mount -t ext4 /dev/vdc1 /data00/
扩容磁盘问题
root@host:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdd 8:48 0 2T 0 disk
└─sdd1 8:49 0 1024G 0 part /data
sdb 8:16 0 56G 0 disk
└─sdb1 8:17 0 56G 0 part /mnt
sdc 8:32 0 500G 0 disk
└─sdc1 8:33 0 500G 0 part /data1
sda 8:0 0 30G 0 disk
└─sda1 8:1 0 30G 0 part /
growpart /dev/sdd 1
resize2fs /dev/sdd1
xfs_growfs /dev/sdd1
pvresize /dev/vda4
root@host:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdd 8:48 0 2T 0 disk
└─sdd1 8:49 0 2T 0 part /data
sdb 8:16 0 56G 0 disk
└─sdb1 8:17 0 56G 0 part /mnt
sdc 8:32 0 500G 0 disk
└─sdc1 8:33 0 500G 0 part /data1
sda 8:0 0 30G 0 disk
└─sda1 8:1 0 30G 0 part /