ext4
Cheat sheet · https://pcornel.dk/topic.php?topic=3950
Answer
ext4 stores files using inode metadata and extent/block mappings. Journaling protects filesystem metadata consistency across crashes according to the selected data mode, but underlying storage errors or silent corruption remain separate concerns.
Remember
- Journal replay ≠ full data-integrity verification.
- ext4 inode availability ≠ free byte capacity.
- Mounted read-write ≠ media healthy.
- fsck ≠ routine online repair for a mounted production filesystem.
First checks
tune2fs -l /dev/<dev> | grep -E 'state|count|Last checked'— state and mountse2fsck -n /dev/<dev>— read-only check (unmounted)df -i— inode usage
Verify in this order
file → inode → extents → blocks
Where it usually breaks
First mismatch in media/provider → controller/pool → logical object → path/protocol → filesystem/share/object namespace → consumer workload; preserve identity/pre-state before mutation.
Filesystems → ext4 filesystem map
| Filesystem boundary | What to verify | Proof limit |
|---|---|---|
| Identity / attachment | Filesystem type, source/backing object, mount/attachment target and effective options | Presence or mount state alone does not prove consistency or lower-layer health |
| Capacity / metadata | Data space, metadata/inodes, quotas/reservations and filesystem state | Free bytes at one layer do not prove allocation can succeed end to end |
| Failure boundary | A mounted ext4 filesystem proves current access but does not prove every inode/data block or underlying device is error-free. | Correlate filesystem evidence with the backing volume/path/backend before repair |
| Acceptance | Healthy evidence: intended ext4 device is mounted with expected options, bytes and inodes are available, representative I/O works and kernel logs contain no correlated filesystem/device faults. | Close only after the original path/workload and read-back check succeeds |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3950