163 lines
3.8 KiB
HTML
163 lines
3.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of E4DEFRAG</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>E4DEFRAG</H1>
|
|
Section: Maintenance Commands (8)<BR>Updated: May 2009<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
e4defrag - online defragmenter for ext4 filesystem
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>e4defrag</B>
|
|
|
|
[
|
|
<B>-c</B>
|
|
|
|
]
|
|
[
|
|
<B>-v</B>
|
|
|
|
]
|
|
<I>target</I>
|
|
|
|
...
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>e4defrag</B>
|
|
|
|
reduces fragmentation of extent based file. The file targeted by
|
|
<B>e4defrag</B>
|
|
|
|
is created on ext4 filesystem made with "-O extent" option (see
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mke2fs">mke2fs</A></B>(8)).
|
|
|
|
The targeted file gets more contiguous blocks and improves the file access
|
|
speed.
|
|
<P>
|
|
|
|
<I>target</I>
|
|
|
|
is a regular file, a directory, or a device that is mounted as ext4 filesystem.
|
|
If
|
|
<I>target</I>
|
|
|
|
is a directory,
|
|
<B>e4defrag</B>
|
|
|
|
reduces fragmentation of all files in it. If
|
|
<I>target</I>
|
|
|
|
is a device,
|
|
<B>e4defrag</B>
|
|
|
|
gets the mount point of it and reduces fragmentation of all files in this mount
|
|
point.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-c</B>
|
|
|
|
<DD>
|
|
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
|
|
<B>e4defrag</B>
|
|
|
|
to
|
|
<I>target</I>.
|
|
|
|
When used with
|
|
<B>-v</B>
|
|
|
|
option, the current fragmentation count and the ideal fragmentation count are
|
|
printed for each file.
|
|
<DT id="2"><DD>
|
|
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).
|
|
<DT id="3"><DD>
|
|
If this option is specified,
|
|
<I>target</I>
|
|
|
|
is never defragmented.
|
|
<DT id="4"><B>-v</B>
|
|
|
|
<DD>
|
|
Print error messages and the fragmentation count before and after defrag for
|
|
each file.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<B>e4defrag</B>
|
|
|
|
does not support swap file, files in lost+found directory, and files allocated
|
|
in indirect blocks. When
|
|
<I>target</I>
|
|
|
|
is a device or a mount point,
|
|
<B>e4defrag</B>
|
|
|
|
doesn't defragment files in mount point of other device.
|
|
<P>
|
|
|
|
It is safe to run e4defrag on a file while it is actively in use by another
|
|
application. Since the contents of file blocks are copied using the
|
|
page cache, this can result in a performance slowdown to both e4defrag
|
|
and the application due to contention over the system's memory and disk
|
|
bandwidth.
|
|
<P>
|
|
|
|
If the file system's free space is fragmented, or if there is
|
|
insufficient free space available, e4defrag may not be able
|
|
to improve the file's fragmentation.
|
|
<P>
|
|
|
|
Non-privileged users can execute
|
|
<B>e4defrag</B>
|
|
|
|
to their own file, but the score is not printed if
|
|
<B>-c</B>
|
|
|
|
option is specified. Therefore, it is desirable to be executed by root user.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Written by Akira Fujita <<A HREF="mailto:a-fujita@rs.jp.nec.com">a-fujita@rs.jp.nec.com</A>> and Takashi Sato
|
|
<<A HREF="mailto:t-sato@yk.jp.nec.com">t-sato@yk.jp.nec.com</A>>.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mke2fs">mke2fs</A></B>(8),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+mount">mount</A></B>(8).
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="6"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="7"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="8"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="9"><A HREF="#lbAF">NOTES</A><DD>
|
|
<DT id="10"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
<DT id="11"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:12 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|