First, shut down the container and ensure it’s not running.
List out the LVM logical volumes:
Choose the disk you want to resize – you’ll see they’re named by container ID and disk number. For example, /dev/vg0/vm-205-disk-1.
Check and fix the filesystem, just incase:
Resize the file system. It is advisable, at this point, to set this to 1GB smaller than you actually want it (e.g. 7G when you want 8G):
Resize the LVM LV to the actual size you want it to be:
Resize the file system to fill the LVM LV:
Finally, edit the configuration for the container such that Proxmox reports the correct size for the disk. You will find this at /etc/pve/lxc/205.conf where 205 is your container ID.
You can now start your container and check the disks’ sizes:
omg thank you so much, saved this page because I’ve had to use it multiple times
Thank you, page pinned for the future!!
Hi, thanks for this information. I translated your tutorial to german and linked back to you: https://tfta.de/forum/thread/7-proxmox-ve-verkleinern-einer-lvm-basierten-festplatte/
That’s great work, thanks!
Thanks for the article. You should encourage the user to perform a proxmox backup of the container too, since it’s very easy and will be a lifesaver if you mess up.
Thanks,
used your guide it worked, but i cannot see more space on my host machine?
Hi Phil, it’s a shame they haven’t made this a function of the GUI! Great little guide, really helped me out. Thanks so much!
Thanks for this awesome tips
great help. I was looking all over internet for 3 hours how to do it.
thanks a lot.