btrfs-scrub(8)


NAME

   btrfs-scrub - scrub btrfs filesystem, verify block checksums

SYNOPSIS

   btrfs scrub <subcommand> <args>

DESCRIPTION

   btrfs scrub is used to scrub a btrfs filesystem, which will read all
   data and metadata blocks from all devices and verify checksums.
   Automatically repair corrupted blocks if there's a correct copy
   available.

       Note
       Scrub is not a filesystem checker (fsck) and does not verify nor
       repair structural damage in the filesystem.

   The user is supposed to run it manually or via a periodic system
   service. The recommended period is a month but could be less. The
   estimated device bandwidth utilization is about 80% on an idle
   filesytem. The IO priority class is by default idle so background scrub
   should not interfere with normal filesystem operation significantly.

   The scrubbing status is recorded in /var/lib/btrfs/ in textual files
   named scrub.status.UUID for a filesystem identified by the given UUID.
   (An itermediate progress is communicated through a named pipe in file
   scrub.progress.UUID in the same directory.) The status file is updated
   periodically every 5 seconds. An resumed scrub will continue from the
   last saved position.

SUBCOMMAND

   cancel <path>|<device>
       If a scrub is running on the filesystem identified by path> cancel
       it.

       If a device is specified, the corresponding filesystem is found and
       btrfs scrub cancel behaves as if it was called on that filesystem.

   resume [-BdqrR] [-c <ioprio_class> -n <ioprio_classdata>]
   <path>|<device>
       Resume a cancelled or interrupted scrub on the filesystem
       identified by path or on a given device.

       Does not start a new scrub if the last scrub finished successfully.

       Options

       see scrub start.

   start [-BdqrRf] [-c <ioprio_class> -n <ioprio_classdata>]
   <path>|<device>
       Start a scrub on all devices of the filesystem identified by path
       or on a single device. If a scrub is already running, the new one
       fails.

       Without options, scrub is started as a background process.

       The default IO priority of scrub is the idle class. The priority
       can be configured similar to the ionice(1) syntax using -c and -n
       options.

       Options

       -B
           do not background and print scrub statistics when finished

       -d
           print separate statistics for each device of the filesystem (-B
           only) at the end

       -q
           be quiet, omit error messages and statistics

       -r
           run in read-only mode, do not attempt to correct anything, can
           be run on a read-only filesystem

       -R
           print raw statistics per-device instead of a summary

       -c <ioprio_class>
           set IO priority class (see ionice(1) manpage)

       -n <ioprio_classdata>
           set IO priority classdata (see ionice(1) manpage)

       -f
           force starting new scrub even if a scrub is already running,
           this can useful when scrub status file is damaged and reports a
           running scrub although it is not, but should not normally be
           necessary

   status [-d] <path>|<device>
       Show status of a running scrub for the filesystem identified by
       path or for the specified device.

       If no scrub is running, show statistics of the last finished or
       cancelled scrub for that filesystem or device.

       Options

       -d
           print separate statistics for each device of the filesystem

EXIT STATUS

   btrfs scrub 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), ionice(1)


More Linux Commands

manpages/Tcl_FSEvalFile.3.html
Tcl_FSEvalFile(3) - procedures to interact with any filesyst
There are several reasons for calling the Tcl_FS API functions (e.g. Tcl_FSAccess and Tcl_FSStat) rather than calling system level functions like access and sta

manpages/menu_name.3menu.html
menu_name(3menu) - get menu item name and description fields
The function item_name returns the name part of the given item. The function item_description returns the description part of the given item. RETURN VALUE These

manpages/gnutls_x509_trust_list_add_crls.3.html
gnutls_x509_trust_list_add_crls(3) - API function (ManPage)
This function will add the given certificate revocation lists to the trusted list. The list of CRLs must not be deinitialized during this structures lifetime. T

manpages/Tcl_UniCharIsPunct.3.html
Tcl_UniCharIsPunct(3) - routines for classification of Tcl_U
All of the routines described examine Tcl_UniChars and return a boolean value. A non-zero return value means that the character does belong to the character cla

manpages/lodraw.1.html
lodraw(1) - LibreOffice office suite - Linux manual page....
LibreOffice (LO for short) is a multi-platform office productivity suite. It was derived from OpenOffice.org 3.3 Beta on September 28, 2010. libreoffice is a sh

manpages/perl5123delta.1.html
perl5123delta(1) - what is new for perl v5.12.3 (Man Page)
This document describes differences between the 5.12.2 release and the 5.12.3 release. If you are upgrading from an earlier release such as 5.12.1, first read p

manpages/curl_strequal.3.html
curl_strequal(3) - case insensitive string comparisons......
The curl_strequal() function compares the two strings str1 and str2, ignoring the case of the characters. It returns a non-zero (TRUE) integer if the strings ar

manpages/glTexGenf.3gl.html
glTexGenf(3gl) - control the generation of texture coordinat
glTexGen selects a texture-coordinate generation function or supplies coefficients for one of the functions. coord names one of the (s, t, r, q) texture coordin

manpages/gnutls_dtls_prestate_set.3.html
gnutls_dtls_prestate_set(3) - API function - Linux man page
This function will associate the prestate acquired by the cookie authentication with the client, with the newly established session. SINCE 3.0.0 REPORTING BUGS

manpages/XCreateColormap.3.html
XCreateColormap(3) - create, copy, or destroy colormaps and
The XCreateColormap function creates a colormap of the specified visual type for the screen on which the specified window resides and returns the colormap ID as

manpages/hostnamectl.1.html
hostnamectl(1) Control the system hostname - Linux man page
hostnamectl may be used to query and change the system hostname and related settings. This tool distinguishes three different hostnames: the high-level pretty h

manpages/gnc-fq-helper.1.html
gnc-fq-helper(1) allows gnucash to communicate with FinanceQ
Input: (on standard input - one entry per line and one line per entry, and double quotes must only be delimiters, not string content -- remember, we dont have a





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