Hello,
I have tried to upgrade my lxd snap instance from 4.0 to 6
$ snap list lxd
Name Version Rev Tracking Publisher Notes
lxd 4.0.10-35a8127 36554 4.0/stable/�� canonical** -
after
snap refresh lxd --channel=6/stable
LXD daemon was not starting and in the log I got unrecoverable database error:
Dec 29 20:41:25 imatic-lxc02 systemd[1]: Stopping Service for snap application lxd.daemon...
Dec 29 20:41:26 imatic-lxc02 lxd.daemon[659120]: => Stop reason is: snap refresh
Dec 29 20:41:26 imatic-lxc02 lxd.daemon[659120]: => Stopping LXD
Dec 29 20:41:28 imatic-lxc02 lxd.daemon[1262389]: => LXD exited cleanly
Dec 29 20:41:28 imatic-lxc02 lxd.daemon[659120]: ==> Stopped LXD
Dec 29 20:41:28 imatic-lxc02 systemd[1]: snap.lxd.daemon.service: Succeeded.
Dec 29 20:41:28 imatic-lxc02 systemd[1]: Stopped Service for snap application lxd.daemon.
Dec 29 20:41:38 imatic-lxc02 systemd[1]: Started Service for snap application lxd.daemon.
Dec 29 20:41:39 imatic-lxc02 lxd.daemon[659843]: INFO: the gpu-2404 interface isn't connected. Skipping gpu-2404 wrapper.
Dec 29 20:41:39 imatic-lxc02 lxd.daemon[659843]: => Preparing the system (37006)
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Loading snap configuration
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Creating /var/snap/lxd/common/global-conf
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Setting up mntns symlink (mnt:[4026534572])
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Setting up mount propagation on /var/snap/lxd/common/lxd/storage-pools
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Setting up mount propagation on /var/snap/lxd/common/lxd/devices
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Setting up persistent shmounts path
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Setting up kmod wrapper
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Preparing /boot
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Preparing a clean copy of /run
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Preparing /run/bin
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Preparing a clean copy of /etc
Dec 29 20:41:40 imatic-lxc02 lxd.daemon[659843]: ==> Preparing a clean copy of /usr/share/misc
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Setting up ceph configuration
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Setting up LVM configuration
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Setting up OVN configuration
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Rotating logs
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Unsupported ZFS version (0.8)
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: Consider installing ZFS tools in the host and use zfs.external
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Escaping the systemd cgroups
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ====> Detected cgroup V1
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Escaping the systemd process resource limits
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Increasing the number of inotify user watches
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Increasing the number of bytes for a nonroot user
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Exposing LXD documentation
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: => Re-using existing LXCFS
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> snap base has changed, restart system to upgrade LXCFS
Dec 29 20:41:41 imatic-lxc02 lxd.daemon[659843]: ==> Cleaning up existing LXCFS namespace
Dec 29 20:41:42 imatic-lxc02 lxd.daemon[659843]: => Starting LXD
Dec 29 20:41:42 imatic-lxc02 lxd.daemon[660630]: time="2025-12-29T20:41:42+01:00" level=warning msg=" - Couldn't find the CGroup blkio.weight, disk priority will be ignored"
Dec 29 20:41:42 imatic-lxc02 lxd.daemon[660630]: time="2025-12-29T20:41:42+01:00" level=warning msg=" - Couldn't find the CGroup memory swap accounting, swap limits will be ignored"
Dec 29 20:41:42 imatic-lxc02 lxd.daemon[660630]: time="2025-12-29T20:41:42+01:00" level=warning msg="Instance type not operational" driver=qemu err="KVM support is missing (no /dev/kvm)" type=virtual-machine
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0x7f707cceb1b8 dqlite_print_trace
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0x7f707cceb1f3 dqlite_fail
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0x7f707cce3f62 ???
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0x7f707cd0f92b ???
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0x7f707cd0fe6d ???
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0x7f707ccf0df7 ???
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0x7f707cb27aa3 ???
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0x7f707cbb4c6b ???
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 0xffffffffffffffff ???
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: ???:0
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: Tentatively showing last 56 crash trace records:
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302774032734 660655 src/vfs.c:2585 VfsInit vfs init
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302774174318 660655 src/transport.c:242 raftProxyInit raft proxy init
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302780277975 660655 src/fsm.c:506 fsm__init fsm init
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903388958 660655 src/transport.c:45 impl_init impl init
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903599348 660647 src/server.c:831 dqlite_node_start dqlite node start
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903770996 660671 src/raft/start.c:159 raft_start starting version:1800 revision:unknown
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903873943 660671 src/raft/uv_list.c:91 UvList segment 00000001043416
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903881929 660671 src/raft/uv_list.c:91 UvList segment 00000001043424
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903884528 660671 src/raft/uv_list.c:91 UvList segment 00000001043426
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903887006 660671 src/raft/uv_list.c:91 UvList segment 00000001043434
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903889441 660671 src/raft/uv_list.c:91 UvList segment 00000001043437
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903891830 660671 src/raft/uv_list.c:91 UvList segment 00000001043445
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903894271 660671 src/raft/uv_list.c:91 UvList segment 00000001043447
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903896666 660671 src/raft/uv_list.c:91 UvList segment 00000001043455
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903900105 660671 src/raft/uv_list.c:91 UvList segment 00000001043457
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903902676 660671 src/raft/uv_list.c:91 UvList segment 00000001043465
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903905166 660671 src/raft/uv_list.c:91 UvList segment 00000001043467
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903907556 660671 src/raft/uv_list.c:91 UvList segment 00000001043475
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903909962 660671 src/raft/uv_list.c:91 UvList segment 00000001043477
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903912358 660671 src/raft/uv_list.c:91 UvList segment 00000001043486
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903914766 660671 src/raft/uv_list.c:91 UvList segment 00000001043488
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903917161 660671 src/raft/uv_list.c:91 UvList segment 00000001043496
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903919565 660671 src/raft/uv_list.c:91 UvList segment 00000001043498
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903922106 660671 src/raft/uv_list.c:95 UvList ignore db.bin
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903924196 660671 src/raft/uv_list.c:95 UvList ignore db.bin-shm
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903926135 660671 src/raft/uv_list.c:95 UvList ignore db.bin-wal
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903928078 660671 src/raft/uv_list.c:95 UvList ignore dqlite-lock
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903929512 660671 src/raft/uv_list.c:68 UvList ignore metadata1
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903932234 660671 src/raft/uv_list.c:95 UvList ignore snapshot-1-104
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903950256 660671 src/raft/uv_list.c:80 UvList snapshot snapshot-1-104
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903953001 660671 src/raft/uv_list.c:95 UvList ignore snapshot-1-104
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302903963106 660671 src/raft/uv_list.c:80 UvList snapshot snapshot-1-104
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302906208040 660671 src/raft/uv.c:398 uvLoadSnapshotAndEntries most recent snapshot at 104349843
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302906209733 660671 src/raft/uv.c:278 uvFilterSegments most recent closed segment is 00000001043498
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302906211900 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043416
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302961603156 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043424
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037302974820578 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043426
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303025202291 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043434
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303038474234 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043437
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303088283365 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043445
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303101254844 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043447
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303151423433 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043455
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303164922603 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043457
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303214029794 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043465
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303227533892 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043467
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303277833741 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043475
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303294659476 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043477
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303343811754 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043486
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303357301453 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043488
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303408230794 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043496
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303421773750 660671 src/raft/uv_segment.c:908 uvSegmentLoadAll load segment 00000001043498
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303466062765 660671 src/raft/uv.c:509 uvLoad start index 104341652, 8627 entries
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303466065494 660671 src/raft/start.c:168 raft_start current_term: 1 voted_for: 0 start_index: 104341652 n_entries: 8627
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303466066628 660671 src/raft/start.c:174 raft_start restore snapshot with last index 104349843 and last term 1
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303466068300 660671 src/fsm.c:463 fsm__restore fsm restore
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: 1767037303466070448 660671 src/fsm.c:196 decodeDatabase main_size:442368 wal_size:337872
Dec 29 20:41:43 imatic-lxc02 lxd.daemon[660630]: lxd: src/fsm.c:205: decodeDatabase: Assertion `header.wal_size == 0' failed.
Dec 29 20:41:44 imatic-lxc02 lxd.daemon[659843]: Killed
Dec 29 20:41:44 imatic-lxc02 lxd.daemon[659843]: => LXD failed to start
Dec 29 20:41:44 imatic-lxc02 systemd[1]: snap.lxd.daemon.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 20:41:44 imatic-lxc02 systemd[1]: snap.lxd.daemon.service: Failed with result 'exit-code'.
Dec 29 20:41:44 imatic-lxc02 systemd[1]: snap.lxd.daemon.service: Scheduled restart job, restart counter is at 1.
Is direct 4 to 6 upgrade OK and supported? What can I do to complete my upgrade? Should I try upgrade to version 5 (5.21) first?
The only way for me to get stable system was to cancel upgrade - snap reverted to previous version and I restored the database files from my backup to /var/snap/lxd/common/lxd/database/ because schema was upgraded (expected error in log - Error: Error creating database: schema version '43' is more recent than expected '42').
Thank you for hints and help.
Jan Pekar