$ sudo parted -l Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code. Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/vgubuntu-swap_1: 3922MB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags:
Number Start EndSizeFile system Flags 10.00B 3922MB 3922MB linux-swap(v1)
Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/vgubuntu-root: 64.3GB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags:
Number Start EndSizeFile system Flags 10.00B 64.3GB 64.3GB ext4
Warning: Not all of the space available to /dev/vda appears to be used, you can fix the GPT to useall of the space (an extra 67108864 blocks) or continue with the current setting? Fix/Ignore? Fix/Ignore? fix Model: Virtio Block Device (virtblk) Disk /dev/vda: 103GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:
Number Start EndSizeFile system Name Flags 11049kB 538MB 537MB fat32 boot, esp 2538MB 68.7GB 68.2GB lvm
重新用fdisk -l查看错误消失
2.4 /dev/vda2扩容
1 2 3 4 5 6
$ sudo growpart /dev/vda 2 CHANGED: partition=2 start=1050624 old: size=133165056 end=134215680 new: size=200275935 end=201326559 $ sudo resize2fs /dev/vda2 resize2fs 1.46.5 (30-Dec-2021) resize2fs: Device or resource busy while trying to open /dev/vda2 Couldn't find valid filesystem superblock.