Expanding the Root Partition on an Ubuntu Azure VM

By default Ubuntu IaaS virtual machines on Azure come with a 30GB OS disk.
The easiest way to enlarge the root partition after increasing the OS disk size is to run the following two commands:

sudo growpart /dev/sda 1
sudo resize2fs /dev/sda1

Leave a Reply