Glossary

ext4

ext4 (fourth extended filesystem) is the long-standing default filesystem on most Linux distributions. A direct descendant of ext2 and ext3, it was merged into the kernel in 2008 and brought extents (contiguous block ranges instead of block lists), delayed allocation, journal checksums, subsecond timestamps, and online defragmentation. Its design goals were reliability, backwards compatibility, and steady improvement rather than radical innovation.

Typical usage:

sudo mkfs.ext4 /dev/sdb1                 # create
sudo tune2fs -l /dev/sdb1                # inspect parameters
sudo resize2fs /dev/sdb1                 # grow/shrink
sudo e2fsck -f /dev/sdb1                 # check
sudo fsck -y /dev/sdb1                   # fix non-interactively

ext4 uses a journal by default: metadata changes are written to the journal before the main filesystem, so a crash during a write leaves the filesystem in a recoverable state. This does not prevent data loss—only metadata corruption—but it eliminates the long fsck runs that plagued the pre-journalling era.

Compared with the more ambitious btrfs and zfs, ext4 lacks built-in snapshots, checksummed data, RAID, and transparent compression, but it is simpler, faster, and has the longest production track record of any Linux filesystem. For a root filesystem on a single disk, it remains a solid default.

Related terms: btrfs, xfs, Journaling

Also defined in: Textbook of Linux