RAID Z2 or Z1 & 1 spare? Cannot decide...

superfour

Dabbler
Joined
Jun 15, 2021
Messages
31
Well, haven't found anyone discussing this dillema: I put together a system with 10x 1TB disks. It's gonna be a storage/backup and light-use SMB file server.

So, what is better: One RAID-Z2 pool or one RAID-Z1 pool plus one hot spare? Difference in capacity is negligible (6,7 vs 7,0 GB). Any opinions or experience?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
RAIDZ2. Period. What *possible* reason would you have for not utilizing available redundancy?

If you go with RAIDZ1, and a drive fails, and there is *any* *other* read error on the remaining disks, you lose data.

That's what RAIDZ2 is designed to protect.
 

c77dk

Patron
Joined
Nov 27, 2019
Messages
468
So you're considering a raiz2 pool of 10 drives or a raidz1 of 9 drives and 1 hotspare?

In that situation I would go for raidz2, since you'll have all 10 drives running anyway, and you would be able to loose 2 drives instead of just one. Also there's the risk of loosing another drive while resilvering.
 

superfour

Dabbler
Joined
Jun 15, 2021
Messages
31
Well, considering that the hot spare disk will kick-in asap, isn't that kind of equivalent redundancy?
(Although as we speak I am already setting them for Z2 --I can even hear @jgreco 's voice! :)))
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
isn't that kind of equivalent redundancy?

Not at all.

Consider that the Raid-Z2 is a pre-silvered, no matter which disk will fail. It will be ready for any of them.

Your spare will not be ready for any and will need to be re-silvered according to which disk failed. That process takes time, time during which you have no protection. Also, that process will push your other drives very high and will need to read 900% of your disk capacity, without a single error because there will be no more redundancy to detect and fix it.

So pre-silver for any with the need to read 0%
vs
Not ready for any with the need to read 900%

So this is VERY FAR to be equivalent.

Radi-Z2 and nothing else...
 

superfour

Dabbler
Joined
Jun 15, 2021
Messages
31
Quite quite clear!! Thank you :)
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Quite quite clear!! Thank you :)

@Heracles posted a very cogent (read: better than mine) explanation. In most cases, you do not deploy a spare until after you've already gone to RAIDZ3, though if you have multiple RAIDZ2 vdevs, there is an argument to be made for having a single spare available to cover a failure in any vdev. That's really the only case where there's a viable argument for it, if data protection is an important goal.

I'm posting this primarily to mention that those of us who really do want good protection will typically do RAIDZ3 with a spare. This also self-optimizes for common 12-drive-in-2U chassis as 8 data, 3 parity, 1 spare, which also happens to neatly align with the (now somewhat irrelevant) power-of-two rule that used to be desirable.

Again, welcome to the community, and don't be afraid to ask questions.
 
Top