Resize VM disk via Proxmox

Resizing the disk is only the first step. You must then enlarge the partition inside the virtual disk, then finally you have to enlarge the file system in the partition on the disk.

You can find the full instructions here.
 
okay but I followed this steps in the link send but still shows the original size of the disk (maybe I did something wrong), what can I do to fix this. Must I post any outputs of my system here?
 
Here are the steps that I follow when increasing the size of the disk:

01. Turn off the virtual machine.
02. Back up the virtual machine.
03. Extended the disk using web GUI.
04. Boot the VM using Ubuntu Desktop install ISO and select try ubuntu.
05. Launch Gparted.
06. Right Click on both sd2 and sd5 and chose "Deactivate".
07. Resize the extended (sda2) partition.
08. Resized the LVM (sda5) partition.
09. Boot up the VM.
10. Execute the following Commands:
a. lvextend -l +100%FREE [mount point]
example: /dev/vrtemlsrv-vg/root​
b. resize2fs [mount point]
example: /dev/vrtemlsrv-vg/root​
11. Restart and confirm updated drive size.
 
Here are the steps that I follow when increasing the size of the disk:

01. Turn off the virtual machine.
02. Back up the virtual machine.
03. Extended the disk using web GUI.
04. Boot the VM using Ubuntu Desktop install ISO and select try ubuntu.
05. Launch Gparted.
06. Right Click on both sd2 and sd5 and chose "Deactivate".
07. Resize the extended (sda2) partition.
08. Resized the LVM (sda5) partition.
09. Boot up the VM.
10. Execute the following Commands:
a. lvextend -l +100%FREE [mount point]​
example: /dev/vrtemlsrv-vg/root​

b. resize2fs [mount point]​
example: /dev/vrtemlsrv-vg/root​

11. Restart and confirm updated drive size.

#lvm2

Hi, thank you for helping.

i found this post AFTER i thought i could do it myself with the simple idea of booting with the liveCD and only enlarging the partition with gparted.

SO, first I enlarged from 6 to 8 (never did nothing with another partitions wich also did not show).

Then, as it not worked out, i repeated enlarging again from the Proxmox webgui from 8 to 10 and again from the lubuntu 18 live cd...

And this is where i am now:

1715835536430.png

1715832791477.png

I added +3 G from proxmox.


When I try to do step 10.a. i get this:

1715832308179.png

What should i do ?

Thank YOU for YOUR Time !
 
Last edited:
And this is where i am now:
Well, in Gparted you need to choose the /dev/sda1 partition & extend it fully to also use the unallocated 3gb. After you have applied this in Gparted your /dev/sda1 should show the full 13gb as one partition. Only after that can you extend the LV within it.

Be aware when doing things of this nature; you should have backups available of the disk.
 
  • Like
Reactions: amomp3
Well, in Gparted you need to choose the /dev/sda1 partition & extend it fully to also use the unallocated 3gb. After you have applied this in Gparted your /dev/sda1 should show the full 13gb as one partition. Only after that can you extend the LV within it.

Be aware when doing things of this nature; you should have backups available of the disk.

thank you for your quick and kind reply

i should repeat that i have already done the thing that you advice: 2 times !

Please pay attention to my message, sorry if i made not myself clear...

It is not undestandable the order and the things i already tried and the outputs i got ?

Tnahk you
 
It is not undestandable the order and the things i already tried and the outputs i got ?
No, its very much not clear.

Let me assume you now have the /dev/sda1 as one 13gb partition (unlike the image you posted above) containing an PV/LVM using less than that.

Then you still need to do the following INSIDE THE RUNNING VM USING THE DISK:

1. pvresize /dev/sda1 (This will enlarge the physical volume to occupy the whole available space in the partition. Check that its still called sda1 - it may have a different name here in the VM).

2. lvdisplay (This will List logical volumes)

3. From the above (2.) output find the correct LV Path. So this is what your looking for:
LV Path /dev/{volume group name}/root

4. lvresize --extents +100%FREE --resizefs /dev/{volume group name}/root (This will use all the remaining space on the volume group for the LV).


The above is pretty standard Linux procedure & isn't really linked to Proxmox.

Good luck.
 
  • Like
Reactions: amomp3
thank you for your quick and kind reply

i should repeat that i have already done the thing that you advice: 2 times !

Please pay attention to my message, sorry if i made not myself clear...

It is not undestandable the order and the things i already tried and the outputs i got ?

Tnahk you

what i am trying to say is that firstly the size of the VM disk was 6.
i enlarged to 8 and tried to enlarge inside the VM later.
Did not work so i enlarged again in proxmox from 8 to 10 and tried to enlarge again in proxmox...

Thats why gparted shows a 10 partition but the df -h command posted looks like this:

1715881455801.png

and there is also the output when i try to do step 1 from your previous message.

This i am doing it BEFORE enlarging to 13gb because of the fear i have doing it for the THIRD time (seing that i did not achieve the enlargement from inside the VM the previous 2 times i enlarged from proxmox and gparted).

this is output of steps 2, 3 and 4:
1715882107606.png

I know that i am not trying AGAIN to enlarge from 10 to 13 so i am not doing specifically what you said BUT is because of fear of doing shit on top of shit... Hope you understand...
 

Attachments

  • 1715881834480.png
    1715881834480.png
    27.9 KB · Views: 1
the problem was tha the gparted from the live cd of lubuntu18 did not see the lvm2 filesystem


No, its very much not clear.

Let me assume you now have the /dev/sda1 as one 13gb partition (unlike the image you posted above) containing an PV/LVM using less than that.

Then you still need to do the following INSIDE THE RUNNING VM USING THE DISK:

1. pvresize /dev/sda1 (This will enlarge the physical volume to occupy the whole available space in the partition. Check that its still called sda1 - it may have a different name here in the VM).

2. lvdisplay (This will List logical volumes)

3. From the above (2.) output find the correct LV Path. So this is what your looking for:
LV Path /dev/{volume group name}/root

4. lvresize --extents +100%FREE --resizefs /dev/{volume group name}/root (This will use all the remaining space on the volume group for the LV).


The above is pretty standard Linux procedure & isn't really linked to Proxmox.

Good luck.

booted with lubuntu 24 and deleted the swap partition, enlarged the root partition and that was all

Thank YOU Very much for your time and patience !
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!