Extending existing container root disk

Skater68

New Member
Feb 1, 2022
7
0
1
56
This is probably an FAQ, but I can't seem to find a straight forward approach for this:

  • There's a container with a relatively small root disk on a relatively small LVM (on an internal disk)
  • I successfully added a 2nd lvm for an external SSD following this approach
Now how di I "give" the existing container more space from that new LVM? The only option I seem to have on the container's Resources/root disk is to resize it - but it won't "know" about the new LVM I suppose?

So is this even possible or do I need to (somehow - not sure how) transfer the current container completely into the new LVM?

Thanks in advance!
 
on current PVE versions, you can move the volume (while the container is stopped) to another storage. then you can resize it.
 
Cool :) Only thing I notice is that the original LVM doesn't gain back the full space of the volume (although I had said "Delete source" for the move)
 
a thin volume doesn't use its full size (unless it's actually fully occupied of course ;))
 
So there's no way to find out how much space is now actually available on that volume? It says 340.90 GB of 375.07 GB but after having moved out the 50GBs it actually should be more...
 
lvs should give you an overview over LVM(-thin) volumes, their sizes and usage..
 
Can't really make heads and tails of that :oops:

The local-lvm I see in the UI (with the 340.90 GB of 375.07 GB reported there) doesn't even appear in that list:

Code:
  LV                        VG     Attr       LSize    Pool Origin        Data%  Meta%  Move Log Cpy%Sync Convert
  vm-101-disk-0             SSD232 -wi-ao----   50.00g                                                           
  base-103-disk-0           pve    Vri---tz-k   50.00g data                                                     
  data                      pve    twi-aotz-- <349.31g                    90.89  4.82                           
  root                      pve    -wi-ao----   96.00g                                                           
  snap_vm-100-disk-0_vzdump pve    Vri---tz-k  200.00g data vm-100-disk-0                                       
  swap                      pve    -wi-ao----    8.00g                                                           
  vm-100-disk-0             pve    Vwi-a-tz--  200.00g data               99.37
 
you might want to read up on how LVM (and LVM thin) work ;)

you have a volume group 'pve' (more details available with 'vgs' / 'vgdisplay') with three volumes:
- pve/root (96G)
- pve/swap (8G)
- pve/data (349.31G)

the last one is a thin pool which is configured as 'local-lvm' storage. on that thin pool you can allocate thin volumes - these only actually use the amount of data that is stored (they are thin-provisioned) - so you can have many different volumes with a total size of more than the 349G that your thin pool takes - as long as the usage stays below that.

right now you have
- vm-100-disk-0 with a size of 200G and 99.37% usage
- base-103-disk-0 with a size of 50G
- snap_vm-100-disk-0_vzdump (a snapshot of vm-100-disk-0)

these three thin volumes (and snapshots) take up 90.89% of the available space in the pool (so roughly 317G)

SSD232/vm-101-disk-0 is not a thin volume but a regular LVM volume in the SSD232 VG. if it was previously stored on pve/data it likely took up less than 50G there, unless it was completely full. now it takes the full 50G since it's not thin-provisioned.
 

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!