3

I am trying to find answers to some questions on how ZFS works:

  • does it detect silent corruption via checksums as soon as data is changed (and differs from checksum), automatic in a way (then if there's RAIDZ 1, it would repair by fetching from mirrored disk), OR this works only when accessing corrupted file(during read, and scrubbing of course)?
  • I am now confused about traditional hardware RAID now - can it detect silent corruption with same certainty as ZFS, and location of corruption as well, and if yes - is it able to do repair as ZFS also?

Just need some more precision in explanation on how this works.

Thanks.

1

Checksum verification happens on reads, and to read everything (except free space), you can scrub regularly. For Software RAID (mdadm), you can run --action=check and then see if mismatch_cnt is still 0.

RAID only attempts to fix read errors (by re-writing data); for mismatched data, you have to determine manually whether it's relevant (free space or not) and if data or parity is correct.

Essentially with RAID you trust the storage to not misbehave and report errors properly instead of silently returning false data. RAID does not have checksums nor does it verify parity for every read.

  • But is the corrupted data mirrored to another disk, in say RAID1(ZFS RAID), assuming I was late to read it when it was changed? – lidagon Aug 29 '19 at 13:40
  • 1
    Things get mirrored as you write them, and checksums written along with it. If you write corrupted data (because buggy software or whatever), then ZFS won't help you either. From ZFS point of view whatever you told it to write is the correct data... – frostschutz Aug 29 '19 at 17:18
  • 1
    And when replacing drives (resilver) that naturally involves reading. – frostschutz Aug 29 '19 at 17:19
  • For whatever silly reason I was ignoring that checksums go along, and that caused holes in my understanding. Now it's clear, thanks. – lidagon Aug 29 '19 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.