Research notes / Crash recovery
RAID write hole: why a bitmap is not a write journal
Published 11 October 2026 / Updated 9 November 2026 / Primary-source review and algebraic model
A RAID bitmap remembers where writes may be incomplete. It does not store the bytes needed to replay them. Partial Parity Log and a data journal address different recovery obligations.
The key distinction is between recovering untouched data, preserving an in-flight update, and committing an application transaction. Calling all three "power-loss protection" hides the question an engineer needs answered.
On this page12 sections
One missing drive is not the only condition
In a simple RAID5 stripe, parity obeys P = A XOR B XOR C. If B disappears, its value follows from B = P XOR A XOR C. That reconstruction assumes P matches the surviving data.
Changing A also changes P. An interruption between those member updates can leave a mismatched pair. If B is then unavailable before consistency is restored, the same XOR operation can silently produce the wrong B, even though B was never part of the interrupted write.
Linux MD documents this dirty-and-degraded hazard and normally refuses to assemble such an array. Here, "dirty" means redundancy may be inconsistent; "degraded" means a member is missing. An assembly override does not create missing evidence. [3]
A four-state counterexample
Start with one bit per chunk: A=0, B=1, C=1, P=0. Change only A to 1, so the intended new parity is 1. For this illustration, each member update is atomic, but data and parity may persist independently. B becomes unavailable at reconstruction.
| Persisted updates | A / P after crash | Naive recovered B | PPL recovered B | New A present? |
|---|---|---|---|---|
| Neither | 0 / 0 | 1 (correct) | 1 (correct) | No |
| Only P | 0 / 1 | 0 (wrong) | 1 (correct) | No |
| Only A | 1 / 0 | 0 (wrong) | 1 (correct) | Yes |
| A and P | 1 / 1 | 1 (correct) | 1 (correct) | Yes |
Both mixed states reconstruct B incorrectly with stale parity. A normal resynchronization can recompute P if all data chunks remain readable. Merely knowing that the stripe is dirty cannot supply B once it is missing.
What PPL saves, and what it does not
Linux MD's PPL records the XOR of unmodified chunks before dispatching member updates. It lives on the stripe's parity member, without a separate journal drive. The documented implementation is for RAID5 and does not combine PPL with a write-intent bitmap. [1]
In our example, that record is Q = B XOR C = 0. Use the A that actually survived: P_repaired = A_after XOR Q. Recovering B then cancels A: B = P_repaired XOR A_after XOR C = Q XOR C = 1. This works whether A is old or new.
Linux v6.12's ppl_recover_entry reads the modified members and combines their surviving contents with partial parity. This repairs parity; it does not roll back changed data. Even full-stripe writes retain a log entry with pp_size=0: no partial-parity payload does not mean no recovery metadata. [7]
Recovering B does not establish whether the intended A arrived. The kernel documentation explicitly excludes a guarantee for in-flight data and describes the case of losing a modified member as unprotected by PPL recovery. [1]
Why rewriting a block may leave parity broken
Denehy and colleagues' FAST 2005 research proposed journal-guided resynchronization: ext3 declarations identify pending writes; a new verify-read request checks RAID redundancy. This was a cross-layer prototype, not a current ext4 setting. A normal read-modify-write is insufficient: overwriting D with itself gives P_bad XOR D XOR D = P_bad, preserving an existing mismatch. Explicit verification instead recomputes parity from readable stripe data. [8, sections 4.2-4.4]
The limitation is broader than a same-value rewrite. Let S = P_stored XOR A XOR B XOR C be the parity syndrome. A completed update to A' calculates P' = P_stored XOR A XOR A'; therefore S' = P' XOR A' XOR B XOR C = S. Every pre-existing mismatch survives, even when A' differs from A. This is Hesela's algebraic deduction for a completed XOR read-modify-write, with readable data and no intervening fault, not a Linux MD execution trace.
Two downloadable test loops cover 65,536 old/new byte pairs and 65,536 error/new-byte pairs. They verify the invariant; they do not sample disks or estimate failure probabilities. Run the test file beside the syndrome model with node --test raid-parity-syndrome.test.mjs. Recomputing parity from all readable data removes the mismatch, but cannot establish that those data are the application's intended version.
The journal also needs coverage
The prototype first verifies filesystem and journal superblocks. It checks the first committed transaction's home locations before replay, then verifies a maximum-transaction-sized region beyond the last commit to cover interrupted writes into the journal itself. [8, section 4.4]
For the next uncommitted transaction, declarations identify home writes needing verification when no descriptor blocks are found. Under the prototype's ordering, descriptors imply those data writes already completed. This dependency is specific to its protocol, not permission to ignore arbitrary uncommitted records. [8, sections 4.2, 4.4]
The benchmark is not a modern rebuild estimate
The experiments used five disks configured as a 1 GB RAID-5 array on Linux 2.6.11. Later comparisons used an ordered-mode baseline with added write sorting. The small, synchronous TPC-B-like workload made declared mode about 19% slower than that baseline; batching reduced the gap. These are the authors' historical measurements, not Hesela benchmarks. The recovery result concerns parity resynchronization after a crash, not replacement of a failed member. It does not predict recovery time for a modern multi-terabyte array. [8, sections 2.1, 2.3, 5.1-5.2]
Four mechanisms, four different promises
| Mechanism | Recovery information | Important boundary |
|---|---|---|
| Write-intent bitmap | Region markers for synchronization | No replay payload [3] |
| PPL | Partial parity of untouched chunks | Not an in-flight data journal [1] |
| Write-through journal | Data and parity logged before member updates | Completion waits for array members [2] |
| Write-back journal | Data logged before later destaging | Completed I/O can depend on the journal device [2] |
In Linux MD write-through mode, losing the journal does not discard already completed writes, but removes write-hole protection for subsequent operation. In write-back mode, loss of the journal can lose completed data not yet destaged. The extra device is therefore part of the durability design, not just a performance accessory. [2]
The log must survive, and the application still has a protocol
A recovery proof that begins "the log is durable" has a real precondition. Linux distinguishes flushing previous cached writes from FUA, which ties completion of the flagged write to nonvolatile storage. Remapping layers must preserve these semantics. A normal device completion is not universally that durability boundary. [4]
Controller protection adds another recovery boundary. Traditional battery-backed DRAM retains data while backup power lasts; flash-backed write cache uses stored energy to copy it to flash. Batteries can support either design, so the component label is insufficient. [10] [9, pp. 2-4]
Dell's 2011 cache-to-flash design restores saved bytes to DRAM before destaging them to drives and rearming flash protection. An intact saved cache therefore does not prove destaging has finished. [9, pp. 5-8] Hesela's engineering interpretation: controller cache and drive cache require separate persistence checks. This vendor design does not verify Linux MD recovery or remove the application's commit obligation. [4]
For array-controller failure, the HP ProLiant DL380p Gen8 service guide describes moving the original cache module and capacitor pack to an identical controller model, with the drives transferred to a recovery server; it separately warns against incompatible cache-module/controller combinations. [11, pp. 60, 64] Dell's H710/H710P/H810 guide warns that discarding preserved dirty cache before importing the relevant foreign configuration can lose data. [12, p. 46] These model-specific examples support an engineering distinction: cache survival and RAID redundancy alone do not establish that pending writes were recovered. They are not a general hardware-recovery procedure.
Zheng and colleagues injected power faults into SSDs and checked recovered contents, including ordering and partial-record failures. Their historical device study tests a lower layer than our XOR model. It is evidence for validating storage assumptions, not a measured failure rate for PPL or modern journal devices. [6, sections 3-4]
At the other end of the stack, Pillai and colleagues used block reordering and application-specific recovery checks to study persistence properties. The OSDI14 work separates ordering, atomicity and durability; its application analysis also considers expectations beyond some documented guarantees. We use that distinction, not its vulnerability totals as a ranking of current software. [5, sections 2-4]
Hesela's engineering conclusion: a parity-consistent array can still hold an incomplete multi-block application update. A filesystem or database must enforce its own recovery protocol. Closing the RAID write hole alone does not turn every file operation into an atomic transaction.
Read the controller's active cache policy
An operating-system label need not describe the controller's actual policy. Dell's H700/H800 guide says RAID volumes appear as write-through to Windows and Linux regardless of their virtual-disk policy. It directs readers to OpenManage or the BIOS configuration utility for the controller's settings. This is a model-specific example, not a rule for all RAID controllers. [13, section 4.10]
PERC 10 exposes separate Current write cache, Default write cache and Disk cache fields. Its guide also explains that Linux can assume write-through after an unanswered cache-settings query; that message does not change the controller's cache policy. [14, pp. 65, 86]
The active policy can also change during reconfiguration. The PERC 10 guide states that RAID-level migration or online capacity expansion switches all virtual disks on the controller to write-through until the operation completes. Record the observation time and background operation alongside the policy; a configured default is not a history of the effective setting. This is a documentation-based inference, not a measured latency or durability result. [14, p. 25]
Record the controller model, firmware and current policy when reviewing an array. Treat the host label, configured default and downstream disk cache as separate observations. This operational inference does not establish end-to-end durability. Compare the definitions of write-through and write-back.
Cache survival depends on the failure being tested
The historical Rio file cache protected memory and recovered it through a warm reboot on DEC Alpha / Digital Unix. Its registry retained buffer identities; metadata updates still required ordering. Power outages were outside the study. [15, sections 1-2]
The fault-injection study discarded runs that did not crash within ten minutes. Its corruption counts therefore describe a selected experimental population, not an unconditional field failure rate. Protection also did not prevent incorrect requests through legitimate I/O procedures. [15, sections 3.1-3.2]
Hesela's engineering inference: record the failure being tested, surviving state and recovery procedure separately. A software-crash result cannot establish power-loss durability, controller-failure recovery or application transaction atomicity. Rio does not justify disabling synchronization in a current system. Linux's flush and FUA requirements still describe their own block-layer contract. [4]
Surviving bytes are not an atomic transaction
The 1997 Vista recoverable-memory library adds transactions on top of Rio. Its Rio-backed undo log holds before-images of ranges declared before modification; abort restores them, while commit discards them. When a segment is mapped after Rio's reboot recovery, Vista rolls back uncommitted work idempotently. No redo log does not mean no log. [16, section 4]
The project authors leave concurrency control to higher layers. They also distinguish memory capacity from correctness: larger-than-RAM datasets work, but may thrash. [17]
| Question | Relevant mechanism | Still separate |
|---|---|---|
| Do cached bytes survive the tested OS crash? | Rio protection and recovery [15] | Application transaction boundaries |
| Are incomplete updates rolled back? | Vista undo protocol [16] | Concurrency control [17] |
| Do bytes survive loss of power? | Power protection and its recovery assumptions [15] | Not established by the software-crash experiments |
Hesela's inference: ask separately what survives, which partial changes recovery removes, and which failures the evidence covers. Vista does not make unprotected DRAM power-loss durable. This source comparison is not a reproduction of either system or a prescription for Linux MD.
Reproduce the reasoning
Primary-source review of version-pinned Linux v6.12 documentation and recovery code, ASPLOS96/SOSP97/FAST05/FAST13/OSDI14 research and vendor controller-cache documentation, plus an original exhaustive one-bit XOR illustration with two exhaustive byte-pair checks of completed read-modify-write parity-syndrome preservation. No hardware fault injection or Linux MD implementation test was performed.
The model enumerates 32 cases: eight initial bit triples and four persistence masks, with A always changed. Naive B reconstruction is wrong in 16 cases; the assumed intact partial-parity record recovers B in all 32. The intended A remains absent in 16.
None of these counts is a probability. We assign no likelihood to a crash time or write order. There is no measured population and no statistical confidence interval to estimate.
All states, CSV, JSON provenance and runnable model. The page and data use the same model bytes. This is an algebraic illustration of a guarantee boundary, not a reproduction of either paper or a verification of Linux MD.
The model assumes atomic member writes, an intact durable partial-parity record and a missing untouched data member. State counts are not probabilities. Historical papers do not establish current product failure rates. Torn writes, corrupted logs, a missing modified member, concurrent updates and application acknowledgements are outside the model.
Questions for an actual array
- Which consistency policy is active on this exact array, kernel and metadata format?
- What does write completion promise, and which device still holds the only current copy?
- Does recovery preserve untouched data, replay new data, or both under the specified failure?
- Have the cache, flush, firmware and application recovery assumptions been validated together?
These are review questions, not instructions to force-assemble a damaged array or interrupt production power. Qualification belongs on isolated, disposable test media with expected contents and recovery rules defined first.
Related: SSD power-fault evidence, fsync failures and NAND paired pages.
Definitions: RAID write hole, Partial Parity Log, write-intent bitmap and RAID 5.
Primary sources
- Linux v6.12: Partial Parity Log
- Linux v6.12: RAID 4/5/6 cache
- Linux v6.12: RAID arrays, dirty/degraded assembly and bitmap metadata
- Linux v6.12: Explicit volatile write back cache control
- Pillai, Chidambaram, Alagappan, Al-Kiswany, Arpaci-Dusseau and Arpaci-Dusseau. All File Systems Are Not Created Equal: On the Complexity of Crafting Crash-Consistent Applications. OSDI 2014, pp. 433-448, sections 2-4.
- Zheng, Tucek, Qin and Lillibridge. Understanding the Robustness of SSDs under Power Fault. FAST 2013, pp. 271-284, sections 3-4.
- Linux v6.12: raid5-ppl.c, log format and ppl_recover_entry
- Denehy, Arpaci-Dusseau and Arpaci-Dusseau. Journal-guided Resynchronization for Software RAID. FAST 2005, sections 4-5.
- Bill Lynn and Ansh Gupta. Non-Volatile CACHE for Host-Based RAID Controllers. Dell, Revision 2, January 2011, printed pp. 2-8.
- HP ProLiant BL680c G7 Server Blade User Guide: controller options, printed p. 65, BBWC and FBWC.
- HP ProLiant DL380p Gen8 Server Maintenance and Service Guide. September 2013, Edition 6, 661847-006a, printed pp. 60 and 64: cache compatibility and controller-failure recovery.
- Dell PowerEdge RAID Controller H310, H710, H710P, and H810 User's Guide. March 2013, Rev. A02, printed p. 46: managing preserved cache.
- Dell PERC H700/H800 Technical Guide. Revision 3, March 2011, section 4.10, printed p. 20: OS presentation and virtual-disk policy.
- Dell EMC PERC 10 User's Guide. September 2021, Rev. A09, printed pp. 25, 65 (table 12) and 86: reconfiguration, policy fields and Linux cache-query message.
- Chen, Ng, Chandra, Aycock, Rajamani and Lowell. The Rio File Cache: Surviving Operating System Crashes. ASPLOS VII, 1996, sections 1-3 and 5.
- Lowell and Chen. Free Transactions with Rio Vista. SOSP 1997, section 4, PDF p. 4.
- Rio project authors: Questions about Vista, concurrency and working-set size.
Original sources accessed 11 October 2026; recovery-code and FAST05 review added 25 October 2026. Controller-cache sources reviewed 1 November 2026; journal recovery coverage and benchmark scope rechecked 4 November 2026. Controller-policy visibility reviewed 6 November 2026; Rio failure-scope review added 9 November 2026. Linux MD and block-layer claims are pinned to v6.12, not every version or vendor. Paper figures are not reproduced.