Why Rocky Linux Defaults to XFS and How to Manage It Safely
Rocky Linux uses XFS for its root filesystem because Allocation Groups and delayed allocation scale well under concurrent I/O. Learn how to verify, grow it online via LVM, and avoid the no-shrink trap.
09 Oct 2026, 08:15 UTC

If you install Rocky Linux with default partitioning, your root filesystem is XFS, not ext4. The practical takeaway: you get a filesystem built for large files and parallel I/O that can grow online while mounted — but it can never be shrunk. Plan capacity accordingly, and treat every expansion as one-way.
Why the installer picks XFS
XFS organizes the disk into Allocation Groups (AGs), semi-independent regions that each manage their own free space and inodes. Because metadata updates in different AGs don't contend for the same locks, many threads can create, extend, and delete files in parallel. On a busy database host or build server with dozens of concurrent writers, this is where XFS pulls ahead of ext4, which serializes more of its metadata work.
XFS also uses delayed allocation: when a process writes data, the kernel records the write in cache but postpones choosing actual disk blocks until the data is flushed. By then it knows the full size of the write and can place it in one contiguous extent, which reduces fragmentation and improves sequential throughput. Large files — VM images, backups, media, database tablespaces — benefit the most.
The trade-off: for workloads dominated by very small files with heavy metadata churn, ext4 can match or slightly beat XFS in some cases. For general enterprise use, Rocky Linux (like its RHEL upstream) judged the scalability wins to outweigh that edge case.
Verify what you're running
Run these as a regular user; read-only inspection needs no special privileges:
df -T /
xfs_info /df -T should show xfs as the type for /. xfs_info reports the block size (typically 4096 bytes), the AG count (agcount), and log settings. A higher AG count on a large volume is normal and healthy — it means more parallelism is available.
Worked example: growing root on LVM
The default Rocky Linux layout puts XFS on an LVM logical volume, which makes online expansion straightforward. Suppose you extended the virtual disk of a VM from 50 GB to 80 GB. As root (or via sudo):
# 1. Rescan the block device so the kernel sees the new size
lsblk
echo 1 > /sys/block/sda/device/rescan # adjust device name
# 2. Grow the physical volume and logical volume
pvresize /dev/sda3
lvextend -r -l +100%FREE /dev/rocky/rootThe -r flag on lvextend calls fsadm, which runs xfs_growfs for you. If you prefer to do it explicitly:
lvextend -l +100%FREE /dev/rocky/root
xfs_growfs /Note the argument to xfs_growfs is the mount point, not the device path. The filesystem must be mounted — running it against an unmounted volume fails. The grow completes in seconds with the system fully online.
Verify afterwards:
df -h /
xfs_info / | grep agcountThe available space should reflect the new size immediately, and the AG count will have increased if the grow crossed AG boundaries.
Limits and common mistakes
- No shrinking. XFS cannot be reduced in place. To make a volume smaller you must back up the data, recreate the filesystem at the smaller size, and restore. If you anticipate needing to reclaim space, allocate conservatively and grow as needed, or use thin-provisioned LVM volumes.
- Growing the wrong layer.
xfs_growfsonly expands the filesystem to fill the block device underneath it. If you haven't first grown the partition, LVM volume, or RAID array, there is nothing for it to grow into. - Assuming ext4 tools work.
resize2fs,e2fsck, andtune2fsdo not apply. The XFS equivalents arexfs_growfs,xfs_repair(run unmounted, typically from rescue media for the root filesystem), andxfs_admin. - Snapshot expectations. LVM snapshots of XFS volumes work, but XFS freezes/thaws the filesystem during snapshot creation (handled automatically by LVM). Snapshots are a short-term safety net, not a backup substitute.
When to choose something else
Stick with the XFS default for general servers, databases, and file services. Consider ext4 only for small volumes where you genuinely need shrink capability, and consider a separate XFS volume with mount options tuned for your workload (for example noatime to skip access-time updates) rather than replacing the root filesystem layout. Deviating from the default adds maintenance burden without measurable gain for most workloads.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.