On 16/05/2019 19.09, Remi Gauvin wrote: > On 2019-05-16 10:54 a.m., Axel Burri wrote: > >> >> Any thoughts? I'm willing to implement such a feature in btrfs-progs if >> this sounds reasonable to you. >> > > > BTRFS qgroups are where this is implemented. You have to enable quotas, > and leaving quotas enabled has lots of problems, (mostly performance > related), so I would not suggest leaving them on when there is lots of > activity, (ie, multiple send/receive, or deletion of many snapshots.) > > But you can enable quotas as any time (btrfs quota enable /path) > > Wait for the rescan to finish > > btrfs quota rescan -s /path (to view status of scan) > > And then: > > btrfs qgroup show /path to list the space usage, (total, and what you're > looking for: Exclusive) > > Note that the default groups correspond to subvolume ID, not filename, > (someone did make a utility somewhere that will display this output with > corresponding directory names.) > > btrfs sub list /path is used to find the relevant ID's.. (I find the -o > option useful, so it only displays the subvolumes that are children to > the /path) > > As stated above, I would suggest disabling quotas when you are finished: > > btrfs quota disable /path Thanks for the tip, but this does not seem practicable for productive systems, as it involves enabling quotas, which had many problems in the past (not sure about the current state, but probably still true if I get you correctly). Nevertheless I played around with it and it seems to work, I'll keep it in mind for the future. - Axel