Jesse Schokker·16 November 2026·Updated 21 November 2026
Btrfs vs ext4 vs XFS vs ZFS: Linux Server Filesystems Compared
Btrfs vs ext4 on a server is a choice about what Btrfs adds, first of all checksums on file data and snapshots. Put databases on XFS or ext4, which overwrite blocks in place. Put VM images and backup pools on ZFS mirrors or RAIDZ2 if the host can carry an out-of-tree kernel module. Use ext4 for a root volume, or Btrfs if you want to roll back a failed update. Keep Btrfs away from RAID5 and RAID6.
Dedicated servers
Order a dedicated server
- Stock configurations live in under a minute
- Full root
- Always-on DDoS mitigation
Versions and installer defaults are as of 20 November 2026, for Linux 7.3, OpenZFS 2.4.4, Fedora 45, openSUSE Leap 16.1, RHEL 10, Debian 13 and Ubuntu 26.04 LTS.
Loading...
Btrfs vs ext4 vs XFS vs ZFS by workload
Choose between Btrfs, ext4, XFS and ZFS by how the workload writes. Databases and VM images rewrite small pieces of large files all day; archives and backups are written once and read back months later, long after a drive could have silently corrupted a block.
| Workload | Pick | Pick something else when |
|---|---|---|
| Database (PostgreSQL, MySQL) | XFS or ext4 | You want checksums and snapshots under the data: ZFS, with recordsize tuned per engine (OpenZFS gives 16K for InnoDB data files and 32K with lz4 for PostgreSQL) |
| VM images | ZFS mirrors | The host runs only in-kernel filesystems: XFS, which clones an image with cp --reflink |
| Bulk storage and backups | ZFS RAIDZ2 | The pool has to stay in the mainline kernel: Btrfs RAID1 or RAID1C3 |
| Root volume | ext4 | You want to roll a failed update back: Btrfs with root snapshots |
| Container host | ext4 or XFS under Docker's overlay storage | The host already runs Btrfs or ZFS: Docker has a storage driver for each |
Docker's storage driver guide lists ext4, and XFS with ftype=1 (the mkfs.xfs default), as backing filesystems for overlay2, its classic driver; Engine 29.0 and later uses the containerd image store on fresh installs, with an overlayfs snapshotter by default.
Btrfs, ext4, XFS and ZFS feature comparison
ext4 and XFS overwrite in place and checksum only metadata; Btrfs and ZFS are copy-on-write with data checksums, snapshots, compression and built-in RAID, and ZFS is the only one of the four outside the mainline kernel.
| Feature | ext4 | XFS | Btrfs | ZFS (OpenZFS 2.4) |
|---|---|---|---|---|
| In the mainline kernel | Yes | Yes | Yes | No: CDDL-licensed, built as a separate module |
| Checksums | Metadata (CRC32c) | Metadata (CRC32c) | Data and metadata (CRC32c by default) | Data and metadata (fletcher4 by default) |
| Snapshots | No (LVM can) | No (LVM can) | Subvolume snapshots | Dataset and zvol snapshots |
| Reflink copies | No | Yes, on by default | Yes | Yes, as block cloning since 2.2 |
| Compression | No | No | zlib, lzo, zstd | lz4 (what on selects), zstd, gzip and others |
| Encryption | fscrypt per directory, or LUKS underneath | LUKS underneath | LUKS underneath | Native, per dataset |
| Built-in RAID | No, use mdadm | No, use mdadm | RAID0, 1, 1C3, 1C4, 10; RAID5 and RAID6 marked unstable | Mirrors, RAIDZ1 to RAIDZ3, dRAID |
| Grow | Online | Online | Online | Add vdevs; widen a RAIDZ vdev since 2.3 |
| Shrink | Offline only | Experimental, last allocation group only | Online | Remove mirror or single vdevs, never with RAIDZ in the pool |
| Installer default | Debian 13, Ubuntu 26.04 LTS | RHEL 10, AlmaLinux 10, Rocky Linux 10, Fedora 45 Server | Fedora 45 desktop editions, openSUSE Leap 16.1 and Tumbleweed | None; Ubuntu offers it in the desktop installer and as an autoinstall layout |
fscrypt is built into "ext4, F2FS, UBIFS, and CephFS" and no other filesystem here, which leaves XFS and Btrfs to encrypt the block device with LUKS. bcachefs has no column because Linux 6.18 removed it from the mainline kernel; it now ships as a DKMS module. The distributions themselves are compared in choosing a Linux distribution for a dedicated server.
Btrfs vs ext4
On a single-drive server, ext4 suits data that is rewritten in place and backed up elsewhere. Switch to Btrfs if you will use snapshots, btrfs send, compression or online shrinking, none of which ext4 has.
On a desktop or gaming PC, keep the filesystem the installer chose. The one reason to switch to Btrfs is a root snapshot to roll back to after an update breaks the system.
A data block that a drive returns corrupted, without reporting an error, reaches the application unnoticed on ext4 and fails verification on Btrfs. On one drive that is as far as Btrfs goes: mkfs.btrfs keeps one copy of data and two (DUP) of metadata on a single device, so only metadata has a second copy to repair from. Repairing data takes a second device and a RAID1 profile.
Copy-on-write fragments files that are rewritten in place; in the words of btrfs(5), "files tend to fragment as they are modified". chattr +C on a file or directory makes Btrfs overwrite in place instead, and btrfs(5) says what goes with it: "Nodatacow implies nodatasum, and disables compression." openSUSE's installer creates /var with copy-on-write turned off on Leap 16.1 and Tumbleweed, and new files inherit the attribute, so a database under /var/lib on a default openSUSE install runs with no Btrfs data checksums. On a Btrfs server, give a database its own filesystem or accept that its no-CoW directory has no checksums.
XFS vs ext4
If a volume may ever have to give space back, use ext4. XFS fits large volumes that will only grow and hosts that copy big files with reflinks, and on RHEL 10 Red Hat supports XFS file systems up to 1 PB against 50 TB for ext4 (Red Hat).
XFS splits a volume into allocation groups of 16 MiB to "just under 1 TiB" each, and mkfs.xfs(8) gives the reason: "More allocation groups imply that more parallelism can be achieved when allocating blocks and inodes." On XFS, cp --reflink copies a VM image by sharing its extents until one of the copies changes.
Shrinking goes the other way. resize2fs shrinks an unmounted ext4 filesystem and grows a mounted one. XFS grows only while mounted, and xfs_growfs(8) says "Only shrinking the last AG without removing it is implemented"; the xfsprogs source prints "EXPERIMENTAL try to shrink unused space" when asked for a smaller size. An XFS volume gives back at most the free space at the end of its last allocation group.
Btrfs vs ZFS
ZFS is the choice for parity RAID across four or more drives and for VM storage that you snapshot and replicate. Btrfs covers one or two drives, and any host where the filesystem must ship with the kernel.
Btrfs parity RAID is not ready, in its developers' words: btrfs(5) says RAID56 has "implementation and design deficiencies that make it unreliable for some corner cases and the feature should not be used in production, only for evaluation or testing", and it lists the write hole as open because "Write journal is not implemented". The status page for Linux 7.3 marks RAID56 "unstable". The rework that would close the hole, a RAID stripe-tree design that Johannes Thumshirn posted in June 2026 as a 15-patch RFC, is "not intended to be used" yet, and RAID6 in it is a placeholder (LWN). Use RAID1 or RAID1C3 instead: two or three full copies survive one or two failed devices.
Btrfs is the easier one to reshape. It grows and shrinks a mounted filesystem, removes a device if the rest satisfy the profile, converts between profiles with btrfs balance, and its RAID1 stores two copies on any two devices, so three drives work. ZFS removes a top-level vdev only if "the primary pool storage does not contain a top-level raidz or draid vdev" and every vdev has the same ashift (zpool-remove(8)). Since OpenZFS 2.3, released on 14 January 2025, zpool attach can add a disk to an existing RAIDZ vdev.
Snapshots on either sit on the same drives as the data, so they are not a backup; Proxmox backup strategies covers what is.
XFS vs ZFS
XFS is enough for a database on one NVMe drive or on an mdadm array. ZFS is worth its costs when several drives need checksummed redundancy, snapshots and replication from one tool, and the host can carry an out-of-tree module.
XFS is a filesystem. ZFS is a filesystem, volume manager and RAID layer in one, replacing the mdadm and LVM layers XFS would sit on and adding the data checksums they lack. It also costs two things XFS does not: its releases trail new kernels, and its ARC cache takes memory outside the page cache.
ZFS releases and kernel versions
OpenZFS 2.4.4, released on 21 August 2026, supports "4.18 - 7.2", five days after Linux 7.2 came out. Linux 7.3 followed on 18 October, and the backport of 7.3 support to OpenZFS 2.4.5 was still open on 20 November 2026, so no OpenZFS release then supported the newest stable kernel.
Ubuntu 26.04 ships kernel 7.0 with zfsutils-linux 2.4.1-1ubuntu5.1; Debian 13 ships 6.12 with zfs-dkms 2.3.9 in contrib, and 2.4.4 in trixie-backports. On a ZFS host, install a newer kernel only once the ZFS packages support it: a DKMS module that fails to build leaves that kernel booting without ZFS.
ZFS ARC memory use
With zfs_arc_max left at 0, OpenZFS 2.4 lets the ARC grow to the larger of all memory minus 1 GiB and five-eighths of it (zfs(4)), which on a 64 GiB server is 63 GiB. On a host that also runs VMs, or a database with its own buffer pool, set a ceiling (16 GiB here), which takes effect the next time the module loads:
echo "options zfs zfs_arc_max=17179869184" > /etc/modprobe.d/zfs.conf
XFS vs Btrfs
Databases, VM images and other large files rewritten in place belong on XFS, as does anything on a RHEL host. Of the four, Btrfs is the only filesystem in the mainline kernel with snapshots, compression and checksums on file data; choose it for those.
Red Hat settled the question for RHEL: Btrfs arrived in RHEL 6 and 7 as a Technology Preview, was deprecated in 6.6 and 7.4, and was "fully removed in Red Hat Enterprise Linux 8" (Red Hat). Since AlmaLinux 10.1, announced on 21 October 2025, AlmaLinux's installer can put the system on Btrfs, while XFS on LVM stays the default.
ZFS vs RAID: mdadm, RAIDZ and Btrfs RAID1 with a bad block
ZFS differs from mdadm RAID in what happens when a drive returns wrong data without an error: mdadm cannot tell which copy is right, and ZFS can, because it holds a checksum for every block. Btrfs RAID1 does the same.
| Layout | Notices a bad block by | What the application reads | What a scrub does |
|---|---|---|---|
| ext4 or XFS on mdadm RAID1 or RAID10 | A read error from the drive | Whichever copy md read | check counts mismatches; repair means "all but one block are overwritten with the content of that one block" |
| ext4 or XFS on mdadm RAID5 or RAID6 | A read error from the drive | The data block as read | repair writes new parity to match the data |
| ZFS mirror or RAIDZ | A checksum on every read | Data rebuilt from redundancy, with the drive's CKSUM counter raised | Reads every block and repairs from redundancy |
| Btrfs RAID1 or RAID1C3 | A checksum on every read | The good copy, and "the damaged copy is replaced by it" | Reads every copy and repairs bad ones |
A hardware RAID controller sits where mdadm does, and OpenZFS's hardware guide says "Hardware RAID controllers should not be used with ZFS", because it "will limit opportunities for ZFS to perform self healing on checksum failures".
md(4) counts mismatches in md/mismatch_cnt without saying which block it keeps. When ZFS repairs a block, zpool status reports "Applications are unaffected". When no good copy exists, the application gets EIO and the file appears under "Permanent errors have been detected in the following files". Btrfs auto-repair logs each repair. A Btrfs RAID1 with a missing device refuses to mount without -o degraded, so a root filesystem in that state stops the boot.
OpenZFS puts a RAIDZ group of N disks of size X with P parity disks at "approximately (N-P)*X bytes", which is what RAID 5 and RAID 6 hold, so the RAID calculator gives a first estimate. Small records do worse: on the RAIDZ page, a three-disk RAIDZ1 with ashift=12 and recordsize=4K stores data at 50%, "same as with double mirror". RAID levels for dedicated servers matches levels to workloads.
O_DIRECT on ext4, XFS, Btrfs and ZFS
O_DIRECT bypasses the page cache on ext4 and XFS, while Btrfs and ZFS honour it only in some cases:
| Filesystem | O_DIRECT writes and reads |
|---|---|
| ext4, XFS | Bypass the page cache |
| Btrfs with data checksums | From kernel 6.14, writes "fall back to buffered", which "will bring an observable performance penalty"; 7.3 bounces the buffer instead, reaching "95% of true zero-copy performance" (Checksumming). From 7.3, direct writes are never compressed. Reads of compressed data always go through the page cache (Compression) |
Btrfs with chattr +C | No data checksums, so writes go direct |
| ZFS 2.3 and later | Aligned requests bypass the ARC; a write must be recordsize-aligned, so 4 KiB writes into 16K or 128K records go through the ARC (zfsprops(7)) |
Dedicated servers at Serverside.com
Our dedicated server list shows each configuration's drives in its storage column, so you can check for NVMe before ordering. Stock configurations are live in under a minute. The deploy form offers RAID on supported Linux images and hardware. For a layout of your own, such as ZFS on root or Btrfs RAID1, boot the distribution's installer through virtual media, on hardware that supports virtual media, and partition by hand.
FAQ
Is Btrfs more reliable than ext4?
It detects more. Btrfs checksums file data as well as metadata, so a block that a drive corrupts without reporting an error fails verification on Btrfs, where ext4 would hand it to the application as good data. Detection turns into repair only when a RAID1 profile keeps a second copy to rebuild from.
Is Btrfs deprecated?
Not upstream. The Linux kernel's MAINTAINERS file lists Btrfs as "Maintained", with David Sterba of SUSE as its maintainer. Red Hat is the vendor that dropped it: deprecated in RHEL 7.4, removed in RHEL 8.
How much slower is Btrfs?
There is no single figure, because the gap depends on the write pattern. Copy-on-write costs most on small random overwrites inside large files, such as database tables and VM images, and least on files written once. To put a number on it for your own drive, run a 4 KiB random-write fio job and an fsync job against both, with Btrfs compression on and off and with copy-on-write turned off.
Dedicated servers
Order a dedicated server
Stock configurations are live in under a minute, with full root and always-on DDoS mitigation on AS55285.
- Stock configurations live in under a minute
- Full root
- Always-on DDoS mitigation
Written by
Co-founder & CTO, Serverside.com
Jesse is the co-founder and CTO of Serverside.com, where he leads the engineering behind the company's bare-metal cloud: from the ASN 55285 backbone to the core automation that drives day-to-day operation. He writes about dedicated servers, operating systems, and running production workloads on bare metal.
Keep reading
View all articlesEnjoyed this article?
Get new guides and engineering write-ups in your inbox. No spam, unsubscribe anytime.



