I have a zfs backend and want to switch from using quotas to refquotas for root volumes. I did lxc storage set mycluster:myvolume volume.zfs.use_refquota=true, but this is valid only for new containers.
How do I go about switching already existing ones? via zfs directly or using lxc config device override? Most of my containers are inheriting the size from the default volume size, what are the implications from overriding them all vs zfs set? does anything else happen internally when overriding the size via lxc other than zfs set refquota? any implications during backup/restore?
Does lxc storage volume set mycluster:myvolume zfs.use_requota=true work?
Basically volume.zfs.use_refquota applies to a storage pool and gets copied as zfs.use_refquota to new volumes when they are created, but you should be able to directly apply zfs.use_refquota to existing volumes.
[root@lxd13 ~]# zfs get quota,refquota lxd13/lxd/containers/aeeint
NAME PROPERTY VALUE SOURCE
lxd13/lxd/containers/aeeint quota none local
lxd13/lxd/containers/aeeint refquota 15G local
Yup, that worked perfectly, thanks. --target is actually not necessary, unlike custom volumes, cluster seems to know on which member is the container volume.
Unlike other commands, i.e. info, who not only not seem to know it, but also refusing to honour --target
$ lxc storage volume info ee container/aeeint
Error: Failed to run: zfs get -H -p -o value referenced lxd10/lxd/containers/aeeint: cannot open 'lxd10/lxd/containers/aeeint': dataset does not exist
~$ lxc storage volume info ee container/aeeint --target lxd12
Error: Failed to run: zfs get -H -p -o value referenced lxd10/lxd/containers/aeeint: cannot open 'lxd10/lxd/containers/aeeint': dataset does not exist
–project doesn’t seem to be honored by volume set:
~$ lxc storage volume list ee --project test |fgrep container | head -1
| container | clp | | filesystem | 1 | lxd2 |
~$ lxc storage volume set ee container/clp zfs.use_refquota=true --project test
Error: Storage pool volume not found
Exit Code: 1
~