Freedom251 › Disk Defragmentation Software
xfs_fsr
What xfs_fsr is
xfs_fsr is a free Linux utility in the xfsprogs project for reorganizing mounted XFS filesystems, improving file extent layout one file at a time. With no arguments, it chooses files with the highest extent counts and tries to defragment the top 10% during each pass. A standard run can continue for up to two hours; it records its stopping point so a later run can resume. You can target named filesystems or individual files, with one pass through each target.
The utility makes a copy of a file in a temporary location, then atomically switches the data extents of the original and copy. It needs enough free disk space to copy each target, and that space must be less fragmented than the original file. On systems with quotas, the file owner also needs enough remaining file-space quota. xfs_fsr skips files currently mapped in memory, files marked no-defrag, and filesystem entries that are not mounted read-write. The no-defrag flag can be changed with the chattr command in xfs_io. The manual says system partitions generally do not need this utility and warns that moving bootloader files can prevent a system from booting unless lilo is rerun before reboot. Bug reports are directed to the linux-xfs mailing list.
Who it suits
xfs_fsr suits Linux users who need to reorganize files on mounted XFS filesystems, either by letting it select files or by specifying targets. It is intended for systems where targets can be mounted read-write and there is enough less-fragmented free space and, when quotas apply, owner quota for file copies.
What it does well
- Free plan costs nothing.
- Works on mounted XFS filesystems one file at a time.
- Can target named filesystems or individual files.
- A run can resume from its recorded stopping point.
- Can set or clear the no-defrag flag through xfs_io.
What to know first
- Only applies to XFS filesystems.
- Requires read-write mounts and sufficient free disk space.
- Skips files currently mapped in memory.
- Quota systems require remaining file-space quota for the owner.
Limits
The free plan applies only to XFS filesystems. Processing requires enough free disk space to copy a target file, and quota-enabled systems also require sufficient remaining file-space quota for its owner; mapped files and targets not mounted read-write are skipped.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| xfs_fsr | Applies only to XFS filesystems | Free |
As xfs.org lists them, read 4 Oct 2026. The maker's own page has the final word.
Getting started
- Open the xfs.org project website.
- Use a Linux system with an XFS filesystem mounted read-write.
- Ensure enough less-fragmented free disk space is available to copy the target file.
- If quotas are enabled, ensure the file owner has enough remaining file-space quota.
- Run xfs_fsr without arguments for automatic selection, or specify filesystems or individual files.
Verdict
Choose xfs_fsr if you need a free Linux utility to reorganize mounted XFS filesystems and can meet its disk-space and mount requirements. Look elsewhere if you need a tool for filesystems other than XFS or need it to process files mapped in memory.
Questions
How much does xfs_fsr cost?
The listed plan is free and applies only to XFS filesystems.
Is there a free plan or trial?
It has a free plan. There is no free trial.
Which platform does it support?
Linux.
What does xfs_fsr do?
It reorganizes mounted XFS filesystems by improving file extent layout one file at a time.
What project is it part of, and where can I report bugs?
The manual identifies it as part of the xfsprogs project and directs bug reports to the linux-xfs mailing list.
What must be true for a file to be processed?
Its filesystem must be mounted read-write, it must not be mapped in memory or marked no-defrag, and there must be enough suitable free space to copy it. If quotas apply, the owner also needs sufficient remaining file-space quota.
Facts from xfs_fsr's own pages
- Access requirement
- The filesystem must be mounted read-write; entries without the rw option are skipped. · man7.org, 4 Oct 2026
- Disk space requirement
- Reorganization requires enough free disk space to copy the target file, with space less fragmented than the original file. · man7.org, 4 Oct 2026
- How it works
- It copies a file to a temporary location and atomically interchanges the data extents of the original and temporary files. · man7.org, 4 Oct 2026
- Mapped files
- It does not operate on files that are currently mapped in memory. · man7.org, 4 Oct 2026
- No-defrag flag
- Files marked no-defrag are skipped, and the flag can be set or cleared with xfs_io's chattr command. · man7.org, 4 Oct 2026
- Operational caution
- The manual says system partitions generally do not need xfs_fsr and cautions that moving bootloader files can make a system unbootable unless lilo is rerun before reboot. · man7.org, 4 Oct 2026
- Project and support
- The manual identifies xfs_fsr as part of the xfsprogs project and directs bug reports to the linux-xfs mailing list. · man7.org, 4 Oct 2026
- Purpose
- xfs_fsr reorganizes mounted XFS filesystems by improving the layout of file extents one file at a time. · man7.org, 4 Oct 2026
- Quota requirement
- On systems using quotas, the file owner must have enough remaining file space quota for the copy. · man7.org, 4 Oct 2026
- Selection
- With no arguments, it selects files with the largest numbers of extents and attempts to defragment the top 10% on each pass. · man7.org, 4 Oct 2026
- Targeting
- It can be run on named filesystems or individual files, making one pass through each specified target. · man7.org, 4 Oct 2026
- Time limit
- The default run lasts up to two hours and records where it stopped so it can resume later. · man7.org, 4 Oct 2026
Where xfs_fsr stands on Freedom251
- Disk Defragmentation Software#13 of 20