On 2019/3/2 下午2:23, Andrei Borzenkov wrote: > Is there any user-space tool that can produce report similar to "btrfs > qgroup show" with multi-level qgroups? To clarify what I mean - here is > "btrfs qgroup show" output from openSUSE with enabled snapper. > > qgroupid rfer excl parent > -------- ---- ---- ------ > ... > 0/259 6.17GiB 262.43MiB --- > ... > 0/702 6.03GiB 1.30GiB 1/0 > 0/718 6.04GiB 89.88MiB 1/0 > 0/720 6.52GiB 87.28MiB 1/0 > 0/724 6.10GiB 29.16MiB 1/0 > 0/727 6.78GiB 217.02MiB 1/0 > 0/729 6.24GiB 39.25MiB 1/0 > 0/731 6.65GiB 72.67MiB 1/0 > 0/732 6.24GiB 212.18MiB 1/0 > 0/741 6.35GiB 778.79MiB 1/0 > 0/742 6.58GiB 74.09MiB 1/0 > 1/0 20.33GiB 14.42GiB --- > ... > > Without qgroups there is really no way to find out how much space > snapshots are taking. "btrfs fi du" just shows equivalent of "rfer" and > "excl" for each subvolume, but there is no way you can compute the > values shown for 1/0 qgroup from individual numbers. > > I do not think "btrfs fi du" can do it as it only knows whether extent > is shared or not, it cannot know whether extent is shared between > specific subvolumes. No, there is really no good way to do the same work of qgroup. > > Is something like this even possible in user space without qgroups? It > is well known that qgroups are frowned upon and common advice is to > disable them as soon as someone reports performance issues. There are incoming improvements for qgroup, especially solves the performance for qgroup + balance, the biggest performance pitfall. The target is v5.1 or v5.2. And there is planned enhancement to imoprove the backref walk code, to improve the overall performance of qgroup. So feel free to try out qgroup in v5.2. Thanks, Qu
Attachment:
signature.asc
Description: OpenPGP digital signature
