Re: btrfs and ECC RAM

Calvin Walton
2014-01-27T16:09:00Z

On Fri, 2014-01-24 at 17:45 -0700, Chris Murphy wrote:
> On Jan 20, 2014, at 9:08 AM, George Mitchell <george@chinilu.com> wrote:
>
> > After reading the recent posts on this topic I am beginning to think
> there is some real confusion between "check sums" and "parity".
>
> Yes, I often see conventional raid6 assumed to always be capable of
> detecting and correcting corruption, not merely the ability to rebuild
> missing data of known location and length in a stripe (known either
> due to the drive reporting read error along with LBA; or a physical
> device becoming unavailable or unresponsive).
>
> > But I CAN see how bad RAM could affect parity calculations and
> resulting data IN THE ABSENCE of protective checksums and cannot help
> but wonder if THAT is what the original article is describing.
>
> Does Btrfs (and I'd presume ZFS) raid5/6 checksum both data and parity
> chunks? And in the case of raid6 are the two parities separately
> checksummed?

The checksumming in Btrfs is actually the other way around; the file
extents and filesystem metadata structures are checksummed before the
RAID parity is applied. The resulting blocks containing both data and
checksums are split over multiple drives with parity.

Presumably once scrub is implemented in btrfs RAID5/6, it will work by
first reconstructing the filesystem structure using data chunks, then
checking the checksum; if the checksum fails, it will attempt to
reconstruct the filesystem structure using the parity chunks instead of
data chunks and then re-check the checksum to confirm the reconstruction
was successful.

--
Calvin Walton <calvin.walton@kepstin.ca>