Pcornel
Storage · Filesystems

Journaling

Cheat sheet · https://pcornel.dk/topic.php?topic=3959

Back to the Topic

Answer

A journal records intent or changed metadata before/alongside updates to primary filesystem structures. After an unclean shutdown, replay can restore structural consistency without scanning every block, depending on the filesystem and journal mode.

Remember

  • Journal ≠ backup.
  • Journal replay ≠ application transaction recovery.
  • Metadata consistency ≠ latest user data guaranteed durable.
  • Journaling ≠ checksumming.

First checks

  • tune2fs -l <dev> | grep -i journal — ext4 journal
  • dmesg | grep -i -e jbd2 -e journal — journal errors
  • mount | grep data= — ext4 data mode

Verify in this order

change → journal → commit → metadata

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 → Journaling filesystem map

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 boundarySuccessful journal replay proves the filesystem applied its recovery semantics; it does not prove application transactions, user-data freshness or underlying storage integrity.Correlate filesystem evidence with the backing volume/path/backend before repair
AcceptanceHealthy evidence: journal state is clean or replay completes normally, filesystem mounts as intended and post-recovery workload verification succeeds without recurring errors.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=3959

Confirmation

Confirm action

Continue?