6 btrfs-scrub - scrub btrfs filesystem
10 *btrfs scrub* <subcommand> <args>
14 *btrfs scrub* is used to scrub a btrfs filesystem, which will reading all data
15 from all disks and verifying checksums.
19 *start* [-BdqrRf] [-c <ioprio_class> -n <ioprio_classdata>] <path>|<device>::
20 Start a scrub on all devices of the filesystem identified by <path> or on
23 Without options, scrub is started as a background process.
24 Progress can be obtained with the *scrub status* command. Scrubbing
25 involves reading all data from all disks and verifying checksums. Errors are
26 corrected along the way if possible.
28 The default IO priority of scrub is the idle class. The priority can be
29 configured similar to the `ionice`(1) syntax using '-c' and '-n' options.
34 Do not background and print scrub statistics when finished.
36 Print separate statistics for each device of the filesystem (-B only).
38 Quiet. Omit error messages and statistics.
40 Read only mode. Do not attempt to correct anything.
42 Raw print mode. Print full data instead of summary.
44 Set IO priority class (see
47 -n <ioprio_classdata>::::
48 Set IO priority classdata (see `ionice`(1) manpage).
50 force to check whether scrub has started or resumed in userspace.
51 this is useful when scrub stat record file is damaged.
53 *cancel* <path>|<device>::
54 If a scrub is running on the filesystem identified by <path>, cancel it.
56 Progress is saved in the scrub progress file and scrubbing can be resumed later
57 using the scrub resume command.
58 If a <device> is given, the corresponding filesystem is found and
59 scrub cancel behaves as if it was called on that filesystem.
61 *resume* [-BdqrR] [-c <ioprio_class> -n <ioprio_classdata>] <path>|<device>::
62 Resume a canceled or interrupted scrub cycle on the filesystem identified by
63 <path> or on a given <device>.
65 Does not start a new scrub if the last scrub finished successfully.
71 *status* [-d] <path>|<device>::
72 Show status of a running scrub for the filesystem identified by <path> or
73 for the specified <device>.
75 If no scrub is running, show statistics of the last finished or canceled scrub
76 for that filesystem or device.
81 Print separate statistics for each device of the filesystem.
85 *btrfs scrub* returns a zero exist status if it succeeds. Non zero is
86 returned in case of failure.
90 *btrfs* is part of btrfs-progs.
91 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for