Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

Parity · RAID

Direct answer

Parity RAID spreads data and parity across a stripe. Small writes may require read-modify-write or reconstruct-write work, while full-stripe writes can reduce that overhead. Single- and dual-parity layouts differ in how many member failures per protected stripe/group they can tolerate.

When to use this

Use it when configuring, checking or troubleshooting Parity in RAID.

First 30 seconds

1. Parity (XOR/Reed-Solomon) rebuilds missing data.

2. RAID5 single, RAID6 double parity.

3. Write penalty from read-modify-write.

4. Regular scrubs detect errors.

5. Write hole risk without journal/BBU.

Operational verification

data → parity computed → stored across disks

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Failure and recovery traps

Valid parity can reconstruct missing data within the layout's tolerance; it does not provide an independent historical copy or automatically detect every corruption source.

Suspicious evidence: parity check reports mismatches, small-write workload drives high backend work, multiple members have latent errors, or parity is assumed to be a checksum/backup system.

Platform / version applicability
RAID storage
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformRAID storage
Scope / prerequisiteUse it when configuring, checking or troubleshooting Parity in RAID.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

logical write → stripe mapping → old-data/parity read when required → parity calculation → data/parity writes → acknowledgement; degraded read → surviving chunks/parity → reconstruction

Healthy evidence: parity state is consistent, all required members are healthy, no uncorrectable read errors occur and degraded reconstruction behaves as designed.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Parity ≠ checksum-based end-to-end integrity.
  • Parity protection ≠ backup.
  • Parity write penalty is workload- and implementation-dependent rather than one fixed universal number.
  • A parity-consistent stripe ≠ proof that the stored logical data is semantically correct.
Key checks
  • mdadm --detail /dev/md0 | grep -i level — RAID level
  • echo check > /sys/block/md0/md/sync_action — parity check
  • cat /sys/block/md0/md/mismatch_cnt — mismatches
ReferenceImportant terms & boundaries3 sections · depth on demand

Protection

Valid parity can reconstruct missing data within the layout's tolerance; it does not provide an independent historical copy or automatically detect every corruption source.

In depth

Parity lets a stripe be rebuilt from the remaining members

RAID 5 stores one parity block per stripe (XOR of the data blocks). RAID 6 adds a second, independent syndrome. If one block of a stripe is lost, XOR of the rest recreates it.

Data:   D1 = 1011   D2 = 0110   D3 = 1100
Parity: P  = D1 ⊕ D2 ⊕ D3 = 0001
Lost D2: D2 = D1 ⊕ D3 ⊕ P = 1011 ⊕ 1100 ⊕ 0001 = 0110

Cost of parity

ItemRAID 5RAID 6
Capacity used for parity1 disk2 disks
Survives1 failure2 failures
Small random write4 back-end I/Os6 back-end I/Os
Full-stripe writeNo read penaltyNo read penalty

Verifying parity on Linux md

The kernel md documentation describes sync_action values. check reads all blocks to verify redundancy. repair checks and rewrites inconsistencies. mismatch_cnt counts what was found, and it can exceed the real number of bad blocks because md works in pages.

# echo check > /sys/block/md0/md/sync_action
# cat /sys/block/md0/md/sync_action
check
# cat /sys/block/md0/md/mismatch_cnt
0

Limits of parity

  • Parity does not know which copy is right. A mismatch is fixed by recomputing parity from the data, not by finding the corrupt block. Checksumming file systems (ZFS, Btrfs) can find it.
  • The write hole: a crash between writing data and parity leaves a stripe inconsistent. md offers a write journal or PPL against this.
  • With large disks, a single-parity rebuild is a long window without redundancy. That is why RAID 6 is preferred for big HDDs.

Illustrative example (not a system capture).

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works

Parity stores a calculated value that lets the array rebuild one missing block per stripe. Single parity (P) is XOR of the data blocks; double parity adds a second, independent value (Q, Reed-Solomon over a Galois field) so any two missing blocks can be rebuilt.

Example with XOR: data blocks 1010 and 0110 give parity 1100. If the first block is lost, 0110 XOR 1100 = 1010 restores it.

The cost is the read-modify-write on small writes: read old data and old parity, write new data and new parity — 4 back-end I/Os for RAID 5, 6 for RAID 6. Full-stripe writes avoid it because parity is computed from new data only.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docRAID storage current

Authoritative/upstream documentation reviewed for bounded claims in RAID → Parity. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/admin-guide/md.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
raid parityparity raidparity calculation
Embedded reference data

Quick lookup tables

RAID → Parity RAID map

Fast layout, protection, failure and verification boundaries for RAID → Parity.

RAID boundaryWhat to verifyProof limit
Layout / topologyRAID level, member grouping, effective member size and stripe/mirror/parity structureThe label alone does not prove current member health or exact failure tolerance
Protection stateArray state, members, spares, cache protection and active rebuild/consistency workOptimal/online state does not prove backup or application integrity
Failure boundaryValid parity can reconstruct missing data within the layout's tolerance; it does not provide an independent historical copy or automatically detect every corruption source.Failure tolerance must be evaluated against the exact layout and failure pattern
AcceptanceHealthy evidence: parity state is consistent, all required members are healthy, no uncorrectable read errors occur and degraded reconstruction behaves as designed.Close only after the original workload/data check succeeds
Confirmation

Confirm action

Continue?