Use it when a filesystem turns read-only, fsck runs at boot, or the kernel logs EXT4/XFS errors.
Filesystem Errors
Filesystem errors are corruption or I/O errors reported by the kernel; the filesystem may be remounted read-only to protect data.
1. dmesg -T | grep -iE 'error|ext4|xfs|I/O' — filesystem or disk errors?
2. smartctl -a /dev/<disk> — disk health.
3. Read-only? findmnt -no OPTIONS <mount>.
4. Unmount (or rescue mode) and run e2fsck -f / xfs_repair.
5. Replace a failing disk; restore from backup if needed.
disk or software fault → kernel detects inconsistency → remount read-only → fsck/repair
For Linux Troubleshooting → Filesystem Errors, continue with the first unproven Topic check: Capture exact device/mount, filesystem type/options, kernel errors and storage path evidence before repair. If that boundary is healthy, advance to the adjacent check: Determine whether the first failure is filesystem metadata, block I/O/path, capacity or unsafe shutdown. 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
Operational reference
Fast context before you go deeper.
journalctl -k -p warning --no-pagerPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
Healthy evidence: filesystem and underlying block evidence identify the first fault, supported repair or storage remediation completes, mounts remain stable and application read/write/integrity tests pass.
Step 2 Command read-back and what it shows Verify boundary
journalctl -k -p warning --no-pager is a bounded verification surface for Linux Troubleshooting → Filesystem Errors. A healthy result is no new aligned filesystem/I/O warning appears, the filesystem remains in the intended read-write state, and the original operation plus a read-back succeeds; a failed/degraded result is new I/O/journal/metadata warnings recur, the filesystem remounts read-only, or the original operation still fails. Re-run the original consumer/change criterion on the same scope and confirm an adjacent known-good path. journalctl -k -p warning --no-pager exposes kernel-level warnings and failures from the current boot; it does not by itself establish whether the filesystem, device, path or workload is root cause.
Step 3 Commands Verify boundary
dmesg -T | grep -iE 'ext4|xfs|I/O error'
xfs_repair -n /dev/vg0/data # unmounted, read-only check
e2fsck -n /dev/sdb1
Step 4 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Capture exact device/mount, filesystem type/options, kernel errors and storage path evidence before repair.
- Determine whether the first failure is filesystem metadata, block I/O/path, capacity or unsafe shutdown.
- Use filesystem-specific offline/online verification according to support rules and preserve backups/recovery options.
- After repair, remount/reboot as required and repeat reads/writes plus application integrity checks.
Step 5 Failure modes and next checks Narrow the fault
Suspicious evidence: fsck is run blindly on mounted filesystems, read-only is treated as chmod issue, underlying I/O errors are ignored, or a clean mount is accepted without workload verification.
Step 6 Observation-driven branch and next-check logic Narrow the fault
Freeze scope for Linux Troubleshooting → Filesystem Errors: target, original failing operation and incident time. Inspect journalctl -k -p warning --no-pager. Decision path: if kernel log shows I/O or device resets, investigate block/path/backend first; if log shows filesystem journal/metadata errors without transport errors, isolate filesystem consistency and mount state; if no aligned kernel evidence, reproduce the exact failing operation and inspect application/mount/options scope. Preserve first-failure evidence before any restart, repair, cleanup or redeploy.
Step 7 Common mistakes Narrow the fault
- Running repair on a mounted filesystem.
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.
Check the disk first (dmesg, smartctl -a). Run fsck (e2fsck, xfs_repair) only on an unmounted filesystem. Take a backup before repairing if possible.
journalctl -b -p err— errors this bootsystemctl --failed— failed unitsdf -h; df -i— space and inodesss -tulpn— listening socketsdmesg -T | tail— recent kernel messages
ReferenceWhat it is1 section · depth on demand
Core model
Preserve the failing device and mount state. Correlate kernel messages, filesystem-specific errors, read-only remounts and device I/O evidence; avoid online repair actions that can worsen corruption or erase forensic clues.
ReferenceHow it works1 section · depth on demand
How it works
Effective state in Linux Troubleshooting → Filesystem Errors spans filesystem driver/journal state, VFS mount mode, block-device error reporting and the underlying transport/device path that services metadata and data I/O. Filesystem code converts application I/O into metadata/data operations and may journal, replay, abort or remount read-only when lower-layer errors or metadata inconsistencies cross safety thresholds. Adjacent dependencies are device media, multipath/controller health, memory stability and workload-induced I/O saturation are separate potential causes behind the same filesystem symptom. This matters because a filesystem warning can be secondary to a failing block path, while an apparently clean mount command does not show metadata consistency or absence of intermittent I/O errors.
ReferenceImportant terms & boundaries4 sections · depth on demand
What this shows and what it does not
Filesystem Errors owns cross-layer filesystem fault isolation; Filesystems & Mounting, Storage/LVM and hardware/platform branches own specific repair procedures.
In depth
Look first, repair second
# journalctl -k | grep -E 'EXT4-fs error|XFS .* (Corruption|metadata I/O error)|I/O error'
EXT4-fs error (device dm-3): ext4_lookup:1855: inode #262401: comm nginx: deleted inode referenced: 262433
# umount /srv/app
# e2fsck -fn /dev/vg_data/lv_app # read-only check, answers "no" to everything
# e2fsck -fp /dev/vg_data/lv_app # automatic safe repairs
# echo $?
The e2fsck manual documents -n (read-only, answer no), -f (force a check even when clean), -p (automatic repair of safe problems; exit code 4 when manual action is needed) and the exit codes, which are summed:
| Exit code | Meaning |
|---|---|
| 0 | No errors |
| 1 | Errors corrected |
| 2 | Errors corrected, reboot required (root file system) |
| 4 | Errors left uncorrected |
| 8 | Operational error |
| 16 / 32 / 128 | Usage error / cancelled / shared library error |
Decide by error source
| Log message | Meaning | Action |
|---|---|---|
I/O error, dev sdb, sector … / blk_update_request | Storage is failing | Copy data off; check SMART/array — do not run repair repeatedly on a dying disk |
EXT4-fs error … deleted inode referenced | Metadata inconsistency | Unmount, e2fsck -f |
EXT4-fs … remounting filesystem read-only (errors=remount-ro) | Kernel protected the data | Plan downtime for fsck |
XFS … Corruption detected / metadata I/O error | XFS metadata | xfs_repair -n (dry run), then xfs_repair on the unmounted device |
XFS: Filesystem has a dirty log (xfs_repair refuses) | Unreplayed log | Mount once to replay; -L (zero log) only as last resort — loses recent changes |
Root file system
Repair from a rescue/live system or the initramfs emergency shell; e2fsck on a mounted read-write file system can corrupt it. For a forced check at next boot on ext4: tune2fs -C 100 /dev/... or kernel parameter fsck.mode=force.
After repair
Check lost+found for recovered files, run the application's own consistency checks, and confirm the underlying cause (power loss, storage error, kernel bug) so it does not recur.
*The EXT4 inode error and filesystem check commands are illustrative, not evidence of corruption on a real disk.*
How it works at runtime
Filesystem Errors is part of Linux Troubleshooting → Filesystem Errors. Filesystem Errors isolates mount/read-only, metadata, journal, I/O and corruption symptoms while distinguishing filesystem-level evidence from underlying block device, path or hardware failure.
Topic-specific state model. Filesystem Errors isolates mount/read-only, metadata, journal, I/O and corruption symptoms while distinguishing filesystem-level evidence from underlying block device, path or hardware failure.
Interpretation rule. - Filesystem error ≠ filesystem is the originating fault; storage I/O can be upstream.
- Mount succeeds ≠ metadata/data integrity is healthy.
- fsck reports clean ≠ application data semantics are correct.
- Read-only remount ≠ permissions problem.
Method
Filesystem errors:
dmesg -T | grep -iE 'EXT4-fs error|XFS.*(corrupt|shutdown)|I/O error|Buffer I/O'
journalctl -k -b -p err
smartctl -H /dev/sda; smartctl -a /dev/sda | grep -E 'Realloc|Pending|Uncorrect'
Sequence: check hardware first (SMART, RAID, multipath), stop writes (unmount or read-only), image the device if data is valuable, run fsck -n/xfs_repair -n read-only, then repair, then compare with backups. A filesystem remounted read-only (errors=remount-ro) is protecting itself — do not just remount it rw.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Filesystem Errors owns cross-layer filesystem fault isolation; Filesystems & Mounting, Storage/LVM and hardware/platform branches own specific repair procedures.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Troubleshooting → Filesystem Errors. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/ · confidence 94%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.
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.
Quick lookup tables
Filesystem Errors operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Filesystem Errors.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Filesystem Errors isolates mount/read-only, metadata, journal, I/O and corruption symptoms while distinguishing filesystem-level evidence from underlying block device, path or hardware failure. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin symptom + exact time + host/boot/user → define scope + expected baseline → preserve original failing test → collect targeted kernel/process/service/storage/network/security/log evidence → identify first divergent boundary → make one minimal reversible change → repeat original test → verify adjacent regressions and retain before/after evidence. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Filesystem Errors troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux troubleshooting evidence can establish this proof path: symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured host, boot, process/user, dependency, time or workload scope. Filesystem Errors troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: reproduce the exact original failure, collect the owning subsystem evidence at the same time, change only the proven cause or prerequisite, then repeat the original workload and regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
Filesystem Errors · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Filesystem Errors |
|---|---|
| Topic path | Linux Troubleshooting → Filesystem Errors |
| Runtime state | Filesystem Errors isolates mount/read-only, metadata, journal, I/O and corruption symptoms while distinguishing filesystem-level evidence from underlying block device, path or hardware failure. |
| Fast checks | - Capture exact device/mount, filesystem type/options, kernel errors and storage path evidence before repair. - Determine whether the first failure is filesystem metadata, block I/O/path, capacity or unsafe shutdown. - Use filesystem-specific offline/online verification according to support rules and preserve backups/recovery options. - After repair, remount/reboot as required and repeat reads/writes plus application integrity checks. |
| Verification chain | symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check 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 boundary | Filesystem Errors troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |