Failed to start the daemon: Failed to start dqlite server: raft_start()

It seems lxd can not start with this message when doing

lxd --debug --group lxd

DBUG[03-18|13:51:01] Not unmounting temporary filesystems (containers are still running) Error: Failed to start dqlite server: raft_start(): io: load closed segment 0000000000010645-0000000000010659: entries batch 28 starting at byte 326168: entries count in preamble is zero

please advise

Can you list the content of database/global?

Is that a hand built lxd?

@freeekanayaka

Did you experience a crash or something like that?

no, I had this problem Error: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: connection refused after changing backups destination

I did a laptop restart in the meantime, I’m not sure if that could do it.
I tried to delete the problematic segment, didnt work.
I tried to restore from datatabase backup, and that brought it up, however, since backup was old, recent changes about new storage pool were not there.
I tried searching for lxd config so to remove storage pool config, but didn’t find anything, so I guessed the config is in the db itself.
Since I’m in a hurry, I went with the nuke option and will restore my containers from backups I have.