Partition table scan: MBR: protective BSD: not present APM: not present GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? forhelp): p Disk /dev/vda: 209715200 sectors, 100.0 GiB Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 9D6B96D0-7CEC-794F-B6FB-AF6C1DC25D0E Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 2048, last usable sector is 6291422 Partitions will be aligned on 2048-sector boundaries Total free space is 2015 sectors (1007.5 KiB)
Number Start (sector) End (sector) Size Code Name 1 262144 6289407 2.9 GiB 8304 14 2048 8191 3.0 MiB EF02 15 8192 262143 124.0 MiB EF00
$ sudo resize2fs /dev/vda1 resize2fs 1.47.0 (5-Feb-2023) Filesystem at /dev/vda1 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 13 [74616.147208] EXT4-fs (vda1): resizing filesystem from 753408 to 26181627 blocks [74617.899341] EXT4-fs (vda1): resized filesystem to 26181627 The filesystem on /dev/vda1 is now 26181627 (4k) blocks long.
再查看客户机的块设备列表
1 2 3 4 5 6
$ sudo lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS vda 254:0 0 100G 0 disk ├─vda1 254:1 0 99.9G 0 part / ├─vda14 254:14 0 3M 0 part └─vda15 254:15 0 124M 0 part /boot/efi