For most servers, the right choice is simple: ext4 on Debian/Ubuntu, XFS on RHEL; Btrfs when you want snapshots. This guide is a decision-oriented comparison between ext4, XFS and Btrfs (with ZFS and specialised systems placed), to choose according to real use and not out of habit. For beginner to intermediate administrators. It also points out the 2026 traps: XFS does not shrink in production, Btrfs RAID 5/6 remains discouraged in production.
What you will learn
- Choose between ext4, XFS and Btrfs for your case
- The default file system of each distribution
- The real strengths and limits of each
- The traps to avoid (XFS shrink, Btrfs RAID 5/6)
Quick recommendation
Before the details, the decision by use case. When in doubt, follow your distribution's default: it is the system best tested on that platform.
| Your need | Recommended choice |
|---|---|
| File server, large volumes, parallel I/O | XFS |
| Database | XFS (or ext4) |
| Debian / Ubuntu root system | ext4 (default) |
| RHEL / AlmaLinux / Rocky root system | XFS (default) |
| Workstation with snapshots / rollback | Btrfs |
| Having to shrink a partition later | ext4 (XFS does not shrink) |
| USB key / multi-OS exchange disk | exFAT (or FAT32) |
| EFI system partition (ESP) | FAT32 (mandatory) |
| Software RAID with parity (5/6) | mdadm + ext4/XFS (not Btrfs RAID 5/6) |
The default file system of your distribution
Each family of distributions has made a default choice, and it is rarely by chance:
- Debian 13 and Ubuntu 24.04 install on ext4: the most proven, resizable both ways.
- RHEL 10, AlmaLinux and Rocky install on XFS: built for server workloads and large volumes.
- Fedora (since version 33) uses Btrfs on the desktop, for its snapshots; its server editions stay on XFS.
- openSUSE and SLES use Btrfs for the root (with
snappersnapshots and rollback) and XFS for data.
Following the default means benefiting from the best integrated and most tested system on your platform, and the one most expected in an LFCS or RHCSA exam.
ext4: the safe bet
ext4 (fourth extended filesystem) is Linux's most mature journaled file system. Its strength is its robustness and an asset XFS lacks: it resizes both ways with resize2fs (grow online, shrink unmounted).
- For: maturity, stability, small footprint, shrinking possible.
- Against: no native snapshots or compression, no data checksums (only metadata is protected by the journal). Size limits are wide but finite: files up to 16 TiB, file system up to 1 EiB.
- When: Debian/Ubuntu root system, general-purpose servers, VMs, any case where you want simplicity and the possibility to shrink a volume.
XFS: server performance
XFS is the default of the Red Hat family. Its architecture in allocation groups handles several writes in parallel, which excels on large files and concurrent access.
- For: high performance, scalability, online growth (
xfs_growfs), project quotas (limit per directory tree). - Against: no shrinking in production. An XFS volume is managed by growing only; to shrink it cleanly, you must back up, recreate smaller, restore. No native snapshots (relies on LVM).
- When: file servers, databases, large volumes, RHEL/AlmaLinux/Rocky root system.
Btrfs: snapshots and modern features
Btrfs (B-tree filesystem) brings features missing from ext4 and XFS, built on copy-on-write (CoW).
- For: atomic snapshots and subvolumes, transparent compression (zstd, lzo), data checksums (corruption detection),
send/receivefor incremental backups, built-in RAID 0/1/10, online shrinking (btrfs filesystem resize -300M /, measured on btrfs-progs 6.14). - Against: more complex; performance varies with the workload (very busy databases).
- When: workstations (Fedora/openSUSE default), system snapshots with
snapperor Timeshift, storage that wants compression and integrity.
ZFS and specialised systems
ZFS (through the OpenZFS project) offers end-to-end integrity, snapshots and disk pools (RAID-Z). But it is not in the Linux kernel: its CDDL licence is considered incompatible with the GPL, so it is installed as an external module (separate package, which Ubuntu even offers for the root). Powerful, but outside the scope of a standard system.
Special-purpose systems, in one line each:
- FAT32 / exFAT: multi-OS exchange (USB keys, SD cards); FAT32 is mandatory for the EFI partition (ESP), the UEFI firmware only reads that.
- F2FS: optimised for dedicated flash storage (mobile, embedded).
- tmpfs: file system in RAM, volatile, for
/tmpand/run. - OverlayFS: a stacking file system, the foundation of container images.
How to decide
Three questions are enough most of the time:
- Will I have to shrink this volume? If so, rule out XFS: ext4 shrinks unmounted with
resize2fs, Btrfs even online. - Do I need built-in snapshots or compression? If so, Btrfs.
- Otherwise: follow the distribution's default (ext4 on Debian/Ubuntu, XFS on RHEL). It is the safest and best supported choice.
For parity RAID or encryption, these features are handled below the file system, by mdadm and LUKS, independently of the choice above.
Key points
- When in doubt, follow the default: ext4 (Debian/Ubuntu), XFS (RHEL/AlmaLinux/Rocky).
- ext4 shrinks unmounted (
resize2fs), Btrfs online; pick one of the two if you plan to shrink. - XFS excels on large volumes and parallel I/O, but does not shrink in production (experimental shrinking limited to the last allocation group).
- Btrfs brings snapshots, compression and checksums; its RAID 5/6 remains discouraged (write hole).
- ZFS is outside the kernel (CDDL licence); FAT32 is mandatory for the EFI partition.
- bcachefs, ReiserFS and JFS are not deployment choices in 2026.
Knowledge check
Check that the essentials of this guide are acquired. The questions only cover what has just been explained here.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Result saved on this device. It will be sent to your account at the next sync. Sync now
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: Administer an ext4 file system
A new full quiz with random questions
Work again only on the questions you missed