Linux bcache recovery

A missing bcache device can contain the newest writes, not merely disposable acceleration data.

Linux bcache can operate in writethrough, writearound, or writeback mode. When writeback was active, acknowledged changes may exist only on the cache device until they are written to the backing disk.

Understand the symptom

The recovery path depends on whether the absent cache held dirty sectors.

WHY

What is happening

A clean cache can usually be bypassed without losing acknowledged writes. A writeback cache may hold newer blocks than the backing disk. Forcing the backing device to run without that cache can expose an internally inconsistent filesystem and discard the only current copy of modified sectors.

What you may see

Symptoms that change the recovery path.

01

/dev/bcache device is absent

The kernel is waiting for the cache set associated with the backing device.

02

Cache device failed during writeback

Dirty data may not have reached the backing disk.

03

Filesystem fails after force-run

Metadata and file blocks may come from different write generations.

04

Superblock lists an unavailable cache UUID

The relationship survives even when the cache cannot attach.

Protect the source

Actions that can make the situation worse.

01

Force-running can accept stale backing blocks

The filesystem may mount while recent metadata or file changes are missing.

02

Registering the wrong cache changes the evidence

UUID and cache-set identity must match the original relationship.

03

Filesystem repair can delete inconsistent objects

Repair tools may favor structural consistency over preserving files.

Do this now

Safe steps before evaluation.

01

Stop boot and mount retries

Prevent journal replay, fsck automation, and application writes.

02

Keep both devices

Do not discard an SSD merely because it was labeled cache.

03

Capture bcache metadata

Record UUIDs, modes, dirty-data counters, sysfs state, and kernel messages.

04

Image unstable media

Acquire the cache and backing device separately before assembly or repair.

NEPFOSYS process

How a data-first evaluation proceeds.

01

Cache-state assessment

NEPFOSYS determines mode, UUID relationships, and whether dirty data may exist.

02

Protected device acquisition

The cache and backing storage are preserved independently.

03

Generation-aware reconstruction

Candidate mappings and the upper filesystem are validated from working copies.

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.

Is a bcache SSD always disposable?

No. In writeback mode it may contain acknowledged writes that are not yet present on the backing disk.

Can I force-run the backing disk?

Only after preserving both devices and confirming the consequences; the kernel documentation warns that dirty-cache loss can cause major filesystem corruption.

Should I run fsck first?

No. Image the storage stack first because fsck writes changes and may remove damaged structures.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case