Some of my containers have all their snapshots that are not deleted automatically after their expiration date (possible to delete manually). I am using /snap/bin/lxd.lxc config set c1 snapshots.expiry "7d" to make my snapshots in a bash script.
The expiry dates for each container are mentioned in the column “EXPIRES AT”. The command lxc config get c1 snapshots.expiry also shows me the correct expiration date.
The strange thing is that on another server that hosts LXD of the same version, there is no such problem.
Also note that there is a snapshot of a container that I can’t delete manually with lxc delete c1/c1-09-04-2022. Here is the error:
Error: Failed setting subvolume writable “/var/snap/lxd/common/lxd/storage-pools/default/containers-snapshots/c1/c1-09-04-2022”: Failed to run: btrfs property set -ts /var/snap/lxd/common/lxd/storage-pools/default/containers-snapshots/c1/c1-09-04-2022 ro false: ERROR: Could not set subvolume flags: Read-only file system
Thank you in advance for your help.
LXD version (snap) : 5.0.0
Host OS : Debian 10
Containers OS : Debian 10/11
time=“2022-04-20T04:59:06Z” level=warning msg=" - Couldn’t find the CGroup blkio.weight, disk priority will be ignored"
time=“2022-04-20T04:59:06Z” level=warning msg=" - Couldn’t find the CGroup hugetlb controller, hugepage limits will be ignored"
time=“2022-04-20T04:59:06Z” level=warning msg=" - Couldn’t find the CGroup memory swap accounting, swap limits will be ignored"
time=“2022-04-20T04:59:09Z” level=warning msg=“Failed to initialize fanotify, falling back on fsnotify” err=“Failed to initialize fanotify: invalid argument”
time=“2022-04-30T11:59:29Z” level=warning msg=“Transaction timed out. Retrying once” err=“failed to begin transaction: context deadline exceeded” member=1
Good news, the automatic update of LXD (5.1) corrected my problem. It’s frustrating not knowing exactly what caused it but it’s likely that there is a bug on version 5.0.
Thanks for your help @stgraber and if anyone has the answer to the problem, I would be interested. Maybe it will help people who had the same problem.