BTRFS scrub

Chris Murphy lists at colorremedies.com
Mon Jan 27 20:47:52 UTC 2014


On Jan 27, 2014, at 7:35 AM, Jorge Fábregas <jorge.fabregas at gmail.com> wrote:
> 
> I assume of course that checksums for data & metadata are enabled.  I
> created the filesystem simply with:
> 
> # mkfs.btrfs /dev/sdc1
> 
> I'm not sure if I had to specify some option at creation time or if I
> have to specify any at mount time (to enable the checksums).


Data and metadata checksums enabled with default mount options. They'd have to be explicitly disabled at mount time to not get them. With a single device, data uses the single profile so just one copy; metadata uses the DUP profile so two copies.

For scrubs that write corrections to disk, the volume needs to be mounted rw, and then:

btrfs scrub start /mnt

For read only scrubs you need -r flag to get useful information of what fixes would be done if they were enabled. This works whether the device is mounted ro or rw.

btrfs scrub start -r /mnt


Chris Murphy



More information about the users mailing list