[SOLVED] VM not utilizing whole disk space

MrNimbus

New Member
Oct 17, 2023
5
1
3
Hey guys,
I setup proxmox a couple of month ago and only now find out that I probably made some mistakes.

My usecase:
Proxmox is installed on a 256GB SSD. I added a 4TB SSD. For now I only need one VM where I run all my services in Docker (nextcloud, immich, wireguard and much more). My plan was to use the small SSD only for proxmox and use the 4TB only for my main VM. I seem to have messed up as my VM only has 98GB:
1697494762880.png

This is the VM:
1697494849619.png

This is the 4TB SSD where my VM seems to be running on:
1697494978381.png
1697495009774.png

When I remember correctly I assigned 1TB to the VM when I created it. Why are only 98GB available in the VM tho? And how can I change that so that the VM has access to the whole 4TB?

Did I messed up something entirely?


I am quite lost as I thought I followed the setup quite textbook-like. Maybe someone can help me how to fix this or guide me to some resources.

Thanks a lot in advance!
 
Hi,

can you please post the output of the following commands inside the VM?
- lsblk
- pvs
- vgdisplay
- lvdisplay

As the disk size is correct from the PVE side, I'd say that Ubuntu simply created the LVM with 100GB space and not used the full disk. The above should confirm that.
 
  • Like
Reactions: MrNimbus
Hi,

so yeah, that confirms it - while the disk is 1TB as you specified, the Ubuntu installer seems to allocate only a part of the disk. Doesn't surprise me all that much tho that Ubuntu does such non-sensical things.

Below procedure is of course on your own risk, so take a backup before! Just to be on the safe side.

In any case, to resize the root partition to it's full size:
Code:
pvresize /dev/mapper/ubuntu--vg-ubuntu--lv /dev/sda3
lvresize /dev/ubuntu-vg/ubuntu-lv /dev/sda3
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
That should 1) resize the volume group to the partition size, than 2) grow the logical volume to that size too and 3) finally resize the filesystem to the new size.

The last step assumes you used ext4 as root filesystem, which I guessed based on that you used a standard Ubuntu install.
 
  • Like
Reactions: MrNimbus
That resolved my problem thank you very much!
If I now wanted to increase the VM disk space even more (more than the originally allocated 1TB) I need to increase the hard disk size on the VM settings and probably run the 3 commands again am I right?
1697887887156.png
Not sure if this is the best solution
 

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!