Linux "btrfs-scrub" Command Line Options and Examples
scrub btrfs filesystem, verify block checksums

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.


Usage:

btrfs scrub






Command Line Options:

-B
do not background and print scrub statistics when finished
btrfs-scrub -B ...
-d
print separate statistics for each device of the filesystem (-B only) at the end
btrfs-scrub -d ...
-q
be quiet, omit error messages and statistics
btrfs-scrub -q ...
-r
run in read-only mode, do not attempt to correct anything, can be run on a read-only filesystem
btrfs-scrub -r ...
-R
print raw statistics per-device instead of a summary
btrfs-scrub -R ...
-c
set IO priority class (see ionice(1) manpage)
btrfs-scrub -c ...
-n
set IO priority classdata (see ionice(1) manpage)
btrfs-scrub -n ...
-f
force starting new scrub even if a scrub is already running, this can useful when scrub status file is damaged and reports arunning scrub although it is not, but should not normally be necessarystatus [-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
btrfs-scrub -f ...