Eric Guo's

in HTML5, JavaScript, Ruby & Rails, Python, and Cloud MES!

Extend the Disk Size in Ubuntu 20.04 Which Running in VMware


Ubuntu extend disk is different with CentOS, largely using cloud-guest-utils tools.

apt-get install cloud-guest-utils
parted -l # Usually sda 3 is the root fs
growpart /dev/sda 3
pvs # To get the PV name
pvresize /dev/sda3
df -h # find /dev/mapper/ubuntu--vg-ubuntu--lv or similar
lvextend -r -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

Largely copy from unix stackexchange.