Shrink disk size vm/lxc

Arty

New Member
Mar 10, 2018
2
0
1
44
Hi,

Increasing work fine from GUI and CLI. But, I would like to know, is it possible to reduce the size of the disk in vm/lxc? And, if it possible, how to do it?
In documentation I can't find about it.

Thanks!
 
Hi,

shrinking has to be done manual.
This is because you have to shrink the guest file system before you can shrink the virtual disk image
 
Is there a way to do this while restoring a backup or cloning a VM ? I'm too interested in shrinking a big VM after moving out several gigabytes of data as it raise backup problems (large backup storing static data).

Patrick (using PVE 4)
 
Hi,

Increasing work fine from GUI and CLI. But, I would like to know, is it possible to reduce the size of the disk in vm/lxc? And, if it possible, how to do it?
In documentation I can't find about it.

Thanks!
If you're using a local ZFS pool with LXC on a filesystem (the default for local ZFS storage) rather than a disk image , you can shrink or grow the filesystem at any time with (adjust 100G to the desired size):
Code:
zfs set refquota=100G POOL/FILESYSTEM

Disk images or block devices can only be managed as Wolfgang indicated.
 

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!