ZFS Calculator: RAIDZ1, RAIDZ2, RAIDZ3 & Mirror Capacity
ZFS mirror and RAIDZ1/2/3 pool capacity with the allocation overhead for your recordsize, ashift and slop space.
- In decimal TB
- 31.86 TB
- Raw capacity
- 48 TB
- Data share in theory
- 66.7%
- Actual data share at this recordsize
- 66.7%
- Pool slop reservation
- 128 GiB
- Total disks
- 6
Formula and sources
Data sectors per block = ⌈recordsize ÷ 2^ashift⌉; + parity × ⌈data sectors ÷ (width − parity)⌉; then rounded up to a multiple of (parity + 1) — as vdev_raidz_psize_to_asize_width in OpenZFS Data share = recordsize ÷ space allocated; mirror = 1 ÷ width; stripe = 100% Slop = min(pool ÷ 32, 128 GiB), at least min(pool ÷ 2, 128 MiB); usable = raw × data share − slop
When to use the ZFS RAIDZ
RAIDZ is not quite RAID 5/6
RAIDZ writes every block with its own parity and pads it so the space used is a multiple of parity + 1. Real capacity can therefore be lower than (disks − parity) × size, especially with small recordsizes.
Recordsize and ashift
File datasets usually use a 128 KiB recordsize, while zvols for VMs often use 8–16 KiB. Modern 4 KiB-sector disks use ashift=12. Change both to see their effect on the RAIDZ data share.
Slop space
ZFS sets aside about 1/32 of the pool (at most 128 GiB) so essential operations still work when the pool is nearly full. Ordinary data cannot use it, so the calculator subtracts it.
Mirrors for performance
Several mirror vdevs give the highest random IOPS and the fastest resilver, at the cost of half the capacity. RAIDZ2 saves space for archives and backups. The number of vdevs decides how many disks work in parallel.
Frequently asked questions
Why does zfs list show a different figure?
ZFS reports available space assuming 128 KiB blocks, plus metadata and other reservations. Treat this result as a planning estimate, not the exact figure a command prints.
How many disks suit RAIDZ2?
There is no single magic number. Try several vdev widths here and compare the actual data share at the recordsize you use.
What about hardware RAID?
For RAID 5, 6, 10, 50 or 60 on a hardware controller or mdadm, use the RAID calculator, which also works out the write penalty and IOPS.
Related calculators
- RAIDUsable RAID 0, 1, 5, 6, 10, 50 and 60 capacity in TB and TiB, fault tolerance, write penalty and IOPS.Example: Usable capacity16 TBCalculate →
- Data Transfer TimeHow long a file or backup takes at a link speed, or the speed needed to finish in time.Example: Transfer time01:14:04Calculate →
- UPS Size & Battery RuntimeUPS rating in VA and watts and the battery runtime estimated with Peukert's law.Example: Minimum UPS rating625 VACalculate →