MySQL torn-page recovery

A torn InnoDB page may have a valid earlier copy in the doublewrite buffer—until new writes replace it.

InnoDB writes pages to a doublewrite area before their final tablespace locations so crash recovery can replace incomplete page writes. Storage failure, disabled protection or corruption of both copies can still leave checksum and page-header errors.

Understand the symptom

Recovery compares the damaged page with doublewrite, redo and backup versions at compatible log sequence numbers.

WHY

What is happening

A torn page contains only part of an intended write. InnoDB may repair it automatically during crash recovery when a good doublewrite copy exists. If recovery fails, the page type, space ID, page number, checksum, redo coverage and affected index determine whether restoration, reconstruction or logical extraction is viable.

What you may see

Symptoms that change the recovery path.

01

Page checksum mismatch

The stored checksum does not match the data read from disk.

02

Page appears torn or corrupt

Header, trailer or internal structures represent different write states.

03

Crash recovery stops repeatedly

InnoDB reaches the same unreadable page while applying redo.

04

Errors follow power or controller failure

An interrupted or reordered write affected persistent pages.

Protect the source

Actions that can make the situation worse.

01

Repeated recovery can overwrite good evidence

New doublewrite cycles and redo activity change candidate page copies.

02

Deleting doublewrite files removes alternatives

They may hold the only complete version of a torn page.

03

Forced startup can expose inconsistent indexes

A running instance is not proof that all rows and secondary indexes are correct.

Do this now

Safe steps before evaluation.

01

Stop the instance

Prevent restart loops, writes and automated recovery attempts.

02

Record page identifiers

Save space ID, page number, index or table, error log and LSN details.

03

Preserve all InnoDB components

Copy doublewrite, redo, undo, system and table files plus backups and binlogs.

04

Image affected storage

Capture the source before controller work, filesystem repair or file replacement.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Page-source comparison

NEPFOSYS compares tablespace, doublewrite, redo and backup page versions.

02

Protected reconstruction

Page restoration or logical range extraction is tested on copies.

03

Table validation

Recovered rows, indexes and application-level relationships are checked in a clean instance.

A clear next step

Preserve the original device before another repair or recovery attempt.

Start a case with the exact symptoms, incident timeline, prior attempts, encryption details, and the files that matter most. NEPFOSYS will route the case to the appropriate DFW intake or nationwide mail-in path.

Start with a case review

Questions, answered

What customers ask before starting.

What is a torn page?

It is a database page whose sectors do not all represent the same completed write, often after abrupt storage failure.

Does InnoDB always fix torn pages automatically?

Only when a usable doublewrite copy and compatible recovery context remain available.

Should I disable doublewrite after corruption?

No. Changing protection does not repair existing pages and can increase risk for future writes.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case