-
Notifications
You must be signed in to change notification settings - Fork 281
Removing snapshots fails if BTRFS quota groups (qgroups) is disabled #680
Comments
@twoktwok if I have some spare time I will look at the sources and see if this error can be avoided. At least a check if the option is enabled could be added, I guess. |
I can confirm these error messages: I can find them in the logs when I disabled quota and deselected the option to enable them again (to avoid #697) as you described. I had some fun browsing the code: The message "Failed to query subvolume quota" is printed in Main.vala:3979 in method As far as I understand, the updating of the btrfs snapshot sizes fails. No idea, where this is used for what reason. The other message "Failed to destroy qgroup" is printed in Subvolume.vala:177 in When the qgroup cannot be deleted in The question is (e.g. @teejee2008): What should be the correct behaviour?
Once this we agree on the expected behaviour, it shouldn't be too complicated to provide a PR. I'm looking forward to hear your thoughts. |
Can this please get resolved ASAP? My system hardlocks for 9/10ths of the time it's online due to these stupid quota groups, and if I disable them I may acidentally rollback a snapshot which is already deleted (would this brick my system?) |
@teejee2008: Has there been any progress on this? This is a major bug. As said by the previous comment, it is not possible to delete snapshots when qgroups are disabled. I disabled them both in the timeshift settings and system wide but still, attempting to delete snapshots will fail with the error that has been mentioned here before. It's also very annoying because when having the system configured to create a snapshot when installing packages, there will be a dozen of error messages due to this bug. And if you enable qgroups, the system will constantly freeze up for a long time.. I would appreciate if this can be resolved. Thanks! |
I'd like to give this my +1 as I'm also encountering this problem. |
As a workaround I do enable quota groups from time to time and disable again after deleting snapshots. This seems to work ... well ... |
I'm facing this problem too, I hope for a fix ASAP. |
Second this, inability to run properly without btrfs quota is serious issue. Before diving more into the issue I suspected that hardware/HDD issue is freezing my machine. Only because I installed btrfs & timeshift to second machine I realized this must be software bug. Cost me hours to diagnose and find a reason, which is btrfs quotas and Timeshift triggering btrfs-cleaner. |
It's not a fix, but I found a workaround.
Even though the config files are the same for me, the behaviour of timeshift changes and it works without errors again. |
If ...
sudo btrfs quota disable /
)... Timeshift fails to completely remove snapshots on the first try.
e. g. (sample output)
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.
The text was updated successfully, but these errors were encountered: