$linuxjunkies
>

data=ordered

also: ordered mode, ext4 ordered journaling

A journaling mode for ext3/ext4 filesystems that ensures data is written to disk before its metadata is committed to the journal, preventing data corruption and loss after crashes.

data=ordered is a journaling mode that provides a balance between safety and performance. When enabled, the filesystem writes file data to disk before writing the corresponding metadata (like inode updates) to the journal. This ordering guarantees that if a crash occurs, you won't have metadata pointing to unwritten or stale data blocks.

For example, when you write to a file and the system crashes, data=ordered ensures the actual file content exists on disk before the filesystem records that the file was modified. This prevents a common data corruption scenario where metadata says a file is 1MB but only 512KB was actually written.

It's the default journaling mode for ext4 on most Linux distributions and can be explicitly set with mount options: mount -o data=ordered /dev/sda1 /mnt. Other modes like data=writeback (faster but riskier) and data=journal (safer but slower) offer different tradeoffs.

Related terms