RAIDZ2
What Is RAIDZ2?
RAIDZ2 is a double-parity RAIDZ configuration that can tolerate the failure of up to two drives within a RAIDZ2 VDEV without exceeding that VDEV's redundancy. Data and parity are distributed across the devices participating in the VDEV.
RAIDZ2 requires at least four devices. Two parity levels reduce usable capacity compared with RAIDZ1, but provide additional protection against drive failures while the VDEV is operating normally or in a degraded state.
RAIDZ2 Key Characteristics
Double Parity
RAIDZ2 maintains two parity levels across the devices participating in the VDEV.
Up to 2 Drives
A RAIDZ2 VDEV can remain within its redundancy tolerance after as many as two participating devices fail.
4 Drives
Four devices are the technical minimum for a RAIDZ2 data VDEV.
Two-Parity Overhead
Simplified capacity planning subtracts the equivalent capacity of two drives for parity.
Data + Double Parity Across the VDEV
RAIDZ2 distributes data and parity information across the participating devices. Its two parity levels allow ZFS to reconstruct unavailable data when one or two devices in the RAIDZ2 VDEV fail.
RAIDZ2 Is a VDEV Layout
RAIDZ2 is best understood as a type of ZFS VDEV rather than as the entire storage pool. Multiple drives form the RAIDZ2 VDEV, and one or more top-level data VDEVs provide storage to the zpool.
How Much Usable Capacity Does RAIDZ2 Provide?
For a simplified estimate using equal-size drives, RAIDZ2 provides approximately the capacity of the total drive count minus two drives.
This is a planning approximation rather than the amount of filesystem space ultimately available to applications.
| Example | Raw Capacity | Approx. RAIDZ2 Data Capacity | Parity Equivalent |
|---|---|---|---|
| 4 × 8 TB | 32 TB | ~16 TB | ~16 TB |
| 6 × 8 TB | 48 TB | ~32 TB | ~16 TB |
| 8 × 12 TB | 96 TB | ~72 TB | ~24 TB |
| 10 × 16 TB | 160 TB | ~128 TB | ~32 TB |
These examples are simplified decimal-capacity estimates. Actual available space is lower and depends on formatting, ZFS metadata, allocation behavior, reserved space, drive capacity reporting and other configuration factors.
How Many Drives Can RAIDZ2 Lose?
A RAIDZ2 VDEV can tolerate up to two unavailable devices. The VDEV becomes degraded after a device failure but can continue operating while sufficient redundancy remains.
Why Use Double Parity?
The main advantage of RAIDZ2 over RAIDZ1 is the additional drive-failure tolerance provided by the second parity level.
RAIDZ1 vs RAIDZ2 vs RAIDZ3
| RAIDZ Level | Parity | Minimum Drives | Device Failures Tolerated | Capacity Tradeoff |
|---|---|---|---|---|
| RAIDZ1 | Single | 3 | 1 | Lowest parity overhead |
| RAIDZ2 | Double | 4 | 2 | Middle |
| RAIDZ3 | Triple | 5 | 3 | Highest parity overhead |
Is RAIDZ2 the Same as RAID 6?
No. RAIDZ2 and conventional RAID 6 are often compared because both provide double-parity protection and can tolerate two device failures within the protected group. However, RAIDZ2 is part of the ZFS storage architecture and should not be described simply as another name for RAID 6.
ZFS integrates RAIDZ with features such as checksumming, copy-on-write, pooled storage, scrubbing and other filesystem-level data-integrity mechanisms.
RAIDZ2 Performance Considerations
RAIDZ2's double parity provides additional protection, but parity-based storage also introduces performance characteristics that should be considered when designing a ZFS system.
What Happens When a RAIDZ2 Drive Fails?
When a device in a RAIDZ2 VDEV fails or becomes unavailable, the VDEV becomes degraded but can continue operating while its remaining redundancy is sufficient. The failed device should be addressed promptly.
After an appropriate replacement device is introduced, ZFS reconstructs the required data onto that device through a process known as resilvering. RAIDZ2's second parity level means another device failure can be tolerated after the first failure, provided failures have not already exceeded the VDEV's redundancy.
When Does RAIDZ2 Make Sense?
RAIDZ2 or ZFS Mirrors?
RAIDZ2 and mirrored VDEVs solve different storage-design problems. RAIDZ2 is commonly attractive when capacity efficiency and double-parity protection are important. Multiple mirror VDEVs can be attractive for workloads where random I/O performance, certain resilver characteristics or incremental expansion are stronger priorities.
Neither layout is universally better. The correct design depends on workload, usable-capacity requirements, acceptable fault domains, drive count, expansion plans and recovery goals.
RAIDZ2 Is Not a Backup
RAIDZ2 protects against specified device failures; it does not replace an independent backup. Double parity cannot by itself protect against every form of accidental deletion, application corruption, malicious activity, catastrophic system loss or other events that may affect the pool.
Important data should be protected with an appropriate backup strategy that maintains independent copies according to the organization's recovery requirements.
RAIDZ2 FAQ
What is RAIDZ2?
RAIDZ2 is a ZFS double-parity VDEV layout that distributes data and parity across multiple storage devices.
How many drives does RAIDZ2 require?
The technical minimum is four devices: at least two data portions plus the equivalent of two parity levels.
How many drives can RAIDZ2 lose?
A RAIDZ2 VDEV can tolerate up to two device failures. A third required device failure exceeds RAIDZ2 redundancy.
Does RAIDZ2 use two dedicated parity drives?
No. RAIDZ distributes data and parity across the participating devices rather than permanently assigning two physical drives exclusively to parity.
Is RAIDZ2 the same as RAID 6?
No. Both use double-parity concepts and tolerate two device failures, but RAIDZ2 is integrated into ZFS and uses a different storage architecture.
Is RAIDZ2 better than RAIDZ1?
RAIDZ2 provides greater device-failure tolerance but consumes more capacity for parity. Which is preferable depends on the storage design and risk requirements.
Is RAIDZ3 safer than RAIDZ2?
RAIDZ3 provides an additional parity level and can tolerate three device failures, but it also requires additional capacity for parity.
Can RAIDZ2 use different-size drives?
It can, but usable capacity is generally constrained by the smallest participating device, so similar drive capacities are normally preferable.
What happens after a RAIDZ2 drive fails?
The VDEV becomes degraded. After the failed device is replaced, ZFS can reconstruct the required data onto the replacement through resilvering.
Does RAIDZ2 replace backups?
No. RAIDZ2 provides storage redundancy, not an independent copy of the data.
