btrfs-progs: Documentaion: rename to .asciidoc
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-qgroup.asciidoc
1 btrfs-qgroup(8)
2 ===============
3
4 NAME
5 ----
6 btrfs-qgroup - control the quota group of a btrfs filesystem
7
8 SYNOPSIS
9 --------
10 *btrfs qgroup* <subcommand> <args>
11
12 DESCRIPTION
13 -----------
14 *btrfs qgroup* is used to control quota group(qgroup) of a btrfs filesystem.
15
16 NOTE: To use qgroup, it needs to enable quota first using *btrfs quota*
17 command.
18
19 WARNING: Qgroup is not stable yet and will impact performance in current mainline
20 kernel(v3.14 so far).
21
22 QGROUP
23 ------
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).
27
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.
30
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.
33
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.
36
37 SUBCOMMAND
38 ----------
39 *assign* <src> <dst> <path>::
40 Assign qgroup <src> as the child qgroup of <dst> in the btrfs filesystem
41 identified by <path>.
42
43 *create* <qgroupid> <path>::
44 Create a subvolume quota group.
45 +
46 For the '0/<subvolume id>' qgroup, a qgroup can be created even before the
47 subvolume created.
48
49 *destroy* <qgroupid> <path>::
50 Destroy a qgroup.
51 +
52 If a qgroup is no isolated,which means it is a parent or child qgroup, it
53 can't be destroyed.
54
55 *limit* [options] <size>|none [<qgroupid>] <path>::
56 Limit the size of a qgroup to <size> or no limit in the btrfs filesystem
57 identified by <path>.
58 +
59 If <qgroupid> is not given, qgroup of the subvolume identified by <path>
60 is used if possible.
61 +
62 `Options`
63 +
64 -c::::
65 limit amount of data after compression. This is the default, it is currently not
66 possible to turn off this option.
67 +
68 -e::::
69 limit space exclusively assigned to this qgroup.
70
71 *remove* <src> <dst> <path>::
72 Remove the relationship between child qgroup <src> and parent qgroup <dst> in
73 the btrfs filesystem identified by <path>.
74
75 *show* [options] <path>::
76 Show all qgroups in the btrfs filesystem identified by <path>.
77 +
78 `Options`
79 +
80 -p::::
81 print parent qgroup id.
82 -c::::
83 print child qgroup id.
84 -r::::
85 print limit of referenced size of qgroup.
86 -e::::
87 print limit of exclusive size of qgroup.
88 -F::::
89 list all qgroups which impact the given path(include ancestral qgroups)
90 -f::::
91 list all qgroups which impact the given path(exclude ancestral qgroups)
92 --raw::::
93 raw numbers in bytes, without the 'B' suffix.
94 --human-readable::::
95 print human friendly numbers, base 1024, this is the default
96 --iec::::
97 select the 1024 base for the following options, according to the IEC standard.
98 --si::::
99 select the 1000 base for the following options, according to the SI standard.
100 --kbytes::::
101 show sizes in KiB, or kB with --si.
102 --mbytes::::
103 show sizes in MiB, or MB with --si.
104 --gbytes::::
105 show sizes in GiB, or GB with --si.
106 --tbytes::::
107 show sizes in TiB, or TB with --si.
108 --sort=[\+/-]<attr>[,[+/-]<attr>]...::::
109 list qgroups in order of <attr>.
110 +
111 <attr> can be one or more of qgroupid,rfer,excl,max_rfer,max_excl.
112 +
113 Prefix \'+' means ascending order and \'-' means descending order of <attr>.
114 If no prefix is given, use ascending order by default.
115 +
116 If multiple <attr>s is given, use comma to separate.
117
118 EXIT STATUS
119 -----------
120 *btrfs qgroup* returns a zero exit status if it succeeds. Non zero is
121 returned in case of failure.
122
123 AVAILABILITY
124 ------------
125 *btrfs* is part of btrfs-progs.
126 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
127 further details.
128
129 SEE ALSO
130 --------
131 `mkfs.btrfs`(8),
132 `btrfs-subvolume`(8),
133 `btrfs-quota`(8),