btrfs-check(8)


NAME

   btrfs-check - check or repair an unmounted btrfs filesystem

SYNOPSIS

   btrfs check [options] <device>

DESCRIPTION

   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.

       Warning
       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.

SAFE OR ADVISORY OPTIONS

   -b|--backup
       use the first valid set of backup roots stored in the superblock

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

   --check-data-csum
       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
       coipes.

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

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

   -p|--progress
       indicate progress at various checking phases

   --qgroup-report
       verify qgroup accounting and compare against filesystem accounting

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

   --readonly
       (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.

DANGEROUS OPTIONS

   --repair
       enable the repair mode and attempt to fix problems where possible

   --init-csum-tree
       create a new checksum tree and recalculate checksums in all files

           Note
           Do not blindly use this option to fix checksum mismatch
           problems.

   --init-extent-tree
       build the extent tree from scratch

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

   --mode=MODE
       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.

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

EXIT STATUS

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

AVAILABILITY

   btrfs is part of btrfs-progs. Please refer to the btrfs wiki
   http://btrfs.wiki.kernel.org for further details.

SEE ALSO

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


More Linux Commands

manpages/ExtUtils::MakeMaker.3pm.html
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

manpages/nonl_sp.3ncurses.html
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

manpages/bkgdset.3ncurses.html
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 (

manpages/Net::LibIDN.3pm.html
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

manpages/XvCreateImage.3.html
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

manpages/gnutls_openpgp_crt_get_subkey_creation_time.3.html
gnutls_openpgp_crt_get_subkey_creation_time.3...............
Get subkey creation time. RETURNS the timestamp when the OpenPGP sub-key was created. SINCE 2.4.0 REPORTING BUGS Report bugs to &lt;bug-gnutls@gnu.org&gt;. GnuTLS hom

manpages/gnutls_transport_set_push_function.3.html
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

manpages/mount.cifs.8.html
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

manpages/lzegrep.1.html
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

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

manpages/pactl.1.html
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

manpages/pwd.n.html
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.