I have a file-based zfs pool for prototyping purposes on a Gentoo Linux machine running kernel 5.4.16, zfs 2.0.6 and lxd 4.0.8.
LXD will not start because the zfs pool fails to import:
t=2021-12-16T14:27:47-0700 lvl=eror msg="Failed to start the daemon" err="Failed initializing storage pool \"lxd_zfs\": Failed to run: zpool import zfs_lxd: cannot import 'zfs_lxd': no such pool available"
zpool cannot find any pools:
# zpool list no pools available
/etc/zfs/zfs.cache is empty (0 bytes).
If try to manually import the pool, it looks like it exists:
# zpool import -d /var/lib/zfs_img/ pool: zfs_lxd id: 15622706274310801825 state: ONLINE status: Some supported features are not enabled on the pool. action: The pool can be imported using its name or numeric identifier, though some features will not be available without an explicit 'zpool upgrade'. config: zfs_lxd ONLINE mirror-0 ONLINE /var/lib/zfs_img/zfs0.img ONLINE /var/lib/zfs_img/zfs1.img ONLINE mirror-1 ONLINE /var/lib/zfs_img/zfs2.img ONLINE /var/lib/zfs_img/zfs3.img ONLINE
But even after doing this, the supposedly imported pool still isn’t visible:
# zpool status no pools available
I’ve done updates like this before and beyond rebuilding and installing the kernel module, I haven’t had to do anything to keep things working. What happened here? What can I do?
(The mtime on
/etc/zfs/zfs.cache is November 22, one day after the update to lxd 4.0.8, so it looks like this problem began with the update from 4.0.7, but I don’t see how this is an LXD problem. It could be just a coincidence.)