table of contents
BTRFS-QGROUP(8) | Btrfs Manual | BTRFS-QGROUP(8) |
NAME¶
btrfs-qgroup - control the quota group of a btrfs filesystem
SYNOPSIS¶
btrfs qgroup <subcommand> <args>
DESCRIPTION¶
btrfs qgroup is used to control quota group (qgroup) of a btrfs filesystem.
Note
To use qgroup you need to enable quota first using btrfs quota enable command.
Warning
Qgroup is not stable yet and will impact performance in current mainline kernel (v3.14 so far).
QGROUP¶
Quota groups or qgroup in btrfs make a tree hierarchy, the leaf qgroups are attached to subvolumes. The size limits are set per qgroup and apply when any limit is reached in tree that contains a given subvolume.
The limits are separated between shared and exclusive and reflect the extent ownership. For example a fresh snapshot shares almost all the blocks with the original subvolume, new writes to either subvolume will raise towards the exclusive limit.
The qgroup identifiers conform to level/id where level 0 is reserved to the qgroups associated with subvolumes. Such qgroups are created automatically.
The qgroup hierarchy is built by commands create and assign.
Note
If the qgroup of a subvolume is destroyed, quota about the subvolume will not be functional until qgroup 0/<subvolume id> is created again.
SUBCOMMAND¶
assign [options] <src> <dst> <path>
Options
--rescan
--no-rescan
create <qgroupid> <path>
For the 0/<subvolume id> qgroup, a qgroup can be created even before the subvolume created.
destroy <qgroupid> <path>
If a qgroup is no isolated,which means it is a parent or child qgroup, it can’t be destroyed.
limit [options] <size>|none [<qgroupid>] <path>
If <qgroupid> is not given, qgroup of the subvolume identified by <path> is used if possible.
Options
-c
-e
remove <src> <dst> <path>
show [options] <path>
Options
-p
-c
-r
-e
-F
-f
--raw
--human-readable
--iec
--si
--kbytes
--mbytes
--gbytes
--tbytes
--sort=[+/-]<attr>[,[+/-]<attr>]...
<attr> can be one or more of qgroupid,rfer,excl,max_rfer,max_excl.
Prefix '+' means ascending order and '-' means descending order of <attr>. If no prefix is given, use ascending order by default.
If multiple <attr>s is given, use comma to separate.
--sync
EXIT STATUS¶
btrfs qgroup returns a zero exit status if it succeeds. Non zero is returned in case of failure.
AVAILABILITY¶
btrfs is part of btrfs-progs. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for further details.
SEE ALSO¶
08/03/2017 | Btrfs v4.9.1 |