Storage Pool "Unavailable" After Server Restart

OK so:

time="2022-10-17T18:59:19-06:00" level=error msg="Failed mounting storage pool" err="Failed to run: zfs set acltype=posixacl xattr=sa atime=off relatime=on mountpoint=legacy setuid=on exec=on devices=on tank/lxd: exit status 1 (cannot unmount '/var/lib/snapd/hostfs/mnt/tank/lxd': pool or dataset is busy)" pool=lxd

Suggests that it is having trouble unmounting the pool top-level dataset (as a result of trying to set mountpoint=legacy) probably because its still in use outside of the LXD snap’s mount namespace).

This confusion around mount points when using the snap package is one of (but not the only reason) why we switched to using mountpoint=legacy to avoid ZFS also mounting the datasets on the host’s mount namespace too.

This seems to be the same issue as, which was caused by a change in LXD 5.6 that started applying policies we use for new zpools to existing zpools, see:

We’ve since relaxed that somewhat by making a failure to apply those policies a warning rather than an error:

https://github.com/lxc/lxd/pull/10975

This way it will get applied on next reboot.