我想扩展 /dev/sdb1 分区
我在 Hypervisor 中将磁盘扩展为 2 GB,并为 /dev/sdb 磁盘显示了新的磁盘大小(从 20 GB 到 22 GB)
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 40894463 40892416 19.5G 83 Linux
/dev/sdb2 40896510 41940991 1044482 510M 5 Extended
/dev/sdb5 40896512 41940991 1044480 510M 82 Linux swap / Solaris
但是获取分区 1 只能增长到 2046 [fudge=2048]
growpart -v /dev/sdb 1
update-partition set to true
resizing 1 on /dev/sdb using resize_sfdisk_dos
46137344 sectors of 512. total size=23622320128 bytes
## sfdisk --unit=S --dump /dev/sdb
label: dos
label-id: 0x000467a9
device: /dev/sdb
unit: sectors
/dev/sdb1 : start= 2048, size= 40892416, type=83, bootable
/dev/sdb2 : start= 40896510, size= 1044482, type=5
/dev/sdb5 : start= 40896512, size= 1044480, type=82
max_end=40896510 tot=46137344 pt_end=40894464 pt_start=2048 pt_size=40892416
NOCHANGE: partition 1 could only be grown by 2046 [fudge=2048]