Removing snapshots fails if BTRFS quota groups (qgroups) is disabled (original) (raw)

This repository was archived by the owner on Oct 16, 2022. It is now read-only.

This repository was archived by the owner on Oct 16, 2022. It is now read-only.

@twoktwok

Description

If ...

... Timeshift fails to completely remove snapshots on the first try.

e. g. (sample output)

-------------
[...]
E: ERROR: can't list qgroups: quotas not enabled

E: btrfs returned an error: 256
E: Failed to query subvolume quota
[...]
-------------
Removing snapshot: 2020-12-02_20-08-29
Deleting subvolume: @ (Id:1513)
Deleted subvolume: @ (Id:1513)

Destroying qgroup: 0/1513
E: Failed to destroy qgroup: '0/1513'
E: Failed to remove snapshot: 2020-12-02_20-08-29
-------------

Problem: On this first try everything except the snapshots "info.json" file is actually deleted. This causes Timeshift to still list this snapshot! A second remove attempt then successfully removes the already deleted snapshot from the list.
This behaviour seriously messes up scheduling because actually deleted snapshots are still counted.

I assume the check and failure to "destroy qgroup" error causes the remove process to exit before info.json and the snapshot folder are deleted.


System:

Note: I have experienced some serious system freezes on a low-spec machine caused by [btrfs-cleaner] and [btrfs-transaction] after removing snapshots through timeshift. This issue vanishes when btrfs quotas are disabled. That's when I noticed the above bug.