Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove btrfs quota qgroup after deleting BTRFS snapshot in Snapper #325

Open
MurzNN opened this issue Feb 9, 2017 · 4 comments

Comments

@MurzNN
Copy link

commented Feb 9, 2017

We have the problem with snapper and btrfs snapshots on btrfs quota enabled storage: when btrfs delete snapshot - it don't delete qgroup for this snapshot, so after deleting snapshot via snapper - we god wrong quota counts in disks.

Here is documentation about this: https://btrfs.wiki.kernel.org/index.php/Quota_support

Using btrfs subvolume delete will break qgroup unshared space usage.
After deleting a subvolume, you must manually delete the associated qgroup.

Please add to snapper checking if btrfs quota enabled and if yes - remove qgroup after deleting snapshot.

@MurzNN

This comment has been minimized.

Copy link
Author

commented Feb 9, 2017

Here is kernel bug threads about this:

And here is same bug in other script digint/btrbk#49

@aschnell

This comment has been minimized.

Copy link
Member

commented Feb 9, 2017

There is code to delete the qgroup: https://github.com/openSUSE/snapper/blob/master/snapper/Btrfs.cc#L411

Is your snapper build with quota support?

@aschnell aschnell added the enhancement label Feb 9, 2017
@MurzNN

This comment has been minimized.

Copy link
Author

commented Feb 9, 2017

Thanks, good to hear that this is already implemented! Btrfs have quota support, because I can work with quota via commands. But I have use too old version of snapper (0.1.8) seems this feature is missed in this version, so I try to upgrade and recheck. In which version this is implemented at first time?

@aschnell

This comment has been minimized.

Copy link
Member

commented Feb 9, 2017

Likely with the space aware cleanup in version 0.3.0 (2016-04-06).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.