- In vmware fusion, stop the vm
- Virtual Machine > Hard Disk > Nvme settings
- Change disk size / close / start the vm
# run command line partition tool
$ parted
# check the partition number
parted(parted) print list
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 62.8GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 62.8GB 62.8GB ext4
Model: VMware Virtual NVMe Disk (nvme)
Disk /dev/nvme0n1: 64.4GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 boot, esp
2 538MB 1612MB 1074MB ext4
3 1612MB 64.4GB 62.8GB
# exit partition tool
(parted) exit
# grow the partition (
# growpart ${disk_device} ${partition_number}
growpart /dev/nvme0n1 3
# extend the logical volume
lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
# show the volume groups
vgdisplay
# expand the file system
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv