ZFS mirror vs traditional HW RAID 1

Status
Not open for further replies.

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
Noob question here:

A typical HW RAID 1 is good for dealing with a drive failure, but really lousy for fixing silent data corruption. IE, a controller that performs a consistency check can detect a difference between the two drives, but the controller has no idea which drive has the correct (uncorrupted) data.

With FreeNAS and ZFS, if I'm understanding this correctly, a 2 drive mirror doesn't have this problem because all writes are checksummed. So, if a consistency error is detected, the SW can consult the checksum to figure out which drive has the correct (uncorrupted) data. Is this accurate? Or do I need a 3-way mirror so there are three drives to consult?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
The checksum will handle it. When ZFS reads corrupted data, it will recover the data from replicas and then fix the error on the incorrect copy. As long as the data can be recovered (mirror, RAID) the error will be corrected.
 

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
Awesome. I'm very happy to hear this works with 2-disk mirror. Thanks!
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Yup. It'll even do it from the same drive if you configure it to store more than one copy on a single drive, but of course that doesn't work as well as you'd like if the disk itself fails ;-)
 
Status
Not open for further replies.
Top