Looking for Options to Expand Ubuntu VM's Disk

PythonTrader

New Member
Sep 25, 2023
29
0
1
Greetings,

I have created multiple VMs (mostly Ubuntu) on my PVE with a disk size of 25 GB. After a year, some of them are running out of capacity.

I know that in the GUI, I can increase the disk size, but this does not increase the actual VM's OS disk partition size.

What are my options to expand the disk size of an Ubuntu VM?

Thank you.
 
There's a lot of articles out there. Essentially, you need to expand the virtual disk in PVE.
Then you need to login to the Ubuntu VM and tell it to expand into the new space.
You'll use fdisk to read it and pvresize and lvextend to do the work.

There's another way, but it gets messy. You could add another volume, and then add that to the LVM.
It's transparent inside the OS, looks like just one big space after that.
But boy, it gets sticky managing multiple disks. I'd go through the mental gymnastics to just expand the existing virtual disk.
 
Last edited: