よく忘れる + Notion のメモから転載
$ parted /dev/sda
(parted) p
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 67108864 blocks) or continue with the current setting?
Fix/Ignore? Fix
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 68.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 34.4GB 34.4GB ext4
(parted) resizepart 2
Warning: Partition /dev/sda2 is being used. Are you sure you want to continue?
Yes/No? Yes
End? [34.4GB]? -1
$ resize2fs /dev/sda2