Skip to main content

Reducing size of container LV

Step One - CONFIRM volume name and path

pct list
pct stop <container id number>
lvdisplay | grep "LV Path\|LV Size"

 

Step 2 - Resize file system and logical volume

resize2fs /dev/pve/vm-999-disk-0 10G
lvreduce -L 10G /dev/pve/vm-999-disk-0

 

Step 3 - Edit container conf

nano /etc/pve/lxc/<container id>.conf

rootfs: local-lvm:vm-999-disk-0,size=32G >> rootfs: local-lvm:vm-999-disk-0,size=10G

 

Step 4 - Confirm new disk size

pct start <container id>
pct enter <container id>
df -h