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.xfsoptions, there’s no realtime section, and the log sits inside the data section.
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.
Read next: Can you shrink an XFS filesystem?
Sources: The Linux Kernel documentation, “The SGI XFS Filesystem” (opens in a new tab); man7.org, “xfs(5) - Linux manual page” (opens in a new tab); man7.org, “xfs_growfs(8) - Linux manual page” (opens in a new tab); Red Hat, “Managing file systems” (opens in a new tab) (RHEL 9); AWS, “gp3 as default Amazon EBS volume type” (opens in a new tab) (Amazon Linux 2023 User Guide); Microsoft Learn, “Understand Azure Disk Storage billing” (opens in a new tab); Microsoft Learn, “Expand Virtual Hard Disks on a Linux VM” (opens in a new tab); AWS, “Modify an Amazon EBS volume using Elastic Volumes operations” (opens in a new tab).