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

Request: subvolume qgroup stats #38

Open
daviessm opened this issue Mar 1, 2022 · 1 comment
Open

Request: subvolume qgroup stats #38

daviessm opened this issue Mar 1, 2022 · 1 comment

Comments

@daviessm
Copy link

daviessm commented Mar 1, 2022

I have a script which lists all subvolumes for a filesystem and saves their usage referenced and exclusive values to a database for further analysis. Currently this calls btrfs subvolume show from btrfs-progs for each subvolume. It would be nice if I could use python-btrfs for this instead.

Ideally there would be an easy way to retrieve all the information provided by btrfs subvolume show.

@knorrie
Copy link
Owner

knorrie commented Mar 2, 2022

Hi! Yes, the qgroup related metadata objects are part of the collection (which is getting smaller \o/) of items that have not been implemented yet.

So, after getting scrub in a workable state, this seems to be the next thing we're going to have a look at.

What you already can do now to help is:

  • Start writing some program using python-btrfs that can do whatever the library already allows. So, basically, the end result you want, but without the qgroup information yet.
  • Have a look at the btrfs-progs code, to see in which way it's retrieving the qgroup data that you want to see. In the end, in the python code, you probably will have to do a similar thing. Iterate over subvolumes (tree root numbers), and then execute some other metadata search operation to get the relevant qgroup info for each of them.

Knorrie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants