lxd icon indicating copy to clipboard operation
lxd copied to clipboard

Storage: Round ZFS volume sizes to nearest 16KiB

Open MggMuggins opened this issue 1 year ago • 1 comments

This rounds ZFS volume sizes using zfs.blocksize or the openzfs default 16KiB instead of LXD's default 8KiB. Reported in #13420.

It looks like the default was changed in OpenZFS in Q3 2021: https://github.com/openzfs/zfs/pull/12406

I'm not super pleased with the refactor of roundVolumeBlockSizeBytes to take a vol Volume, but we need a reference to the volume in order to query its config keys. This seemed like the least invasive way to accomplish it.

The new test fails before patches and passes after.

MggMuggins avatar May 10 '24 23:05 MggMuggins

It looks like the default was changed in OpenZFS in Q3 2021: openzfs/zfs#12406

Thanks for finding this bug! It looks like the change was integrated in OpenZFS 2.2.0. It's weird that it took so long to be noticed here.

simondeziel avatar May 11 '24 13:05 simondeziel

Thanks!

Please can you add a test to https://github.com/canonical/lxd-ci/blob/main/tests/storage-vm so that we can ensure this fix is backported to the other tracks.

tomponline avatar May 23 '24 07:05 tomponline