BTRFS(8)

๐Ÿ’– btrfs โ€” the btrfs(8) manual, but make it bestie ๐Ÿ’–

okay so bestie, welcome to btrfs, the toolbox for managing btrfs filesystems โœจ this is the manual page for the btrfs utility itself (that's the manual name, and honestly it's giving main character energy).


โœจ SYNOPSIS โœจ

btrfs [global options] <group> [<group>...] <command> [options] [<args>]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

So like, the btrfs utility is a toolbox for managing btrfs filesystems. It's got command groups for subvolumes, for devices, for whole-filesystem stuff, and for other specific actions too. Peep the COMMANDS section for the full roster ๐Ÿ’…

There are also standalone tools for some tasks โ€” think btrfs-convert(8) or btrfstune(8) โ€” that were historically separate and/or just haven't been merged into the main utility yet. More deets in STANDALONE TOOLS ๐Ÿฆ‹

And for other topics (mount options, etc.) please go look at the separate manual page btrfs(5) instead, okay? Not my department, that one's its own thing ๐Ÿ’œ


๐ŸŽ€ COMMAND SYNTAX ๐ŸŽ€

Any command name can be shortened, as long as the shortened form is unambiguous. BUT โ€” and this is important, bestie โ€” it's recommended to use full command names in scripts. Don't be chaotic in your scripts, it's not cute ๐ŸŒˆ

Every command group has its own manual page named btrfs-<group>.

For example: you can run btrfs sub snaps instead of btrfs subvolume snapshot. But btrfs file s is not allowed, because file s might be interpreted as either filesystem show or filesystem sync. Ambiguity is not the vibe ๐Ÿ™ˆ

If the command name is ambiguous, the list of conflicting options gets printed at you. Read it. It's helping.

Sizes โ€” both on input and output โ€” can be expressed in either SI or IEC-I units (see numfmt(1)) with the suffix B appended. And all numbers will be formatted according to the rules of the C locale, ignoring the shell locale (see locale(7)). Yes really, C locale, always, no cap ๐Ÿ’€

Wanna get the overview of a given command? Use btrfs command --help, or btrfs [command...] help --full to print all the available options for all the commands. Obsessed.

There are also global options that get passed between btrfs and the group name, and they affect behaviour that isn't specific to the command โ€” like verbosity or the type of output:

btrfs -q subvolume create ...
btrfs --dry-run subvolume create ...

global options, bestie ๐Ÿ’…

  • --format <format> โ€” if the command supports it, print subcommand output in that format (text, json)
  • -v, --verbose โ€” increase the verbosity of the subcommand (chatty mode, love that for us)
  • -q, --quiet โ€” print only errors (minimalist queen โœจ)
  • --log <level> โ€” set the log level (default, info, verbose, debug, quiet)

The remaining options are relevant only for the main tool:

  • --help โ€” print condensed help for all subcommands
  • --version โ€” print version string

๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

okay here's the lineup, each group has its own whole manual page:

  • balance โ€” Balance btrfs filesystem chunks across single or several devices. See btrfs-balance(8) for details.
  • check โ€” Do off-line check on a btrfs filesystem. See btrfs-check(8) for details.
  • device โ€” Manage devices managed by btrfs, including add/delete/scan and so on. See btrfs-device(8) for details.
  • filesystem โ€” Manage a btrfs filesystem, including label setting/sync and so on. See btrfs-filesystem(8) for details.
  • inspect-internal โ€” Debug tools for developers/hackers. See btrfs-inspect-internal(8) for details.
  • property โ€” Get/set a property from/to a btrfs object. See btrfs-property(8) for details.
  • qgroup โ€” Manage quota group (qgroup) for btrfs filesystem. See btrfs-qgroup(8) for details.
  • quota โ€” Manage quota on btrfs filesystem like enabling/rescan and etc. See btrfs-quota(8) and btrfs-qgroup(8) for details.
  • receive โ€” Receive subvolume data from stdin/file for restore and etc. See btrfs-receive(8) for details.
  • replace โ€” Replace btrfs devices. See btrfs-replace(8) for details.
  • rescue โ€” Try to rescue damaged btrfs filesystem. See btrfs-rescue(8) for details.
  • restore โ€” Try to restore files from a damaged btrfs filesystem. See btrfs-restore(8) for details.
  • scrub โ€” Scrub a btrfs filesystem. See btrfs-scrub(8) for details.
  • send โ€” Send subvolume data to stdout/file for backup and etc. See btrfs-send(8) for details.
  • subvolume โ€” Create/delete/list/manage btrfs subvolume. See btrfs-subvolume(8) for details.

๐Ÿฆ‹ STANDALONE TOOLS ๐Ÿฆ‹

So new functionality can be provided using a standalone tool. And if that functionality proves to be useful, then the standalone tool gets declared obsolete and its functionality gets copied over into the main tool. Obsolete tools are removed after a long (years) depreciation period. It's a whole lifecycle, it's giving evolution ๐Ÿงš

Tools that are still in active use without an equivalent in btrfs:

  • btrfs-convert โ€” in-place conversion from ext2/3/4 filesystems to btrfs
  • btrfstune โ€” tweak some filesystem properties on an unmounted filesystem
  • btrfs-select-super โ€” rescue tool to overwrite primary superblock from a spare copy
  • btrfs-find-root โ€” rescue helper to find tree roots in a filesystem

And for space-constrained environments, it's possible to build a single binary with the functionality of several standalone tools. This follows the concept of busybox, where the file name selects the functionality. It works for symlinks or hardlinks ๐Ÿซถ The full list can be obtained with btrfs help --box.


๐Ÿ’€ EXIT STATUS ๐Ÿ’€

btrfs returns a zero exit status if it succeeds. Non-zero is returned in case of failure. That's it, that's the whole thing. If it didn't work, it will tell you, and it will not be subtle about it ๐Ÿ˜ญ


๐ŸŒˆ AVAILABILITY ๐ŸŒˆ

btrfs is part of btrfs-progs. Please refer to the documentation at <https://btrfs.readthedocs.io>.


โญ SEE ALSO โญ

btrfs(5), btrfs-balance(8), btrfs-check(8), btrfs-convert(8), btrfs-device(8), btrfs-filesystem(8), btrfs-inspect-internal(8), btrfs-property(8), btrfs-qgroup(8), btrfs-quota(8), btrfs-receive(8), btrfs-replace(8), btrfs-rescue(8), btrfs-restore(8), btrfs-scrub(8), btrfs-send(8), btrfs-subvolume(8), btrfstune(8), mkfs.btrfs(8)


okay that's the whole page bestie ๐ŸŽ€ this was version 7.3, dated Oct 24, 2026, and it's part of btrfs-progs โ€” go mount something and slay, ily ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from