Storage: Round ZFS volume sizes to nearest 16KiB
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.
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.
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.