Deleted all snapshots with ZFS, now LXD is not aware of it and still lists all snapshots

Hi guys,
I was running out of space on a LXD node and I didn’t know how to remove the many snapshots each container had, fast as the containers had no IPs and services were not reacheable.

LXC was giving me errors when trying to delete containers because it had no space and because the presence of snapshots.

So in the end I decidedto use ZFS to remove them all.
Now LXD is not aware these are gone and won’t allow me to perform certain actions, like delete a container, because “snapshots exist”.

Any way I can make LXD recalculate or recheck the existence (or rather lack of existence) of these snapshots?

Thanks a lot.

The less hacky way would be to recreate similar snapshots to the sbapshots you deleted. You could also play at interfering further with LXD by meddling with its database.
The best way to delete lots of snapshots you presumably created with a script is to write another script to do it.

1 Like

I really wanted to avoid learning how the DB works, but I guess this is a really good chance to start, hehehe.

Thank you @gpatel-fr