Disk Quota with Systemd Nspawn
BTRFS quota is done on top of subvolumes
.
One possible approach, then is to create subvolumes and set their quotas before binding to the container.
I hope the links below can help you:
- https://wiki.archlinux.org/index.php/btrfs
- https://wiki.archlinux.org/index.php/User:I2Oc9/Btrfs_subvolumes
This is not as simple as having CPUQuota = 10%
on your .service
file but should work. You can wrap this warm up in a setup script to make it smoother and reduce code duplication.