LXD broken after reboot

Hi forum, I am new in lxd and I have some problem today.
I have two storage pool from iscsi and local having the same name, the local one is old and the pool based on iscsi is new after migration.

I’ve imported the old pool and start lxd accidentally, it reported some error I think it’s because not existing CTs from the old storage.
So I press ctrl+C, reboot the host and import the new pool from iscsi, start the lxd, everything seems broken, and lxd could not start, here is the log:

Apr 23 19:15:52 lxd lxd.daemon[40866]: => Starting LXD

Apr 23 19:15:52 lxd lxd.daemon[41008]: t=2021-04-23T19:15:52+0800 lvl=warn msg=" - Couldn't find the CGroup blkio.weight, disk priority will be ignored"

Apr 23 19:15:52 lxd lxd.daemon[41008]: t=2021-04-23T19:15:52+0800 lvl=eror msg="Failed to start the daemon: Failed to start dqlite server: raft_start(): io: load closed segment 0000000000007169-0000000000007176: entries batch 47 starting at byte 647648: entries count in preamble is zero"

Apr 23 19:15:52 lxd lxd.daemon[41008]: Error: Failed to start dqlite server: raft_start(): io: load closed segment 0000000000007169-0000000000007176: entries batch 47 starting at byte 647648: entries count in preamble is zero
Apr 23 19:15:53 lxd lxd.daemon[40866]: => LXD failed to start
Apr 23 19:15:53 lxd systemd[1]: snap.lxd.daemon.service: Main process exited, code=exited, status=1/FAILURE
Apr 23 19:15:53 lxd systemd[1]: snap.lxd.daemon.service: Failed with result 'exit-code'.

Any help here?

After move the file 0000000000007169-0000000000007176 away from /var/snap/lxd/common/lxd/database/global, lxd started. does it makes any trouble?

Removing the last segment causes your database to go slightly back in time but it shouldn’t be a problem. Just check that all your instances are listed.

1 Like

Thanks ! Everything seems fine by now :smiley: