IT lexicon › Infra & Ops › Journalling

Journalling

Infra & Ops På svenska → Updated: 2026-07-31

Writing down what you intend to do before doing it, so the filesystem can be repaired after a power cut.

Without a journal, an interruption mid-operation can leave metadata half-finished — a block marked used with no file owning it, or the reverse. Finding and fixing that requires scanning the whole filesystem, which on large disks took hours. The journal means you only have to read the most recent entries and either complete or undo them.

ext4 has three modes. data=ordered is the default and journals metadata only, but guarantees data is written before the metadata pointing at it. data=journal journals everything and is safer but noticeably slower. Copy-on-write filesystems such as ZFS and Btrfs solve the same problem differently: they never overwrite existing blocks, so the old state remains until the new one is complete.

← Back to the lexicon