Back

Blog details

RAID vs Erasure Coding: Two Ways to Survive Disk Failure

AIOZ Network
9 min readDecember 01, 2026
aioz-storage
AIOZ Storage cover image with the headline RAID vs Erasure Coding, Surviving Disk Failure

RAID vs erasure coding is a question of where the parity lives. RAID spreads data and parity across the disks of one array, while erasure coding splits each object into k data and m parity pieces and spreads them across separate servers or sites.

TL;DR:

  • RAID protects the disks of one array with mirrors (RAID 1, 10) or parity (RAID 5, 6). Erasure coding generalizes parity to k data plus m parity pieces across many nodes.
  • RAID 6 on six disks and a 4+2 erasure code both cost 1.5x and survive two losses. The difference is the failure domain: a disk in one box, or a whole node.
  • AIOZ Storage protects each object with Reed-Solomon erasure coding across separate nodes, so you have no array to build or rebuild.

What Is the Difference Between RAID and Erasure Coding?

Both keep your data readable after hardware fails without storing a full extra copy of everything. Each computes parity, extra data derived from the original, and rebuilds a lost piece from what survives. RAID does it inside one array behind one controller or driver; erasure coding does it per object across many machines.

RAID was named in a 1987 UC Berkeley report by Patterson, Gibson and Katz, which introduced five RAID levels. Erasure codes come from forward error correction, a field that goes back to Richard Hamming's 1950 code at Bell Laboratories. The two overlap in Linux RAID 6, whose second parity block is a Reed-Solomon code, as H. Peter Anvin's paper on RAID-6 shows. For the wider picture, see how object storage protects data.

Diagram comparing a RAID 6 array, where data disks D1 to D4 and parity disks P (XOR) and Q (Reed-Solomon) sit inside one server, with an erasure code of k = 4 and m = 2, where data pieces 1 to 4 and parity pieces 1 and 2 sit on six separate nodes; both store 4 units of data in 6 raw units
Same 1.5x overhead and two-loss tolerance, different failure domain. Example values, not AIOZ Storage parameters.

How Do RAID Levels 0, 1, 5, 6 and 10 Protect Data?

The Linux md(4) manual gives definitions you can hold any RAID controller to:

  • RAID 0 stripes data with zero redundancy, so one failed disk loses the array.
  • RAID 1 mirrors: every device holds the same data, and an N-disk mirror survives N-1 failures.
  • RAID 5 stripes data with one XOR parity block per stripe, spread across all disks, and survives one failure.
  • RAID 6 adds a second parity block and survives any two failures, using N+2 drives for N drives of data.
  • RAID 10 stripes across mirrored sets; with two copies it always survives one failure, and more depending on layout.

XOR the surviving blocks of a RAID 5 stripe with its parity block and you get the missing block back, which is why RAID 5 can lose one disk and no more. A second loss needs a second equation: the Q block, built on the Reed-Solomon math behind erasure codes.

Why Do RAID Rebuilds Get Riskier as Disks Grow?

A RAID rebuild reads every surviving disk in full and writes one replacement disk in full. Say you run four 12 TB WD Red Plus drives (WD120EFGX) in RAID 5 and one fails. The rebuild reads 36 TB and writes 12 TB to one drive, which takes at least 12.8 hours at the listed rate of up to 260 MB/s. It usually takes longer, because the md driver slows recovery while your array serves normal traffic.

During those hours you face unrecoverable read errors, or UREs. The WD Red Plus brief rates the drives at fewer than 1 non-recoverable error per 10^14 bits read, and 36 TB is 2.88 x 10^14 bits. At that ceiling the chance of at least one URE is 1 - e^(-2.88), about 94%, and in a degraded RAID 5 that stripe has no second source left. Drives rated at 1 sector per 10^15 bits, like Seagate's Exos 7E10, bring the estimate down to 25%.

A datasheet figure is an upper bound, so treat these as worst cases. RAID 6 keeps a second parity block, so one URE during a single-disk rebuild is still repairable. A checksum that verifies data integrity tells you a read went bad, but only parity or another copy can fix it.

Diagram of two rebuilds: in RAID 5, disks 1 to 3 are each read in full (12 TB) and one new disk is written in full, 36 TB read and 12.8 hours at best at 260 MB/s; in an erasure code with k = 4 and m = 2, node C fails and each piece it held is rebuilt by reading 4 surviving pieces and writing the new piece to a healthy node, with different stripes repairing on different nodes
RAID funnels a rebuild into one disk; erasure coding spreads it over the network. Example values, not AIOZ Storage parameters.

How Erasure Coding Spreads k + m Pieces

An erasure code splits data into k data pieces, computes m parity pieces, and rebuilds the original from any k of the k + m. Ceph's documentation gives the two rules you need: the overhead factor is (k+m)/k, and m is how many storage daemons can fail at once without data loss. A 4+2 profile costs 1.5x and survives two losses, exactly like a six-disk RAID 6.

Placement and the free choice of k and m are where the two part ways. Ceph's crush-failure-domain setting keeps any two chunks of an object out of the same host or rack. Backblaze Vaults store each file as 17 data and 3 parity shards across 20 Storage Pods, noting that Linux software RAID offers only one or two parity blocks. When a node dies, the survivors of each affected stripe sit on many other nodes, so you trade the single-disk bottleneck for network reads of k pieces per rebuilt piece.

Neither command below was run for this post: the mdadm line follows the mdadm(8) manual's syntax, and the Ceph lines are quoted from Ceph's erasure code page.

# RAID 6 over six disks (Linux md)
mdadm --create /dev/md0 --level=6 --raid-devices=6 /dev/sd[b-g]

# Erasure code profile: k=3, m=2, no two chunks in one rack (Ceph)
ceph osd erasure-code-profile set myprofile \
    k=3 \
    m=2 \
    crush-failure-domain=rack
ceph osd pool create ecpool erasure myprofile

Local vs Wide-Area Erasure Codes

Where you place the pieces decides which failures you survive and what repairs cost. A local code keeps every piece inside one data center, so repairs stay on the fast local network, but losing the site loses everything. A wide-area code spreads pieces over sites or regions, so an outage costs only the pieces stored there, while repairs cross slower long-distance links.

Large systems often layer the two. Facebook's f4 encodes each volume with Reed-Solomon (10 data plus 4 parity blocks) inside one data center cell, then stores an XOR of paired volumes from two regions in a third region. The paper reports an effective replication factor of 2.1 that survives losing a whole data center, the kind of failure domain behind durability targets like 11 nines.

Microsoft attacked repair cost instead. Its Local Reconstruction Codes in Windows Azure Storage split 12 data fragments into two groups of 6, each with a local parity, plus two global parities. Rebuilding one fragment then reads 6 fragments instead of the 12 that a Reed-Solomon code with the same 1.33x overhead needs. In that name, "local" means a small parity group, not one site.

Overhead and Fault Tolerance Side by Side

The table comes from a short Python script run for this post (Python 3.12.3, Nov 4, 2026). Usable capacity is data divided by raw: (n-1)/n for RAID 5, (n-2)/n for RAID 6 and k/(k+m) for an erasure code.

SchemeExample layoutUsable capacity (formula)Raw TB per TB storedLosses always survived
RAID 06 disksn/n = 100%1.000
RAID 12-disk mirror1/n = 50%2.00n-1 = 1
RAID 56 disks(n-1)/n = 83.3%1.201
RAID 66 disks(n-2)/n = 66.7%1.502
RAID 106 disks, 2 copies1/2 = 50%2.001
Erasure code 4+26 piecesk/(k+m) = 66.7%1.50m = 2
Erasure code 10+414 piecesk/(k+m) = 71.4%1.40m = 4
Erasure code 17+320 pieces (Backblaze Vaults)k/(k+m) = 85.0%1.18m = 3
import math

# Usable share of raw capacity and guaranteed disk/piece losses survived
schemes = [
    ("RAID 0, 6 disks", 6 / 6, 0),
    ("RAID 1, 2 disks", 1 / 2, 2 - 1),
    ("RAID 5, 6 disks", (6 - 1) / 6, 1),
    ("RAID 6, 6 disks", (6 - 2) / 6, 2),
    ("RAID 10, 6 disks", 1 / 2, 1),
    ("EC k=4 m=2", 4 / (4 + 2), 2),
    ("EC k=10 m=4", 10 / (10 + 4), 4),
    ("EC k=17 m=3", 17 / (17 + 3), 3),
]
for name, usable, survives in schemes:
    print(f"{name:17} usable {usable:6.1%}  raw per TB stored {1 / usable:4.2f}  survives {survives}")

# RAID 5 rebuild: four 12 TB disks, one fails, the other three are read in full
bits_read = 3 * 12e12 * 8
for rate in (1e14, 1e15):
    expected = bits_read / rate
    print(f"URE spec 1 per {rate:.0e} bits: expected {expected:.2f}, "
          f"P(at least one) {1 - math.exp(-expected):.1%}")

# Fastest possible refill of one 12 TB replacement disk at 260 MB/s
print(f"rebuild floor: {12e12 / 260e6 / 3600:.1f} hours")

Output, run here:

RAID 0, 6 disks   usable 100.0%  raw per TB stored 1.00  survives 0
RAID 1, 2 disks   usable  50.0%  raw per TB stored 2.00  survives 1
RAID 5, 6 disks   usable  83.3%  raw per TB stored 1.20  survives 1
RAID 6, 6 disks   usable  66.7%  raw per TB stored 1.50  survives 2
RAID 10, 6 disks  usable  50.0%  raw per TB stored 2.00  survives 1
EC k=4 m=2        usable  66.7%  raw per TB stored 1.50  survives 2
EC k=10 m=4       usable  71.4%  raw per TB stored 1.40  survives 4
EC k=17 m=3       usable  85.0%  raw per TB stored 1.18  survives 3
URE spec 1 per 1e+14 bits: expected 2.88, P(at least one) 94.4%
URE spec 1 per 1e+15 bits: expected 0.29, P(at least one) 25.0%
rebuild floor: 12.8 hours

At equal overhead, RAID 6 and a 4+2 code give you the same protection, so erasure coding gains from wider stripes like 17+3 and from where the pieces sit. Mirroring is the costliest way to survive one failure, which is why full-copy data replication loses to erasure coding on storage cost at scale.

Where Each One Is Used

RAID fits a single server or NAS, where you have a few disks, one controller and no network in the rebuild path. RAID 6 suits bulk arrays of large disks, where one URE during a rebuild must not cost you data.

Erasure coding fits scale-out systems. The HDFS docs note that 3x replication carries 200% overhead, while typical erasure coding setups stay at or under 50%. It also suits decentralized networks, where every node is its own failure domain. Neither method is a backup, though: both faithfully keep a deleted file deleted.

How AIOZ Storage Handles It

AIOZ Storage sits on the erasure coding side. It protects each object with Reed-Solomon erasure coding, per AIOZ Storage engineering (2026). The object is encrypted first, then split into data and parity pieces that go to different nodes on AIOZ DePIN. Any k of the n pieces rebuild it, and no single node holds a complete copy.

For you, there is no array to build and no RAID level to pick. The network audits the nodes holding pieces and repairs lost ones from the survivors. The full scope is in what AIOZ Storage erasure coding covers and what it doesn't.

What we don't publish yet: the k and n values, the storage overhead, a durability figure and repair timing.

Uploads use the standard S3 call from the docs, with two client settings first. These commands were not run for this post:

export AWS_REQUEST_CHECKSUM_CALCULATION=when_required
aws configure set default.s3.addressing_style path
aws s3 --endpoint-url https://s3.aiozstorage.network cp /path/to/file s3://bucket-name

The first two lines turn off the aws-chunked uploads and bucket subdomains that current AWS CLI versions default to, because AIOZ Storage needs a Content-Length on uploads and path-style URLs (checked Oct 19, 2026). To try it, follow the AWS CLI guide in the AIOZ Storage docs.

Frequently Asked Questions

Is RAID 6 a form of erasure coding?
In the math sense, yes: it is a k+2 code with a Reed-Solomon second parity, fixed at two parity blocks inside one array.

Is erasure coding better than RAID?
Across many machines it usually wins on overhead and failure domains. On one small server, RAID is simpler and rebuilds locally.

How much storage overhead does erasure coding add?
The overhead factor is (k+m)/k: 1.5x for a 4+2 code and about 1.18x for 17+3.

Does RAID or erasure coding replace backups?
No. Both survive hardware loss, not deletion, overwrites or ransomware, so you still need versioned or separate copies.

Does AIOZ Storage use RAID?
AIOZ Storage protects each object with Reed-Solomon erasure coding across separate AIOZ DePIN nodes, not with a RAID level you configure.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

Full vs Incremental vs Differential Backup Types Explained

Full vs incremental vs differential backup: what each run copies, how restore chains work, storage and time trade-offs, synthetic fulls and RPO/RTO fit.

aioz-storage
8 min readDecember 04, 2026
blog thumbnail

RAID vs Erasure Coding: Two Ways to Survive Disk Failure

RAID vs erasure coding: RAID guards the disks of one array, while erasure coding spreads k data and m parity pieces over nodes. Compare overhead and rebuilds.

aioz-storage
9 min readDecember 01, 2026
blog thumbnail

What Is Reed-Solomon Coding? The Math Behind Erasure Codes

Reed-Solomon coding turns k data pieces into n, and any k of them rebuild the original. See the polynomial math, GF(2^8), a demo and how AIOZ Storage uses it.

aioz-storage
7 min readNovember 27, 2026
blog thumbnail

RPO vs RTO Explained, With Backup and Restore Examples

RPO vs RTO: RPO caps how much data you can lose, RTO caps how long you can stay down. See how to calculate both, MTD, and the DR strategies that meet them.

aioz-storage
7 min readNovember 24, 2026
blog thumbnail

What Is AWS Signature Version 4? How S3 Requests Are Signed

AWS Signature Version 4 signs each S3 request with an HMAC key derived from your secret. See the four steps, a worked example and the errors that break it.

aioz-storage
7 min readNovember 20, 2026
blog thumbnail

Encryption at Rest vs in Transit, and What Each Protects

Encryption at rest vs in transit: at rest guards stored bytes from stolen disks, in transit guards requests on the network with TLS. See what each one misses.

aioz-storage
7 min readNovember 17, 2026