-
Notifications
You must be signed in to change notification settings - Fork 933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage: Standardize volume.size
usage across drivers
#14829
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: hamistao <[email protected]>
16a7426
to
fced7e1
Compare
Signed-off-by: hamistao <[email protected]>
srcVol: Volume{volType: VolumeTypeImage}, | ||
err: nil, | ||
size: "2GiB", | ||
size: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesnt look right, lets discuss.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lxd/storage/drivers/volume: only apply volume.size on block volumes
This is incorrect.
We need to apply volume.size on filesystem volumes too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if perhaps zfs is the only correct driver by some pre-existing standard. We can fix this inconsistency the other way around and make btrfs and dir apply volume.size in al volumes.
Unfortunately, however we proceed, I worry some user may be relying on the current behavior.
@hamistao please can you see if this is a regression, specifically on
So the question is whether we should inherit a pool's |
On LXD 4.0,
For comparison, here is the same output when using zfs on 5.0/stable (zfs wasn't present on 4.0)
I will try and test with dir with project quotas as well |
Thanks @hamistao lets de-prioritize this for now and come back to it once we've finished the roadmap item you have, plus the size reporting issue. |
On non-block based drivers, filesystem volumes can be unbounded, having access to the entire storage quota of its pool. When creating such volumes on
btrfs
anddir
, the pool'svolume.size
config is ignored unbounded volumes are created. But onzfs
those volumes are bounded by whatever is defined onvolume.size
, which is inconsistent behavior. To reproduce this, one can run the following on the specified drivers and compare their behaviors: