Section: Maintenance Commands (8)
Updated: May 2009
Return to Main Contents
e4defrag - online defragmenter for ext4 filesystem
reduces fragmentation of extent based file. The file targeted by
is created on ext4 filesystem made with "-O extent" option (see
The targeted file gets more contiguous blocks and improves the file access
is a regular file, a directory, or a device that is mounted as ext4 filesystem.
is a directory,
reduces fragmentation of all files in it. If
is a device,
gets the mount point of it and reduces fragmentation of all files in this mount
Get a current fragmentation count and an ideal fragmentation count, and
calculate fragmentation score based on them. By seeing this score, we can
determine whether we should execute
When used with
option, the current fragmentation count and the ideal fragmentation count are
printed for each file.
Also this option outputs the average data size in one extent. If you see it,
you'll find the file has ideal extents or not. Note that the maximum extent
size is 131072KB in ext4 filesystem (if block size is 4KB).
If this option is specified,
is never defragmented.
Print error messages and the fragmentation count before and after defrag for
does not support swap file, files in lost+found directory, and files allocated
in indirect blocks. When
is a device or a mount point,
doesn't defragment files in mount point of other device.
Non-privileged users can execute
to their own file, but the score is not printed if
option is specified. Therefore, it is desirable to be executed by root user.
Written by Akira Fujita <email@example.com> and Takashi Sato
- SEE ALSO
This document was created by
using the manual pages.
Time: 10:01:41 GMT, January 18, 2018