Trying to remove a container - Cannot remove a volume that has snapshots

Hello,

I am trying to remove a container but it complains it has a snapshot, but there isn´t a snapshot. How can i delete this container? I use BTRFS as a storage backend.

Hi,
I suppose you have checked with that command lxc info <container_name>?
Can you execute the following command.
lxd sql global "select * from storage_volumes_snapshots;" That shows you the storage snapshots.

Regards.

Hi,

lxc info container shows that there are no snapshots

lxd sql global "select * from storage_volumes_snapshots;" shows

+----+-------------------+------+-------------+-------------+
| id | storage_volume_id | name | description | expiry_date |
+----+-------------------+------+-------------+-------------+
+----+-------------------+------+-------------+-------------+

Fine, you can remove snapshot subvolume then something like that btrfs subvolume delete <mount_point>/containers-snapshots/<snapshot_name>.
Not sure that the command is correct or not but you can examine the usage of the btrfs command.
Regards.

i mounted my partition and did a btrfs subvol list . and i deleted the snapshot directory for that container. After that i could delete the container :wink:

thanks!