Shrinking ZFS filesystem for LXC CT

Don Daniello

Active Member
Jan 28, 2012
60
4
28
Howdy,

I have given Proxmox on ZFS a test run recently (having used Proxmox for many users without ZFS).

I was hoping that Proxmox on ZFS would allow LXC containers to have their disk allocation both extended and shrunk. However, the Proxmox GUI does not seem to allow that.

Running the command
Code:
zfs set refquota=3G rpool/data/subvol-100-disk-1
manually seems to work correctly. Probably one thing missing is updating /etc/pve/lxc/100.conf, because it still has
Code:
rootfs: local-zfs:subvol-100-disk-1,size=5G
and therefore GUI keeps showing 5 GB as disk size.

Is there any reason why such adjustment is not supported by Proxmox yet? Any technical obstacle that I have missed? Or simply it's not been developed yet (in which case I could work on a patch)?
 

wolfgang

Proxmox Staff Member
Staff member
Oct 1, 2014
6,496
477
103
Hi,

we try that things work every where the same way .
Shrinking is only so easy with ZFS and and we will not do this on other storage types.
 

wolfgang

Proxmox Staff Member
Staff member
Oct 1, 2014
6,496
477
103
Can't it be conditionalized to ZFS only in the UI?
The problem is with such conditional exceptions that they confuse users
So we do keep things as general as it can be.
 

cserem

Member
Jan 15, 2017
17
5
23
Howdy,

I have given Proxmox on ZFS a test run recently (having used Proxmox for many users without ZFS).

I was hoping that Proxmox on ZFS would allow LXC containers to have their disk allocation both extended and shrunk. However, the Proxmox GUI does not seem to allow that.

Running the command
Code:
zfs set refquota=3G rpool/data/subvol-100-disk-1
manually seems to work correctly. Probably one thing missing is updating /etc/pve/lxc/100.conf, because it still has
Code:
rootfs: local-zfs:subvol-100-disk-1,size=5G
and therefore GUI keeps showing 5 GB as disk size.

Is there any reason why such adjustment is not supported by Proxmox yet? Any technical obstacle that I have missed? Or simply it's not been developed yet (in which case I could work on a patch)?

I belive you can update the container/qemu storage configs, after manual resizing with:
Code:
pct rescan
or
Code:
qm rescan
 

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 your own in 60 seconds.

Buy now!