6 btrfs-qgroup - control the quota group of a btrfs filesystem
10 *btrfs qgroup* <subcommand> <args>
14 *btrfs qgroup* is used to control quota group(qgroup) of a btrfs filesystem.
16 NOTE: To use qgroup, it needs to enable quota first using *btrfs quota*
19 WARNING: Qgroup is not stable yet and will impact performance in current mainline
24 Quota group or qgroup in btrfs has its hierarchy like subvolume.
25 One subvolume/snapshot can reach its quota limits if it consumes all the quota
26 assigned to it or any of the parent qgroup(s).
28 Also for snapshot, it consumes no quota initially since all its data
29 shares with its parent, so only modification in snapshot consumes quota.
31 Every subvolume/snapshot will have its own qgroup with id '0/<subvolume id>'
32 upon creating, but can be later destroyed by *btrfs qgroup destroy* command.
34 NOTE: If the qgroup of a subvolume is destroyed, quota about the subvolume
35 will not be functional until qgroup '0/<subvolume id>' is created again.
39 *assign* <src> <dst> <path>::
40 Assign qgroup <src> as the child qgroup of <dst> in the btrfs filesystem
43 *remove* <src> <dst> <path>::
44 Remove the relationship between child qgroup <src> and parent qgroup <dst> in
45 the btrfs filesystem identified by <path>.
47 *create* <qgroupid> <path>::
48 Create a subvolume quota group.
50 For the '0/<subvolume id>' qgroup, a qgroup can be created even before the
53 *destroy* <qgroupid> <path>::
56 If a qgroup is no isolated,which means it is a parent or child qgroup, it
59 *show* [options] <path>::
60 Show all qgroups in the btrfs filesystem identified by <path>.
65 print parent qgroup id.
67 print child qgroup id.
69 print max referenced size of qgroup.
71 print max exclusive size of qgroup.
73 list all qgroups which impact the given path(include ancestral qgroups)
75 list all qgroups which impact the given path(exclude ancestral qgroups)
76 --sort=[\+/-]<attr>[,[+/-]<attr>]...::::
77 list qgroups in order of <attr>.
79 <attr> can be one or more of qgroupid,rfer,excl,max_rfer,max_excl.
81 Prefix \'+' means ascending order and \'-' means descending order of <attr>.
82 If no prefix is given, use ascending order by default.
84 If multiple <attr>s is given, use comma to separate.
86 *limit* [options] <size>|none [<qgroupid>] <path>::
87 Limit the size of a qgroup to <size> or no limit in the btrfs filesystem
90 If <qgroupid> is not given, qgroup of the subvolume identified by <path>
95 *btrfs qgroup* returns a zero exist status if it succeeds. Non zero is
96 returned in case of failure.
100 *btrfs* is part of btrfs-progs.
101 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
107 `btrfs-subvolume`(8),