Mirroring vs. raidz2 resilvering

Status
Not open for further replies.

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
I read a blog post the other day that indicated mirroring was a much safe data redundancy system, because when you have to replace a drive, with mirroring you are only reading, which isn't as intensive on the disks as raidz2 where you are reading and writing to all the disks.

If I have 6 4tb disks mirrored, or 5 4tb disks in raidz2 giving me 12tb space either way, what would be the safest scenario for my data?
 

styno

Patron
Joined
Apr 11, 2016
Messages
466
Why would there be writing to all the disks? By design a raid implementation recalculates the missing disk from data&checksum(s). This is read on the old disks and write on the new disk. There is no reason to think raidz would be different.
 

Terrigat

Dabbler
Joined
Apr 5, 2016
Messages
13
From my understanding of a 6 x HDD in a Mirror setup:
+ Quicker resliver because it copies the data verbatim from the other mirrored drive.
+ No parity calculation necessary for writes.
- No parity information.
- The only drive that is stressed is the only one that CANNOT fail.
And a RAIDZ2:
+ Any 2 HDD can fail.
+ If a HDD does fail, parity data can still save you from bit-rot, atomic bit-flip, etc.
- Slower RW
- All drives stressed at the same time for a longer resliver time.

For me a 6 x 3TB RAIDZ2 of Toshiba DT01ACA300 holding 7TB of data the resliver time was 4hrs. I also saw network transfer speeds exceeding 300MB/s.
 

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21

http://jrs-s.net/2015/02/06/zfs-you-should-use-mirror-vdevs-not-raidz/

In his words:

When you replace and resilver a disk in a mirror vdev, your pool is again minimally impacted – you’re doing simple reads from the remaining member of the vdev, and simple writes to the new member of the vdev. In no case are you re-writing entire stripes, all other vdevs in the pool are completely unaffected, etc. Mirror vdev resilvering goes really quickly, with very little impact on the performance of the pool.
...
The only disk more heavily loaded than usual during a mirror vdev resilvering is the other disk in the vdev – which might sound bad, but remember that it’s only being heavily loaded with reads, whereas all of the remaining disks in a RAIDZ vdev are being much more heavily loaded with writes as well as reads during a resilver. Resilvering a mirror is much less stressful than resilvering a RAIDZ.​
 
Last edited:

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
You seems to forget something: with 1 drive going bad in both cases RAID-Z2 will be safer because it has another drive of redundancy, in the mirror if the other drive fails there isn't any other drive to save the day.

If we take the two examples in the OP then the RAID-Z2 will have a MTTDL of 2.2 x 10^11 hours, while the striped mirrors will have a MTTDL of 5.3 x 10^8 hours, about 500 times riskier.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
One can mitigate that risk by going with 3-way mirrors, as jgreco has done with his box.


Sent from my iPhone using Tapatalk
 

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
You seems to forget something: with 1 drive going bad in both cases RAID-Z2 will be safer because it has another drive of redundancy, in the mirror if the other drive fails there isn't any other drive to save the day.

That's pretty much how I understood it. The blog post threw me for a loop, but I guess everybody is entitled to their own opinion!
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
I see, so you would pretty much only want to use mirrors with a 3-way mirror if you were going to do it. That ends up being a lot more disks.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Depending on various factors (workload, uptime requirements, availability of spare drives, backup strategy, etc.), 2-way mirrors could very well be a suitable layout. You lose redundancy when resilvering a 2-way mirror, but the resilver is faster than for RAIDZ layouts, and pool performance suffers less.
 

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
From what I've read, the benefits comes from the shorter resilvering time for mirrors. A shorter resilvering time means less time that a drive could fail. If you're using RAIDZ2, and one drive fails, you still have one drive to keep you safe during the resilvering compared to one half of a mirrored pair failing, but it takes something like 2-3x less time to resilver a mirrored pair compared to a whole pool.

Sent from my Pixel C using Tapatalk
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
The only way to insure you won't loose data during an array rebuild no matter what the layout is, is to have at least two copies of the data on two different sets of hardware.

It can be challenging for a home user to accomplish this so a cloud archive of the irreplaceable data is a good option. Amazon glacier or crashplan are popular choices.
 
Status
Not open for further replies.
Top