LearnGlossary

What is XFS? The XFS filesystem in Linux

Updated 2 November 2026 · Published by Zoorik

XFS is a high-performance journaling filesystem for Linux that began on SGI’s IRIX platform. It is extent based, and supports large files and large filesystems.

How XFS lays out a disk

An XFS filesystem sits on a disk partition or a logical volume. It has up to three parts:

  • The data section holds file data and all the metadata, split into allocation groups (AGs). The number of AGs sets how much file and block allocation runs in parallel.
  • The log section is the journal. It records changes to metadata while the filesystem runs. After a crash, XFS reads it to finish the operations that were in progress.
  • The realtime section stores the data of realtime files. With the default mkfs.xfs options, there’s no realtime section, and the log sits inside the data section.
An XFS filesystem has up to three parts Illustration of one XFS filesystem, an outer box labelled XFS filesystem, on a disk partition or a logical volume, that holds three rows. The first row, Data section, reads file data and all metadata. It is a bar split into 4 equal violet boxes, AG0 to AG3, over the note allocation groups (AGs): more AGs, more allocation in parallel. The second row, Log section, reads the journal. Its amber box reads changes to metadata, over two notes: read after a crash, to finish what was in progress, and default mkfs.xfs: kept inside the data section. The third row, Realtime section, reads optional. Its dashed box reads data of realtime files, over the note default mkfs.xfs: none. An XFS filesystem has up to three parts XFS filesystem, on a disk partition or a logical volumeData sectionfile data and all metadataAG0AG1AG2AG3allocation groups (AGs): more AGs, more allocation in parallelLog sectionthe journalchanges to metadataread after a crash, to finish what was in progressdefault mkfs.xfs: kept inside the data sectionRealtime sectionoptionaldata of realtime filesdefault mkfs.xfs: none
Illustration: the number of allocation groups and the sizes of the parts are not measurements.

XFS tracks its directories, extents and free space in B-trees, for performance and scale.

XFS on Red Hat, Amazon Linux and Azure VMs

  • On Red Hat Enterprise Linux (RHEL) 9, XFS is the default filesystem. Red Hat supports it up to 1024 TiB, against 50 TiB for ext4.
  • Amazon Linux 2023 (AL2023) and Amazon Linux 2 both use XFS for the root filesystem.
  • On Azure, Microsoft’s steps for a standard marketplace Red Hat image grow its XFS root with xfs_growfs.

Red Hat advises XFS unless you have a specific use case for ext4, such as shrinking while unmounted. btrfs vs LVM compares XFS, ext4 and btrfs.

Why XFS matters for your cloud cost

XFS grows while mounted, but Red Hat says “XFS has no utility to reduce the size of a file system.” xfs_growfs can only trim the last allocation group, never remove one.

The cloud disk under it can’t shrink either. Azure charges a managed disk for its provisioned size and doesn’t support shrinking it. AWS says of Amazon Elastic Block Store (EBS) volumes: “You can’t decrease the volume size.”

So an XFS data disk keeps costing its full size after the data shrinks. AWS’s answer is a new, smaller volume and a copy with a tool such as rsync.

Amoeba makes that copy for you, once, XFS data mounts included. It moves the data disks of a virtual machine (VM) onto one btrfs pool sized to your data.

It grows the pool before it fills. When your data goes down and stays down, it shrinks the pool one disk at a time.

It works on Azure managed disks and Amazon EBS volumes, on Windows and Linux VMs. It never touches the OS disk or root volume. On Linux, the kernel must support btrfs.

Find your own number

One line in your cloud console. One PDF report with your estimated saving at list price.

Estimate your saving
Talk to the builders

Thirty minutes with the people who build Amoeba.

Book a demo (opens in a new tab)

Or write to founders@zoorik.com