btrfs-check - check or repair an unmounted btrfs filesystem


   btrfs check [options] <device>


   The filesystem checker is used to verify structural integrity of a
   filesystem and attempt to repair it if requested. The filesystem must
   be unmounted.

   By default, btrfs check will not modify the device but you can reaffirm
   that by the option --readonly.

   btrfsck is an alias of btrfs check command and is now deprecated.

       Do not use --repair unless you are adviced to by a developer, an
       experienced user or accept the fact that fsck cannot possibly fix
       all sorts of damage that could happen to a filesystem because of
       software and hardware bugs.

   The structural integrity check verifies if internal filesystem objects
   or data structures satisfy the constraints, point to the right objects
   or are correctly connected together.

   There are several cross checks that can detect wrong reference counts
   of shared extents, backrefrences, missing extents of inodes, directory
   and inode connectivity etc.

   The amount of memory required can be high, depending on the size of the
   filesystem, smililarly the run time.


       use the first valid set of backup roots stored in the superblock

       This can be combined with --super if some of the superblocks are

       verify checksums of data blocks

       This expects that the filesystem is otherwise OK, so this is
       basically and offline scrub but does not repair data from spare

   --chunk-root <bytenr>
       use the given offset bytenr for the chunk tree root

   -E|--subvol-extents <subvolid>
       show extent state for the given subvolume

       indicate progress at various checking phases

       verify qgroup accounting and compare against filesystem accounting

   -r|--tree-root <bytenr>
       use the given offset bytenr for the tree root

       (default) run in read-only mode, this option exists to calm
       potential panic when users are going to run the checker

   -s|--super <superblock>
       use 'superblock'th superblock copy, valid values are 0, 1 or 2 if
       the respective superblock offset is within the device size

       This can be used to use a different starting point if some of the
       primary superblock is damaged.


       enable the repair mode and attempt to fix problems where possible

       create a new checksum tree and recalculate checksums in all files

           Do not blindly use this option to fix checksum mismatch

       build the extent tree from scratch

           Do not use unless you know what you're doing.

       select mode of operation regarding memory and IO

       The MODE can be one of original and lowmem. The original mode is
       mostly unoptimized regarding memory consumpption and can lead to
       out-of-memory conditions on large filesystems. The possible
       workaround is to export the block device over network to a machine
       with enough memory. The low memory mode is supposed to address the
       memory consumption, at the cost of increased IO when it needs to
       re-read blocks when needed. This may increase run time.

       lowmem mode does not work with --repair yet, and is still
       considered experimental.


   btrfs check returns a zero exit status if it succeeds. Non zero is
   returned in case of failure.


   btrfs is part of btrfs-progs. Please refer to the btrfs wiki for further details.


   mkfs.btrfs(8), btrfs-scrub(8), btrfs-rescue(8)

More Linux Commands

ExtUtils::MakeMaker(3pm) - Create a module Makefile.........
This utility is designed to write a Makefile for an extension module from a Makefile.PL. It is based on the Makefile.SH model provided by Andy Dougherty and the

nonl_sp(3ncurses) - curses screen-pointer extension.........
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

bkgdset(3ncurses) - curses window background manipulation ro
The bkgdset and wbkgdset routines manipulate the background of the named window. The window background is a chtype consisting of any combination of attributes (

Net::LibIDN(3pm) - Perl bindings for GNU Libidn (Man Page)
Provides bindings for GNU Libidn, a C library for handling Internationalized Domain Names according to IDNA ( RFC 3490), in a way very much inspired by Turbo Fr

XvCreateImage(3) - create an XvImage - Linux manual page....
XvCreateImage(3) is similar to XCreateImage(3). XvShmCreateImage(3) is similar to XShmCreateImage(3). The library will allocate the XvImage structure and fill o

Get subkey creation time. RETURNS the timestamp when the OpenPGP sub-key was created. SINCE 2.4.0 REPORTING BUGS Report bugs to &lt;;. GnuTLS hom

gnutls_transport_set_push_function(3) - API function........
This is the function where you set a push function for gnutls to use in order to send data. If you are going to use berkeley style sockets, you do not need to u

mount.cifs(8) - mount using the Common Internet File System
This tool is part of the cifs-utils suite. mount.cifs mounts a Linux CIFS filesystem. It is usually invoked indirectly by the mount(8) command when using the -t

lzegrep(1) - search compressed files for a regular expressio
lzegrep.1 - xzgrep invokes grep(1) on files which may be either uncompressed or compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are

postconf(1) - Postfix configuration utility - Linux man page
By default, the postconf(1) command displays the values of configuration parameters, and warns about possible mis-typed parameter names (Postfix 2.9 and

pactl(1) - Control a running PulseAudio sound server........
pactl can be used to issue control commands to the PulseAudio sound server. pactl only exposes a subset of the available operations. For the full set use the pa

pwd(n) - Return the absolute path of the current working dir
Returns the absolute path name of the current working directory. EXAMPLE Sometimes it is useful to change to a known directory when running some external comman

We can't live, work or learn in freedom unless the software we use is free.