Whether you’re a newcomer to the home lab ecosystem or a data hoarder with many years under the belt, you’ve probably heard about RAID levels. After all, RAID, or Redundant Array of Independent (or Inexpensive, depending on who you ask) Drives is a neat way to enhance the resilience of your storage server with some extra drives, and depending on your configuration, you can even get easier recovery and faster transfer speeds for your setup.

Even among other levels, RAID 5 is one of the more popular options in the home labber scene. Truth be told, it’s something I’ve used for ages, before realizing that my setup technically falls under the RAID-Z1 moniker. And once I started digging deeper, I realized I was better off with ZFS’ variant than going with the conventional option.

RAID 5 definitely has some perks

It's actually a solid RAID level for consumer setups

Before I go into its drawbacks, I have to admit that RAID 5 deserves all the love it gets from the home server and NAS communities. Compared to the likes of RAID 10, RAID 5 only requires a minimum investment of three HDDs (or SSDs, if that’s what you’re into), and you only lose one drive’s worth of storage capacity for the parity bits. Speaking of which, RAID 5 distributes the parity data across multiple drives, allowing your server to rebuild the storage pools should anything go wrong. Although the write performance will be severely degraded until you bring a replacement drive, RAID 5 ensures your storage rig can survive a single disk failure.

Combine that with the fact that you only lose 33% of the overall storage capacity (in the case of a 3-drive setup) for redundant data, and it’s clear why many folks (including yours truly) prefer it over the other RAID levels. Unfortunately, conventional RAID 5 pools have a major problem that needs to be addressed…

But the write-hole issue is a huge deal-breaker

Especially if your area is prone to blackouts

Losing power while transferring files can be a real annoyance, though RAID 5 introduces the write-hole problem into the equation. Let’s say that there was an outage while a write operation was underway on your RAID 5 storage pool. During an unclean shutdown, the files written to the disk develop inconsistencies with their parity information. But since RAID 5 requires the parity data to match its respective datasets, this broken state could corrupt the rest of the RAID array.

Since this corruption may go unnoticed, it can result in clean files getting overwritten by corrupted data – leading to your entire storage pool becoming a collection of inaccessible files over a period of time.

RAID-Z1 gets rid of this problem entirely

Yet another reason to love ZFS

What’s more, write-hole is an inherent issue in conventional RAID 5, so you can only look into workarounds to avoid this problem. You could, for instance, use a RAID card with a built-in power backup if you’re relying on hardware RAID. Or, you could even arm your NAS with a UPS. But when you’re running backup operations, VM tasks, and file transfer loads multiple times throughout the day, the average UPS may not be able to handle continuous workloads during extended blackouts – especially if you connect extra server nodes to your UPS like I do.

RAID-Z1, on the other hand, gets rid of it entirely. While it stores data and parity information in different disk layouts, it’s essentially the software-based equivalent of RAID 5 on ZFS, and its reliance on the all-powerful file system makes RAID-Z1 ideal for home labbers.

You see, ZFS follows a copy-on-write design, where it stores any modifications to existing data on entirely new blocks. Then, it updates the metadata of the said file to point to the new location if the operation has succeeded, thereby ensuring that the original data is completely unharmed should any outages cause the file transfer operation to fail. Then there’s its checksum facility, where each data block in your storage pool has a unique checksum, allowing the file system to scan for corruption. Pair it with a RAID-Z1 setup, and ZFS can even repair minor data corruption on its own.

As such, ZFS’ version of RAID 5 essentially gets rid of the write-hole problem, and it’s precisely thanks to RAID-Z1 that I never had to deal with this issue, even though I began my NAS journey without stable power or battery backup.

You’ll want to keep RAID-Z1's quirks in mind before building a NAS with it

While I recommend RAID-Z1 for home labs and budget-friendly NAS rigs, it does have a few minor issues that make RAID-Z2 and RAID 10 more tempting. Let’s say you’re trying to resilver your storage pool after a drive has kicked the bucket. You see, the rest of the drives are still susceptible to failure, and your storage pool will become inaccessible if a second one dies during the resilvering process.

RAID-Z2 can provide better resilience for your setup, though you’ll have to grab another drive and deal with slower transfer speeds. Likewise, if you’re looking for something that can deliver top-notch speeds, it might be a good idea to consider RAID 10 instead.