When create a VM on Proxmox, sometimes we may underestimate the growth of the data and chose a inproper disk size.
This article will teach you how to extend the disk size of your Proxmox VM on Ubuntu Desktop 22.04. If you are using Ubuntu Server 22.04, the procedures will be slightly different. Check out the procedures for Ubuntu Server 22.04.
Step 1: On your Proxmox virtual machine, select the Hard Disk under the Hardware section. Click Disk Action and press the Resize option.
Step 2: Select the disk size you want to increment.
Step 3: Check the partition of your Linux filesystem by
sudo fdisk /dev/sda
or
sudo fdisk -l
In my case, it is /dev/sda3 Press q to exit the program
Step 4: Extend partition 3 of the disk by installing the cloud-utils library and start the growpart tool.
Install it on your Ubuntu 22.04 server by
sudo apt install cloud-utils
sudo growpart /dev/sda 3
Step 5: Resie the filesystem by
sudo resize2fs /dev/sda3
Step 6: Check the latest disk size by
sudo df -h
Congratulation! You have extended the disk size of your Ubuntu 22.04 Desktop VM successfully!