Open markrattray opened 2 years ago
The reason why the size
property doesn't apply to non-root disks is because those disks can be shared with multiple instances. Instead the size
property on the volume itself is used for this.
The general idea of being able to define a disk entry in a profile which would then cause a new volume to be created when an instance gets created is something we've ran into before but so far haven't found an elegant way to address.
Hi
LXD 4.22 on Ubuntu Server 20.04 AMD64. I have only tested on LXD managed ZFS storage pools.
Profiles are happy to auto create the root volumes wherever. Additional disks in the profiles have to be manually created before the instance has to be created, and size restrictions are not supported on these additional disks (profile validation fails on save).
This behaviour adds complexity to automation.
In the future, please could you extend the auto creation and size limitation features to multiple additional disks stipulated in Profiles, if they don't exist. Also auto deletion on instance deletion.
More info; https://discuss.linuxcontainers.org/t/how-to-autoprovision-additional-disks-using-profiles-or-ansible-in-a-cluster/13285
Many thanks!