[SOLVED]Error: ZFS storage pool "default" could not be imported: cannot import 'default': no such pool available

Ok, sounds like you can just run lxc storage delete default then and things should be back to normal.

Thanks, Graber, you saved my night.
Appreciate your help.

Hi,
I did this, but LXD failed to start:

sudo /snap/bin/lxd --debug --group lxd
INFO[11-15|10:24:05] LXD is starting                          mode=normal path=/var/snap/lxd/common/lxd version=4.20
INFO[11-15|10:24:05] Kernel uid/gid map: 
INFO[11-15|10:24:05]  - u 0 0 4294967295 
INFO[11-15|10:24:05]  - g 0 0 4294967295 
INFO[11-15|10:24:05] Configured LXD uid/gid map: 
INFO[11-15|10:24:05]  - u 0 1000000 1000000000 
INFO[11-15|10:24:05]  - g 0 1000000 1000000000 
INFO[11-15|10:24:05] Kernel features: 
INFO[11-15|10:24:05]  - closing multiple file descriptors efficiently: no 
INFO[11-15|10:24:05]  - netnsid-based network retrieval: no 
INFO[11-15|10:24:05]  - pidfds: no 
INFO[11-15|10:24:05]  - core scheduling: no 
INFO[11-15|10:24:05]  - uevent injection: yes 
INFO[11-15|10:24:05]  - seccomp listener: no 
INFO[11-15|10:24:05]  - seccomp listener continue syscalls: no 
INFO[11-15|10:24:05]  - seccomp listener add file descriptors: no 
INFO[11-15|10:24:05]  - attach to namespaces via pidfds: no 
INFO[11-15|10:24:05]  - safe native terminal allocation : yes 
INFO[11-15|10:24:05]  - unprivileged file capabilities: yes 
INFO[11-15|10:24:05]  - cgroup layout: hybrid 
WARN[11-15|10:24:05]  - Couldn't find the CGroup hugetlb controller, hugepage limits will be ignored 
WARN[11-15|10:24:05]  - Couldn't find the CGroup memory swap accounting, swap limits will be ignored 
INFO[11-15|10:24:05]  - shiftfs support: no 
WARN[11-15|10:24:05] Instance type not operational            type=virtual-machine driver=qemu err="vhost_vsock kernel module not loaded: Failed to run: modprobe -b vhost_vsock: modprobe: ERROR: could not insert 'vhost_vsock': Device or resource busy"
INFO[11-15|10:24:05] Initializing local database 
DBUG[11-15|10:24:06] Refreshing local trusted certificate cache 
INFO[11-15|10:24:06] Set client certificate to server certificate fingerprint=064e44c7146c763b039f0c043750d89b0f754b76a6c24316cd020e44606bf3d4
DBUG[11-15|10:24:06] Initializing database gateway 
INFO[11-15|10:24:06] Starting database node                   id=1 address=1 role=voter
INFO[11-15|10:24:06] Starting /dev/lxd handler: 
INFO[11-15|10:24:06]  - binding devlxd socket                 socket=/var/snap/lxd/common/lxd/devlxd/sock
INFO[11-15|10:24:06] REST API daemon: 
INFO[11-15|10:24:06]  - binding Unix socket                   socket=/var/snap/lxd/common/lxd/unix.socket
INFO[11-15|10:24:06] Initializing global database 
INFO[11-15|10:24:06] Connecting to global database 
DBUG[11-15|10:24:06] Dqlite: attempt 1: server 1: connected 
INFO[11-15|10:24:06] Connected to global database 
INFO[11-15|10:24:06] Initialized global database 
DBUG[11-15|10:24:06] Firewall detected "nftables" incompatibility: Kernel version does not meet minimum requirement of 5.2 
DBUG[11-15|10:24:06] Firewall detected "xtables" incompatibility: Backend command "ebtables" is an nftables shim 
WARN[11-15|10:24:06] Firewall failed to detect any compatible driver, falling back to "xtables" (but some features may not work as expected due to: Backend command "ebtables" is an nftables shim) 
INFO[11-15|10:24:06] Firewall loaded driver                   driver=xtables
INFO[11-15|10:24:06] Initializing storage pools 
DBUG[11-15|10:24:06] Initializing and checking storage pool   pool=default
DBUG[11-15|10:24:06] Mount started                            driver=zfs pool=default
DBUG[11-15|10:24:06] Mount finished                           driver=zfs pool=default
DBUG[11-15|10:24:06] Initializing and checking storage pool   pool=lxd
DBUG[11-15|10:24:06] Mount started                            driver=zfs pool=lxd
DBUG[11-15|10:24:06] Mount finished                           driver=zfs pool=lxd
EROR[11-15|10:24:06] Failed to start the daemon               err="Failed initializing storage pool \"lxd\": ZFS zpool exists but dataset is missing"
INFO[11-15|10:24:06] Starting shutdown sequence               signal=interrupt
DBUG[11-15|10:24:06] Cancel ongoing or future gRPC connection attempts 
INFO[11-15|10:24:06] Closing the database 
INFO[11-15|10:24:06] Stop database gateway 
INFO[11-15|10:24:06] Stopping REST API handler: 
INFO[11-15|10:24:06]  - closing socket                        socket=/var/snap/lxd/common/lxd/unix.socket
INFO[11-15|10:24:06] Stopping /dev/lxd handler: 
INFO[11-15|10:24:06]  - closing socket                        socket=/var/snap/lxd/common/lxd/devlxd/sock
INFO[11-15|10:24:06] Unmounting temporary filesystems 
INFO[11-15|10:24:06] Done unmounting temporary filesystems 
INFO[11-15|10:24:06] Daemon stopped 
Error: Failed initializing storage pool "lxd": ZFS zpool exists but dataset is missing

My container zpool was default (before I created the lxd pool manually):

$ sudo zpool list
NAME      SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
default  46,5G  9,15G  37,3G         -    28%    19%  1.00x  ONLINE  -
lxd      1008M   684K  1007M         -     0%     0%  1.00x  ONLINE  -

but for some reason, lxd tried to load the lxd pool but have failed since it did not exist.
I tried removing rows from /var/snap/lxd/common/lxd/database/global/db.bin in tables storage_pools_config and storage_pools where the lxd pool was mentionned, with no success as lxd adds them again at boot.
Any clue?
Thank you,