Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

RAID 5

Direct answer

RAID 5 stripes data with one parity block per stripe across at least three disks; it survives one disk failure. Capacity = (n−1) disks.

When to use this

Use it when choosing RAID 5 or checking an existing RAID 5 array.

First 30 seconds

1. cat /proc/mdstat — level 5 and all members up?

2. mdadm --detail /dev/md<n> — state, failed or spare devices.

3. Capacity and tolerance as expected for this level?

4. Degraded → replace the failed disk and rebuild.

5. Backups exist independent of the array.

Operational verification

disks → RAID 5 layout → array device → filesystem

Evidence · next step

For RAID → RAID 5, continue with the first unproven Topic check: Confirm member count, chunk/layout and exactly which role is missing/faulty before initiating replacement or assembly changes. If that boundary is healthy, advance to the adjacent check: Inspect every remaining member/path for read errors and latency before and during reconstruction because they are required to rebuild the lost data. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
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.

Platformlinux
Scope / prerequisiteUse it when choosing RAID 5 or checking an existing RAID 5 array.
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.

5 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 Operational evidence path Verify boundary

logical I/O → stripe/chunk mapping → data + single parity computation → member completions → degraded/reconstruction state → upper filesystem/application verification

Healthy evidence: all expected members are active, parity state is clean with no unexplained mismatch/recovery activity, member health is stable and the upper workload verifies.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Confirm member count, chunk/layout and exactly which role is missing/faulty before initiating replacement or assembly changes.

  • Inspect every remaining member/path for read errors and latency before and during reconstruction because they are required to rebuild the lost data.
  • Monitor recovery progress, mismatch/check counters and kernel/storage errors, and avoid unrelated high-risk changes during the degraded window.
  • After rebuild, show clean redundancy plus filesystem/data/workload integrity and investigate the original member failure cause.

Verification chain. logical I/O → stripe/chunk mapping → data + single parity computation → member completions → degraded/reconstruction state → upper filesystem/application verification

Step 3 Commands Verify boundary
mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sd[b-e]1
cat /proc/mdstat
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: the array is degraded, reconstruction exposes read errors on another member, mismatch counts grow or parity performance symptoms are mistaken for generic disk slowness.

Step 5 Common mistakes Narrow the fault
  • RAID 5 with large disks (long rebuilds, second-failure risk).
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

Rebuilds of large disks take long and stress the others — a second failure or read error during rebuild loses the array. Prefer RAID 6 or 10 for large disks. Writes are slower (read-modify-write).

Key checks
  • cat /proc/mdstat — md arrays and sync status
  • mdadm --detail /dev/md<n> — array state and members
  • mdadm --examine /dev/<dev> — member superblock
  • smartctl -H /dev/<disk> — disk health
ReferenceWhat it is1 section · depth on demand

Core model

Track data/parity geometry, one-failure tolerance and degraded status separately from availability. During a rebuild the array depends on all remaining required blocks being readable; a second member failure or unrecoverable read error can exceed redundancy, so preserve evidence and member health before stressing the array.

ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

RAID5 recovery is not closed until the array has full expected membership, no active recovery/mismatch condition remains and upper-layer data/workload verification succeeds after the degraded window.

In depth

RAID5: striping with distributed parity

RAID5 stripes data across all members and stores one parity block per stripe, rotating between devices. The md(4) manual page describes RAID4 and RAID5 as striping with parity, surviving one failed device. A degraded RAID5 array that also had an unclean shutdown won't start automatically, because the parity may be inconsistent, which md calls dirty and degraded.

Properties

PropertyRAID5
Minimum devices3
Usable capacityn − 1 devices
Fault tolerance1 device
ReadsFast, spread across members
Small random writesSlow: read-modify-write of data and parity
RebuildReads every surviving member completely

The large-disk problem

Rebuilding a RAID5 array reads every other disk completely. With many large disks, the chance of a second failure or an unreadable sector during that rebuild is significant. A second problem during a RAID5 rebuild means data loss. That's why RAID6 is usually preferred for arrays of large drives.

Settings worth knowing

SettingPurpose
Write-intent bitmap (--bitmap=internal)Fast resync after a crash
stripe_cache_size (sysfs)A larger cache improves write performance (costs RAM)
Regular scrubs (check)Find unreadable sectors before a rebuild needs them
--backup-file for reshapesmdadm needs it for level and layout changes

Growing a RAID5

mdadm --grow can add a device to a RAID5 array. The array reshapes in the background, and then the file system can be grown.

host$ sudo mdadm --create /dev/md5 --level=5 --raid-devices=3 --bitmap=internal /dev/sdc1 /dev/sdd1 /dev/sde1
host$ cat /proc/mdstat | grep -A1 md5
md5 : active raid5 sde1[3] sdd1[1] sdc1[0]
      3906764800 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [UU_]
      [=>...................]  recovery =  7.1% ...
host$ sudo mdadm /dev/md5 --add /dev/sdf1
host$ sudo mdadm --grow /dev/md5 --raid-devices=4
host$ cat /sys/block/md5/md/sync_action
reshape
host$ cat /sys/block/md5/md/stripe_cache_size
256
host$ echo 4096 | sudo tee /sys/block/md5/md/stripe_cache_size

Reading the new array

Directly after creation, a RAID5 shows [3/2] [UU_] and "recovery". md builds the parity by treating the last device as a spare being rebuilt. That's normal for a new array, and it doesn't indicate a failed disk.

Documented example, not captured output.

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

How it works at runtime

RAID 5 is part of RAID → RAID 5. RAID 5 stripes data and single distributed parity across at least three members, tolerating one member failure while introducing parity read-modify-write/full-stripe behavior and a critical degraded/rebuild window.

Topic-specific state model. RAID 5 stripes data and single distributed parity across at least three members, tolerating one member failure while introducing parity read-modify-write/full-stripe behavior and a critical degraded/rebuild window.

Interpretation rule. - RAID5 degraded and online ≠ safe normal state; single-failure tolerance has already been consumed.

  • Parity present ≠ silent corruption is automatically detectable/correctable in every case without end-to-end checksums or scrubbing context.
  • Rebuild started ≠ recovery will finish; remaining members must survive a complete reconstruction workload.
  • Large sequential benchmark success ≠ small random-write workload is healthy; parity write penalties and cache behavior differ.

Quick reference

RAID 5 with md: single distributed parity.

mdadm --create /dev/md0 --level=5 --raid-devices=4 --chunk=512 /dev/sd[b-e]
cat /sys/block/md0/md/stripe_cache_size; echo 8192 > /sys/block/md0/md/stripe_cache_size
mdadm --grow /dev/md0 --raid-devices=5 --add /dev/sdf    # reshape to more disks

Avoid RAID 5 with large HDDs (long rebuilds, URE risk); md has a write-hole risk on power loss — use a journal device (--write-journal /dev/nvme0n1p1) or partial parity log (--consistency-policy=ppl).

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

Limits and how it fails

Primary failure point. RAID5 recovery is not closed until the array has full expected membership, no active recovery/mismatch condition remains and upper-layer data/workload verification succeeds after the degraded window.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. RAID 5 owns Linux single-parity array operation and rebuild boundaries. Storage RAID owns generic parity theory; Physical Media owns device failure; Data Integrity/Filesystem owns end-to-end content correctness.

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 doclinux current

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

Basis: https://docs.kernel.org/admin-guide/md.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
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
linux raid5mdadm raid 5raid five linuxsingle parity md
Embedded reference data

Quick lookup tables

RAID 5 operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for RAID 5.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateRAID 5 stripes data and single distributed parity across at least three members, tolerating one member failure while introducing parity read-modify-write/full-stripe behavior and a critical degraded/rebuild window.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin exact host + array UUID/name → capture /proc/mdstat + md detail → examine every candidate member superblock/role/event count → prove lower device/path health → identify clean/degraded/recovery/reshape state → change one demonstrated cause → verify expected active membership/redundancy → read back LVM/filesystem → repeat original workload and regression.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainlogical I/O → stripe/chunk mapping → data + single parity computation → member completions → degraded/reconstruction state → upper filesystem/application verificationTrace requested/configured state through effective state to the observed workload result.
Failure boundaryRAID5 recovery is not closed until the array has full expected membership, no active recovery/mismatch condition remains and upper-layer data/workload verification succeeds after the degraded window.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux RAID evidence can establish this proof path: logical I/O → stripe/chunk mapping → data + single parity computation → member completions → degraded/reconstruction state → upper filesystem/application verificationUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured host/VM, array UUID, metadata generation, member set, device/path health, recovery window, upper filesystem/LVM, time or workload scope. RAID5 recovery is not closed until the array has full expected membership, no active recovery/mismatch condition remains and upper-layer data/workload verification succeeds after the degraded window.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven RAID boundary: capture exact member metadata and downstream state, preserve recoverability, change only the demonstrated cause, verify stable array membership/redundancy, then repeat the original upper-layer workload and adjacent regression checks.Continue to the next unresolved boundary while preserving the original test condition.

RAID 5 · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryRAID 5
Topic pathRAID → RAID 5
Runtime stateRAID 5 stripes data and single distributed parity across at least three members, tolerating one member failure while introducing parity read-modify-write/full-stripe behavior and a critical degraded/rebuild window.
Fast checks- Confirm member count, chunk/layout and exactly which role is missing/faulty before initiating replacement or assembly changes. - Inspect every remaining member/path for read errors and latency before and during reconstruction because they are required to rebuild the lost data. - Monitor recovery progress, mismatch/check counters and kernel/storage errors, and avoid unrelated high-risk changes during the degraded window. - After rebuild, prove clean redundancy plus filesystem/data/workload integrity and investigate the original member failure cause.
Verification chainlogical I/O → stripe/chunk mapping → data + single parity computation → member completions → degraded/reconstruction state → upper filesystem/application verification Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryRAID5 recovery is not closed until the array has full expected membership, no active recovery/mismatch condition remains and upper-layer data/workload verification succeeds after the degraded window. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?