Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

Filesystem Repair

Direct answer

Repair tools reconcile filesystem metadata according to implementation-specific rules. Because repair may discard or rewrite metadata to regain structural consistency, it should follow evidence capture, backup/recovery evaluation and appropriate offline or maintenance-state requirements.

When to use this

Use it when configuring, checking or troubleshooting Filesystem Repair in Filesystems.

First 30 seconds

1. Repair unmounted (or read-only) filesystems.

2. Run dry-run first.

3. Back up or image the device before major repair.

4. Repairs can lose data (lost+found).

5. Find the cause (disk, RAM, power).

Operational verification

unmount → check → repair → verify

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

A repair tool reporting success shows it completed its consistency algorithm, but it does not show every user file, application transaction or underlying device is healthy.

Suspicious evidence: repair is run repeatedly while device errors continue, forced options are used without recovery copies, filesystem stays read-only, or tool success is accepted without data/workload verification.

Platform / version applicability
Storage architecture and operations
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.

PlatformStorage architecture and operations · Linux filesystem tools
Key commandfsck -n <device>
Scope / prerequisiteUse it when configuring, checking or troubleshooting Filesystem Repair in Filesystems.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Storage command reference

Primary Commands

Configuration and operational commands for this Topic.

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

symptom/error → evidence capture → lower-layer health check → recovery-point decision → filesystem check/repair → mount → data/application verification

Healthy evidence: lower storage is stable, repair runs in a supported state, consistency checks pass afterward, representative data is readable and the original workload plus recovery protection are verified.

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
  • Repair ≠ restore.
  • Repair success ≠ all file contents correct.
  • Filesystem error ≠ purely filesystem root cause.
  • Forced repair ≠ first troubleshooting step.
Key checks
  • fsck -n /dev/<dev> — dry run
  • xfs_repair -n /dev/<dev> — XFS dry run
  • chkdsk D: /f — Windows repair
ReferenceImportant terms & boundaries2 sections · depth on demand

Namespace and consistency

A repair tool reporting success shows it completed its consistency algorithm, but it does not show every user file, application transaction or underlying device is healthy.

In depth

Repair tools work offline (unmounted or read-only) and can lose data if run on failing hardware — image the disk first when the data matters.

FilesystemCheckRepair
ext4e2fsck -n /dev/Xe2fsck -fy /dev/X
XFSxfs_repair -n /dev/Xxfs_repair /dev/X (mount first to replay log)
Btrfsbtrfs check --readonly /dev/Xbtrfs scrub; --repair only on expert advice
NTFSchkdsk C: /scanchkdsk C: /f or Repair-Volume -OfflineScanAndFix
ZFSzpool scrubSelf-heals; restore files listed as permanent errors
ddrescue /dev/sdb /mnt/rescue/sdb.img /mnt/rescue/sdb.map    # image a failing disk first
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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 docStorage architecture and operations current

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

Basis: https://docs.kernel.org/filesystems/index.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
filesystem repairfs repairfilesystem recovery
Embedded reference data

Quick lookup tables

Filesystems → Filesystem Repair filesystem map

Fast namespace, metadata, capacity, attachment and verification boundaries for Filesystems → Filesystem Repair.

Filesystem boundaryWhat to verifyProof limit
Identity / attachmentFilesystem type, source/backing object, mount/attachment target and effective optionsPresence or mount state alone does not prove consistency or lower-layer health
Capacity / metadataData space, metadata/inodes, quotas/reservations and filesystem stateFree bytes at one layer do not prove allocation can succeed end to end
Failure boundaryA repair tool reporting success proves it completed its consistency algorithm; it does not prove every user file, application transaction or underlying device is healthy.Correlate filesystem evidence with the backing volume/path/backend before repair
AcceptanceHealthy evidence: lower storage is stable, repair runs in a supported state, consistency checks pass afterward, representative data is readable and the original workload plus recovery protection are verified.Close only after the original path/workload and read-back check succeeds
Confirmation

Confirm action

Continue?