CertGrid CertGrid
Hands-on Lab·Linux Foundation Certified System Administrator

ext4, xfs, and choosing between them

Both distributions offer both filesystems and each family defaults to a different one, so a task may name either. This guide formats two partitions on the same device, measures what each filesystem consumed before anything was written, and covers the one asymmetry that decides real designs: xfs cannot be shrunk.

Storage Guide 31 of 38 Intermediate

xfs is the default on RHEL and ext4 on Debian and Ubuntu. Both families can create both - xfsprogs and e2fsprogs - though not always installed by default.

Both families. The RHEL transcript came first, during an outage that took both Ubuntu hosts offline; the whole sequence was run again on Ubuntu afterwards, and that second run is the last step of each page - it corrected something the first one had me believing.
Server NameIP AddressOSRolesCPURAMHDD
LFCS-A01192.168.0.70Ubuntu 26.04 LTSPrimary host - most guides run only here2 Core4 GB50 GB
LFCS-C01192.168.0.72AlmaLinux 10.2The other distribution - dnf, firewalld and NetworkManager2 Core4 GB50 GB

This guide includes

Use this when a task says to make a filesystem and does not say which. This matters because xfs cannot be shrunk at all - an asymmetry that should decide the choice long before performance does.

Before you start

  1. One device, two filesystems

  2. What each one cost before a file existed

  3. The differences you can see

  4. And the asymmetry that decides designs

  5. Both filesystems on Ubuntu, and the overhead again

Official sources