On Jun 28, 2014, at 12:28 AM, Russell Coker <russ...@coker.com.au> wrote: > >> Tho if you ran a md/dmraid level scrub often enough, and then ran a btrfs >> scrub on top, one could be /reasonably/ assured of freedom from lower >> level corruption. > > Not at all. Linux software RAID scrub will copy data from one disk to the > other.
md supports two kinds of scrub: check and repair. Check is the same as btrfs read-only scrub with -r option. > It may copy from the good disk to the bad or from the bad disk to the > good - and it won't know which it's doing. Yes. > Also last time I checked a scrub of Linux software RAID-1 still reported > large > multiples of 128 sectors mismatching in normal operation. So you won't even > know if a disk is returning bogus data unless the bad data is copied to the > good disk and exposed to BTRFS. For raid1,raid10 you need to zero the drives or you will get mismatches. And swap partition or swap file on an md device will also cause mismatches. Mismatches on raid1,10 are much less likely for other types of files, but man 4 md does say it's possible so mismatch_cnt isn't perfectly reliable on raid1,10. Chris Murphy-- 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