# info > BTRFS-QUOTA

---
type: CommandReference
command: btrfs-quota
mode: man
section: 8
source: man-pages
---

## Quick Reference

- `btrfs quota enable /mnt` — Enable quota support on the filesystem
- `btrfs quota disable /mnt` — Disable quota support
- `btrfs quota rescan /mnt` — Rebuild qgroup numbers from metadata
- `btrfs quota rescan -s /mnt` — Show status of a running rescan
- `btrfs quota rescan -w /mnt` — Wait for an ongoing rescan to complete

## Name

`btrfs-quota` — enable, disable, or rescan quota on a btrfs filesystem

## Synopsis

btrfs quota <subcommand> <path>
## Subcommands

- **`enable` `<path>`** — Enable quota support for the filesystem.
- **`disable` `<path>`** — Disable quota support for the filesystem.
- **`rescan [options] <path>`**  
  Discard existing qgroup numbers and rescan metadata using the current configuration.  
  Options:
  - `-s` — show status of an in‑progress rescan
  - `-w` — wait for a rescan to finish (can be already running)

## Concepts

Quota groups (qgroups) track space usage per subvolume and can be organised hierarchically.

- **referenced** — total data reachable from any subvolume in the qgroup
- **exclusive** — data whose *only* references come from within the qgroup; i.e. space freed if all subvolumes are deleted
- Qgroup notation: `level/id` (level‑0 groups are created automatically, matching subvolume IDs; level 0 can be omitted, e.g. `0/5` is the root subvolume’s group)
- Higher‑level groups can contain lower‑level ones, forming a tree. Limits are placed on a group’s **referenced** amount.
- Creating a snapshot requires careful tracking of exclusive counts; this is handled internally by “tracking qgroups”.
- Activation of quotas incurs a performance cost on every extent operation; enable only when needed.

For detailed examples (partition replacement, user home restriction, snapshot accounting) see the full btrfs‑quota man page.

## See Also

- [mkfs.btrfs(8)](http://localhost/phpMan.php/man/mkfs.btrfs/8/markdown)
- [btrfs-subvolume(8)](http://localhost/phpMan.php/man/btrfs-subvolume/8/markdown)
- [btrfs-qgroup(8)](http://localhost/phpMan.php/man/btrfs-qgroup/8/markdown)

## Exit Codes

- **0** — success
- **non‑zero** — failure