Russell Coker posted on Wed, 12 Aug 2015 13:04:27 +1000 as excerpted:

> Linux Software RAID scrub will copy the data from one disk to the other
> to make them identical, the theory is that it's best to at least be
> consistent if you can't be sure you are right.
> 
> Will a BTRFS scrub do this on a non-CoW file?

While I honestly don't know, a reasonably educated guess is no, btrfs 
scrub assumes COW and checksumming, and doesn't do anything if there's no 
checksums to verify against.  (I know scrub skips verification of items 
without checksums in the normally checksummed case, so it's reasonable to 
assume it would skip all data, verifying only metadata, if no data has 
checksums.)

In a case like this where nodatacow has disabled checksumming, the best 
thing one can do is manually check at least some samples, and if there's 
no visible corruption, assume the existing data is correct and (after a 
scrub to verify at least metadata) do a btrfs check --init-csum-tree, to 
initialize the checksums to at least cover the existing situation, 
whatever it may be.  Scrub should be able to work after that, since it 
has csums to work with.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to