What is Btrfs quota?

What is Btrfs quota?

btrfs quota is used to enable/disable or rescan subvolume quota of a btrfs filesystem. For setting quota or other quota operations on a btrfs filesystem, please see btrfs-qgroup(8) for details. Warning Quota and qgroup in btrfs filesystem is not stable and impacts performance in mainline kernel yet(v3. 14 so far).

How do I check my Btrfs quota?

Using limits To set a limit, you use the command btrfs qgroup limit , you can apply it to any qgroup and set a total limit, unshared limit (-e) or compressed limit (-c). To show usage and limits for a given path within a filesystem use btrfs qgroup show -reF /mountpoint/path1/path2/ .

How secure is btrfs?

All data (except the boot loader and kernel) is encrypted. Btrfs works safely with partition encryption (luks/dm-crypt) since Linux 3.2. Earlier kernels will start up in this mode, but are known to be unsafe and may corrupt due to problems with dm-crypt write barrier support.

What is Btrfs subvolume?

A subvolume is a part of filesystem with its own independent file/directory hierarchy. Note: A subvolume in btrfs is not like an LVM logical volume, which is block-level snapshot while btrfs subvolumes are file extent-based. A subvolume looks like a normal directory, with some additional operations described below.

How are quotas managed in the Btrfs filesystem?

The commands under btrfs quota are used to affect the global status of quotas of a btrfs filesystem. The quota groups (qgroups) are managed by the subcommand btrfs qgroup (8). Note: Qgroups are different than the traditional user quotas and designed to track shared and exclusive data per-subvolume.

What happens if I delete a qgroup in Btrfs?

Creating a qgroup from an existing directory will show a 0 usage until a full filesystem quota rescan is issued. Using btrfs subvolume delete will break qgroup unshared space usage. After deleting a subvolume, you must manually delete the associated qgroup.

Which is the quota group in subvolume snapshot?

The basic notion of the Subvolume Quota feature is the quota group, short qgroup. Qgroups are notated as level/id, eg. the qgroup 3/2 is a qgroup of level 3. For level 0, the leading 0/ can be omitted. Qgroups of level 0 get created automatically when a subvolume/snapshot gets created.

How are quota groups assigned in kernel 3.11?

Since kernel 3.11 [1], it is possible to rescan the filesystem so that subvolumes created before quota was enabled gets accounted for. In the quota system, each subvolume is assigned a quota groups in the form of 0/ . It is possible to create a quota group identified with any number but by default the subvolume ID is used.