devutils/ATFQ/book ATFQ git

Part I · How it works

9.4 ext4, XFS, btrfs or ZFS?

alsoext4xfswhich filesystemchoose filesystemf2fsbcachefsexfatfat32vfatntfsfilesystem comparison

TL;DR

  • ext4: the safe default (Debian, Ubuntu). Mature, fast, repairable.
  • XFS: big files and parallel workloads (RHEL's default). Can grow but never shrink.
  • btrfs: snapshots, compression, checksums (Fedora's and openSUSE's default). ZFS: the same ideas, for storage servers with many disks.
  • For a USB stick shared with Windows and macOS: exFAT.
lsblk -f                 # filesystem of each partition
findmnt -t ext4,xfs,btrfs

On your machine

alice@laptopexample
$ atfq 9.4
  /         btrfs on /dev/nvme0n1p2 · SSD mode
  /home     btrfs on /dev/nvme0n1p2 · SSD mode
  /var/lib/my data btrfs on /dev/nvme0n1p2 · SSD mode
  /boot/efi vfat on /dev/nvme0n1p1
  /media/usb exfat on /dev/sda
  /home     btrfs on /dev/nvme0n1p2

An example: Alice's laptop, one of the test machines. In your terminal, this block shows your own machine, read live.

Pitfalls

Deep dive 2 questions

Does the choice matter for speed?

For most desktops and servers, much less than the disk itself. The differences show at the edges: XFS with many threads writing large files, ext4 with lots of small metadata changes, btrfs slower on rewrite-heavy databases unless copy-on-write is off for them. Features and reliability are better reasons to choose.

What about f2fs and bcachefs?

f2fs is designed for flash and is common on Android phones. bcachefs aims to combine btrfs's features with ext4's reliability; it left the mainline kernel in 2025 and is now maintained as a separate module.

Commands
lsblk findmnt
Paths
/etc/fstab
See also
14. Disk
9.3 Copy-on-write filesystems: snapshots and checksums
9.2 Journaling: how a filesystem survives a crash