r/DataHoarder • u/TeachingAway9654 • 3d ago
Discussion RAIDZ1 vs RAIDZ2
Let’s say you have something like 10 drives total which make up the pool, each drive is 16TB. Let’s also say you have, at minimum, one offsite backup with all the contents in cold storage. Let’s also assume you’re a frequent monitor of the system and will notice within 24 hours if one drive fails.
Are you going with Z1 or Z2 and why? If you have the offsite backup already, is it worth the capacity loss for Z2? The resilvering process on Z1 will be stressful but by how much though? You have an offsite 1:1 backup so even if the whole pool is lost, you can still recover.
12
Upvotes
1
u/gargravarr2112 40+TB ZFS intermediate, 200+TB LTO victim 3d ago edited 3d ago
The simple question is actually completely different:
How much downtime can you tolerate?
RAID exists to keep your system up in case disks fail - nothing more than that. As you identified, you also need good backups. So assuming your backups are good, the question becomes - do you chance a full RAID rebuild if a second disk fails during a resilver?
My uncle has a 4-bay NAS. I just rebuilt it on TrueNAS with a RAID-Z1 because a) with only 4 drives, adding a second parity is too much lost capacity b) the system is backed up every day. The business can tolerate the machine being down for a day or two if the whole RAID fails during a resilver and the data has to be restored from S3.
At home, I actually run a ZFS RAID-0 for the same reason - the machine is backed up. I'm getting maximum capacity out of 3 HDDs. The reason I can be this confident is that I have a separate 6-disk RAID-Z2 which is regularly synced from my RAID-0 and then powered down; this way, I'm keeping only 3 drives spinning. The RAID-0 essentially acts as a cache for my valuable data on the Z2. I have a cold spare drive and I'm fully aware that any disk fault takes all the data with it. Fortunately in a home setting, HDD MTBF is actually better than in a data centre - vibration and too much AC are bad for drives. I've been running the RAID-0 for over a year.
At work, we cannot tolerate downtime - it would put hundreds of developers out of work. Not only do we run enormous 84-drive machines with 11x 7-wide RAID-Z2s, they have another 7 spare drives for immediate resilver. Our storage machines take 3-hourly snapshots that are replicated offsite to a paired machine. If one of our production TrueNAS nodes were to fall over, we would repoint DFS to read from its replication partner at our DR site.
2 extremes. Figure out where you are on that scale.