xfsprogs 7.2.1: make, repair, grow and check an XFS filesystem

Summary

The whole command line kit for XFS at 7.2.1: mkfs to lay a disk out, xfs_repair to fix it offline, xfs_growfs to grow it while mounted, xfs_scrub to check it in service, plus quota and metadata debugging tools.

Recommend
Name
XFS
Version
7.2.1
Pricing
Free
Open source
Open source
Operating system
Linux
Updated
2026-10-22 21:44

A filesystem stays out of sight until something goes wrong. xfsprogs 7.2.1 is the manual half of XFS in user space: lay a disk out, repair it, grow it, check it, one command per job.

One set of commands for the whole life of a filesystem

XFS is a journalling filesystem built for throughput, born on SGI's IRIX and rewritten as a fully threaded Linux implementation. Large files, large filesystems, extended attributes and variable block sizes all fall inside its range. Space is accounted for in extents, and directories, extents and free space are indexed with B trees, which is why it holds up under big directories and heavy concurrent metadata work. At mount time it accepts a long list of options: allocsize sets the preallocation granularity for delayed allocation and defaults to 64KiB, inode64 lets inodes land anywhere in the filesystem, logbsize sizes the log buffer. Those options live in the documentation; changing them means the command line.

xfsprogs is the user space kit around all that. In the 7.2.1 source package the man8 directory carries more than twenty separate commands, each responsible for one thing rather than one grand integrator.

Laying a disk out: mkfs.xfs rewards a second look

One mkfs.xfs and a device name produce a usable filesystem, and the defaults suit an ordinary disk. On a rack, the parameters have to follow the hardware. sunit and swidth describe the stripe unit and stripe width of a RAID so allocation groups line up on stripe boundaries; logdev points at an external log, rtdev at a realtime device; the number of allocation groups decides how much metadata work runs in parallel, and block size, inode size and log size each have a range. Anyone who would rather not retype these can fix them as defaults, and since 7.2.0 they can live in a configuration file instead of being typed every time.

After trouble: offline repair and online checking are two paths

When a disk misbehaves, the first step is telling the cases apart. fsck.xfs sits in boot scripts but is only a placeholder and checks nothing; real offline repair belongs to xfs_repair, which insists the filesystem is unmounted first. Online checking is the other path: xfs_scrub sweeps in stages while the filesystem stays mounted, fixing what it can on the way, naming the next step for what it cannot, and handing results onward through a system service when it finishes.

In the changelog for the 7.1 stretch most entries landed on xfs_scrub: corrections to the spacemap scan, repair estimates for realtime groups, space accounting for external logs, and the reporting rules for damaged ranges. Maturity in a tool tends to show up in exactly that kind of small entry.

Growing, quotas and the daily walk round

When space runs short, xfs_growfs takes up what the block device gained while the filesystem stays mounted, so the workload never stops. Quotas belong to xfs_quota, which covers users, groups and projects, and the projects.5 and projid.5 manual pages explain how project quotas are defined and inherited.

The small tools used on a daily round matter more often: xfs_info prints mount parameters and geometry, xfs_admin changes the label and UUID, xfs_bmap shows which extents a file occupies, xfs_fsr defragments, xfs_db reads the metadata structures directly, and xfs_metadump with xfs_mdrestore take a metadata image and put it back. xfs_io is an interactive shell whose dozens of subcommands cover reads and writes, attributes and space preallocation.

Version 7.2.1, and half a year of 7.x

7.2.1 is a repair release. mkfs can now switch the quota flags off, xfs_quota had a pointer bug in the state query fixed, xfs_scrub now shuts the system service down when an administrator unmounts, and xfs_io gained a field in the realtime group report.

Look back and 7.2.0 did more. mkfs accepts a configuration file for its defaults; xfs_admin, xfs_spaceman and xfs_db can all print the configuration of a mounted filesystem, so disk parameters finally have a copyable text form; mkfs raises the autofsck attribute earlier, and the warning about a small log is phrased in words a human can follow. Further back, 7.0.0 weighed most: xfs_healer arrived, a resident service that subscribes to health events and performs local repairs on demand, following a mount point that moves by way of statmount; xfs_io caught up with health event subscription and media verification; and mkfs now enables online repair by default when reverse references are fully on.

The edge of a command line tool

There is no graphical front end. Everything sits in a terminal, parameters are looked up in the manual, and scripts are chained in the shell. Growing only goes upward, since shrinking is outside its range; making a filesystem smaller means backing up, rebuilding and pouring the data back. Checking and repair are not magic either: metadata damage can be fixed, but a failing platter is still a platter to replace.

For people who maintain servers and storage year in and year out, the appeal is the granularity. Reading one field, clearing one quota, verifying one stretch of metadata, each has a command of its own that fits into a script and into a scheduled round. Ordinary users need never touch it, since the distribution already puts it under /usr/sbin when the system goes in.

xfsprogs 7.2.1 offers no single button. What it offers is a set of manual tools with clear edges: mkfs to lay out, xfs_repair to fix offline, xfs_growfs to grow online, xfs_scrub to check in service, and quota, metadata imaging and debugging beside them. With the configuration file and the background repair service filled in across the 7.x line, the kit has also become easier to drive from an automation script.

XFSDownload
Supported systems: Linux