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!