Skip to main content

Shrink an LXC or VM's root disk

·1 min

I wanted to decrease the size of an LXC’s root disk and it seemed complicated for a long time. Eventually, the solution turned out be fairly simple:

zfs set refquota=64G fast-zfs-pool/subvol-100-disk-0

# For LXC:
pct rescan
# Or for VM:
qm rescan

See: https://forum.proxmox.com/threads/shrinking-zfs-filesystem-for-lxc-ct.40876/

This only works when the disk is stored on ZFS, but that’s already the case for my use case. (ZFS is awesome!)