On a mounted XFS filesystem, reorganize fragmented regular files one by one to improve extent placement.
Perform online reorganization rather than filesystem repair.
Which command is appropriate?
xfs_fsr reorganizes file extents online on XFS. It has a different purpose and operating state from xfs_repair.
Detailed explanation
xfs_fsr /mountpointCorrect. xfs_fsr /mountpoint performs online file reorganization on XFS.
Correct. xfs_fsr /mountpoint performs online file reorganization on XFS.
xfs_repair /mountpointIncorrect. xfs_repair checks and repairs filesystem metadata, normally while unmounted.
Incorrect. xfs_repair checks and repairs filesystem metadata, normally while unmounted.
e2fsck -D /mountpointIncorrect. e2fsck -D is for ext filesystems.
Incorrect. e2fsck -D is for ext filesystems.
tune2fs -O extent /mountpointIncorrect. tune2fs configures ext filesystems and does not reorganize XFS files.
Incorrect. tune2fs configures ext filesystems and does not reorganize XFS files.
Try it yourself
An example you can run in a temporary verification environment.
xfs_fsr -VExpected result
xfs_fsrのバージョン。再編成は行わないKey points
- XFS-specific tool
- Works online
- Different from repair
Notes
- Environment: xfsprogs 6.x公式仕様
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.