I also have the same error with all my containers which have snapshots after a snap auto upgrade to lxd 5.2.
Some more info in case it helps track down whatās going on:
edit:
Linux Mint 20
kernel 5.4.0-113-generic
zfs-0.8.3-1ubuntu12.14
zfs-kmod-0.8.3-1ubuntu12.13
$ lxc list
+-----------------------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-----------------------+---------+------+------+-----------+-----------+
| streamline-ld | STOPPED | | | CONTAINER | 3 |
+-----------------------+---------+------+------+-----------+-----------+
| streamline-schools-db | STOPPED | | | CONTAINER | 4 |
+-----------------------+---------+------+------+-----------+-----------+
| Sphere-clients | STOPPED | | | CONTAINER | 0 |
+-----------------------+---------+------+------+-----------+-----------+
| SphereCRM | STOPPED | | | CONTAINER | 3 |
+-----------------------+---------+------+------+-----------+-----------+
$ lxc start streamline-ld
Error: Instance snapshot record count doesn't match instance snapshot volume record count
Try `lxc info --show-log streamline-ld` for more info
$ lxc info --show-log streamline-ld
Name: streamline-ld
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2019/10/01 13:29 BST
Last Used: 2020/07/25 15:34 BST
Snapshots:
+-------------------------------+----------------------+------------+----------+
| NAME | TAKEN AT | EXPIRES AT | STATEFUL |
+-------------------------------+----------------------+------------+----------+
| 2019.10.01-working | 2019/10/01 15:36 BST | | NO |
+-------------------------------+----------------------+------------+----------+
| 2020.07.25-before-apt-upgrade | 2020/07/25 15:36 BST | | NO |
+-------------------------------+----------------------+------------+----------+
| before-php-upgrade | 2019/10/01 14:36 BST | | NO |
+-------------------------------+----------------------+------------+----------+
Log:
$ lxc storage list
+---------+--------+-----------+-------------+---------+---------+
| NAME | DRIVER | SOURCE | DESCRIPTION | USED BY | STATE |
+---------+--------+-----------+-------------+---------+---------+
| default | zfs | rpool/lxd | | 12 | CREATED |
+---------+--------+-----------+-------------+---------+---------+
$ lxc storage show default
config:
source: rpool/lxd
volatile.initial_source: rpool/lxd
zfs.pool_name: rpool/lxd
description: ""
name: default
driver: zfs
used_by:
- /1.0/instances/streamline-ld
- /1.0/instances/streamline-ld%252F2019.10.01-working
- /1.0/instances/streamline-ld%252Fbefore-php-upgrade
- /1.0/instances/streamline-schools-db
- /1.0/instances/streamline-schools-db%252F2019.10.01-before-apt-upgrade
- /1.0/instances/streamline-schools-db%252F2019.10.01-uptodate
- /1.0/instances/streamline-schools-db%252Fpost_install
- /1.0/instances/Sphere-clients
- /1.0/instances/SphereCRM
- /1.0/instances/SphereCRM%252Finstalled_mariadb
- /1.0/instances/SphereCRM%252Fmapped-bungle
- /1.0/profiles/default
status: Created
locations:
- none
$ lxd sql global "SELECT vs.* FROM instances AS v INNER JOIN instances_snapshots AS vs ON v.id = vs.instance_id WHERE v.name = 'streamline-ld'"
+----+-------------+-------------------------------+--------------------------------+----------+-------------+----------------------+
| id | instance_id | name | creation_date | stateful | description | expiry_date |
+----+-------------+-------------------------------+--------------------------------+----------+-------------+----------------------+
| 7 | 11 | 2019.10.01-working | 2019-10-01T14:36:05.445284215Z | 0 | | 0001-01-01T00:00:00Z |
| 9 | 11 | 2020.07.25-before-apt-upgrade | 2020-07-25T14:36:15.707635639Z | 0 | | 0001-01-01T00:00:00Z |
| 6 | 11 | before-php-upgrade | 2019-10-01T13:36:29.683017681Z | 0 | | 0001-01-01T00:00:00Z |
+----+-------------+-------------------------------+--------------------------------+----------+-------------+----------------------+
$ lxd sql global "SELECT vs.* FROM storage_volumes AS v INNER JOIN storage_volumes_snapshots AS vs ON v.id = vs.storage_volume_id WHERE v.name = 'streamline-ld'"
+----+-------------------+-------------------------------+-------------+---------------------------+
| id | storage_volume_id | name | description | expiry_date |
+----+-------------------+-------------------------------+-------------+---------------------------+
| 20 | 16 | 2020.07.25-before-apt-upgrade | | 0000-12-31T23:58:45-00:01 |
+----+-------------------+-------------------------------+-------------+---------------------------+
$ lxc storage volume ls default
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| TYPE | NAME | DESCRIPTION | CONTENT-TYPE | USED BY |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container | streamline-ld | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | streamline-ld/2019.10.01-working | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | streamline-ld/2020.07.25-before-apt-upgrade | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | streamline-ld/before-php-upgrade | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container | streamline-schools-db | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | streamline-schools-db/2019.10.01-before-apt-upgrade | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | streamline-schools-db/2019.10.01-uptodate | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | streamline-schools-db/2020.07.25-before-apt-upgrade | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | streamline-schools-db/post_install | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container | Sphere-clients | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container | SphereCRM | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | SphereCRM/2020.07.25-before-apt-upgrade | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | SphereCRM/installed_mariadb | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
| container (snapshot) | SphereCRM/mapped-bungle | | filesystem | 1 |
+----------------------+-----------------------------------------------------+-------------+--------------+---------+
$ zfs list -r -t snapshot rpool/lxd/containers/streamline-ld
NAME USED AVAIL REFER MOUNTPOINT
rpool/lxd/containers/streamline-ld@snapshot-before-php-upgrade 57.7M - 799M -
rpool/lxd/containers/streamline-ld@snapshot-2019.10.01-working 86.5M - 813M -
rpool/lxd/containers/streamline-ld@snapshot-2020.07.25-before-apt-upgrade 63.3M - 785M -
rpool/lxd/containers/streamline-ld@monthly-2021.07.01 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2021.08.06 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2021.09.01 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2021.10.01 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2021.11.01 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2021.12.01 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2022.01.01 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2022.02.01 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2022.03.01 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2022.04.01 0B - 794M -
rpool/lxd/containers/streamline-ld@weekly-2022.04.25 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2022.05.01 0B - 794M -
rpool/lxd/containers/streamline-ld@weekly-2022.05.02 0B - 794M -
rpool/lxd/containers/streamline-ld@weekly-2022.05.09 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.16 0B - 794M -
rpool/lxd/containers/streamline-ld@weekly-2022.05.16 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.17 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.18 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.19 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.20 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.21 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.22 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.23 0B - 794M -
rpool/lxd/containers/streamline-ld@weekly-2022.05.23 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.24 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.25 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.26 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.28 0B - 794M -
rpool/lxd/containers/streamline-ld@weekly-2022.05.30 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.05.31 0B - 794M -
rpool/lxd/containers/streamline-ld@monthly-2022.06.03 0B - 794M -
rpool/lxd/containers/streamline-ld@daily-2022.06.03 0B - 794M -