Re: Used disk size of a received subvolume?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux