I’ve got several ZFS storage pools. Unfortunately, the ZFS storage pool is… giving some issues when I am trying to remove ‘default’ storage pool since I have named storage pools specifically for containers or for VMs separately.
That’s the thing - the thing says that the snapshot doesnt exist when I try to delete it. I also cant delete the instance at the moment because its powering the DNS on my system.
In effect LXD says the snapshot doesnt exist yet it also says the snapshot exists at the same time.
All requested commands, plus the attempt to delete the nonexistent snapshot. It’s almost like LXD and ZFS are out of sync and in an inconsistent state…
$ sudo zfs list -t snapshot
no datasets available
$ lxc storage volume list default
+----------------------+-----------------+-------------+---------+
| TYPE | NAME | DESCRIPTION | USED BY |
+----------------------+-----------------+-------------+---------+
| container (snapshot) | local-dns/snap0 | | 1 |
+----------------------+-----------------+-------------+---------+
$ lxc storage show default
config:
size: 100GB
source: /var/snap/lxd/common/lxd/disks/default.img
zfs.pool_name: default
description: ""
name: default
driver: zfs
used_by:
- /1.0/containers/local-dns/snapshots/snap0
status: Created
locations:
- none
$ lxc delete local-dns/snap0
Error: Failed to fetch snapshot "snap0" of instance "local-dns" in project "default": No such object
Yeah earlier today actually the ZFS pool for default seemed to up and go away - the .img disappeared entirely so it was nonexistent. I’m guessing this is why it’s in an inconsistent state. Unfortunately, that poses some headaches. Any way to force LXD to forget the snapshot and then just remove the ‘default’ store from LXD?
According to that the main volume for local-dns is also missing, so surprised that your container for local-dns is still running (you mentioned you couldn’t delete the container as it was in use)?
@stgraber@freeekanayaka do you have any thoughts on this one, something appears strange with the database, there are snapshot results coming out of lxc storage volume list that dont show in lxd sql global 'select * from storage_volumes_snapshots'?
How does one get the r/o copy of the SQLITE DB for analysis with Snap?