OS Manuals

/usr/bin/btrfsck

BTRFS filesystem utilities

From btrfs-progs 7.3-r0 (os), captured 2026-11-05 by running btrfsck --help (exit 0). permalink

usage: btrfs check [options] <device>

Check structural integrity of a filesystem (unmounted).

  Check structural integrity of an unmounted filesystem. Verify internal
  trees' consistency and item connectivity. In the repair mode try to
  fix the problems found.
  WARNING: the repair mode is considered dangerous and should not be used
           without prior analysis of problems found on the filesystem.

Starting point selection:
-s, --super NUMBER        use this superblock copy
-b, --backup              use the first valid backup root copy
-r, --tree-root           use the given bytenr for the tree root
--chunk-root BYTENR       use the given bytenr for the chunk tree root

Operation modes:
--readonly                run in read-only mode (default)
--repair                  try to repair the filesystem (dangerous, see above warning)
--force                   skip mount checks, recommended only with --readonly; WARNING: it is possible to run with
                          --repair but on a mounted filesystem that will most likely lead to a corruption unless the
                          filesystem is quiescent in a quiescent state which may not be possible to guarantee
--mode MODE               allows choice of memory/IO trade-offs where MODE is one of:
                          original - read inodes and extents to memory (requires more memory, does less IO)
                          lowmem - try to use less memory but read blocks again when needed

Repair options:
--init-csum-tree          create a new CRC tree
--init-extent-tree        create a new extent tree

Check and reporting options:
--check-data-csum         verify checksums of data blocks
--skip-qgroup-accounting  skip quota group accounting verification
-Q, --qgroup-report       print a report on qgroup consistency
-E, --subvol-extents SUBVOLID
                          print subvolume extents and sharing state
-p, --progress            indicate progress

Deprecated or moved options:
--clear-space-cache v1|v2 clear space cache for v1 or v2 (moved to 'rescue' group)
Options (15)
OptionDescriptionSource
-s, --super NUMBERuse this superblock copyhelp
-b, --backupuse the first valid backup root copyhelp
-r, --tree-rootuse the given bytenr for the tree roothelp
--chunk-root BYTENRuse the given bytenr for the chunk tree roothelp
--readonlyrun in read-only mode (default)help
--repairtry to repair the filesystem (dangerous, see above warning)help
--forceskip mount checks, recommended only with --readonly;help
--mode MODEallows choice of memory/IO trade-offs where MODE is one of: original - read inodes and extents to memory (requires more memory, does less IO) lowmem - try to use less memory but read blocks again…help
--init-csum-treecreate a new CRC treehelp
--init-extent-treecreate a new extent treehelp
--check-data-csumverify checksums of data blockshelp
--skip-qgroup-accountingskip quota group accounting verificationhelp
-Q, --qgroup-reportprint a report on qgroup consistencyhelp
-E, --subvol-extents SUBVOLIDprint subvolume extents and sharing statehelp
-p, --progressindicate progresshelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.