4

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 Answer 1

2

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.

4
  • 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? Commented Aug 29, 2019 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... Commented Aug 29, 2019 at 17:18
  • 1
    And when replacing drives (resilver) that naturally involves reading. Commented Aug 29, 2019 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. Commented Aug 29, 2019 at 21:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.