blob: 75e1bc9f57cc0318b4c843dcd472c246ca560f09 [file] [log] [blame]
Theodore Ts'o48364592009-07-09 14:29:12 -04001.TH E4DEFRAG 8 "May 2009" "e4defrag version 2.0"
2.SH NAME
3e4defrag \- online defragmenter for ext4 filesystem
4.SH SYNOPSIS
5.B e4defrag
6[
7.B \-c
8]
9[
10.B \-v
11]
12.I target
13\&...
14.SH DESCRIPTION
15.B e4defrag
16reduces fragmentation of extent based file. The file targeted by
17.B e4defrag
18is created on ext4 filesystem made with "-O extent" option (see
19.BR mke2fs (8)).
20The targeted file gets more contiguous blocks and improves the file access
21speed.
22.PP
23.I target
24is a regular file, a directory, or a device that is mounted as ext4 filesystem.
25If
26.I target
27is a directory,
28.B e4defrag
29reduces fragmentation of all files in it. If
30.I target
31is a device,
32.B e4defrag
33gets the mount point of it and reduces fragmentation of all files in this mount
34point.
35.SH OPTIONS
36.TP
37.B \-c
Kazuya Mio77e72e22010-12-13 09:59:07 -050038Get a current fragmentation count and an ideal fragmentation count, and
39calculate fragmentation score based on them. By seeing this score, we can
40determine whether we should execute
Theodore Ts'o48364592009-07-09 14:29:12 -040041.B e4defrag
42to
43.IR target .
44When used with
45.B \-v
Kazuya Mio77e72e22010-12-13 09:59:07 -050046option, the current fragmentation count and the ideal fragmentation count are
47printed for each file.
48.IP
49Also this option outputs the average data size in one extent. If you see it,
50you'll find the file has ideal extents or not. Note that the maximum extent
51size is 131072KB in ext4 filesystem (if block size is 4KB).
Theodore Ts'o48364592009-07-09 14:29:12 -040052.IP
53If this option is specified,
54.I target
55is never defragmented.
56.TP
57.B \-v
58Print error messages and the fragmentation count before and after defrag for
59each file.
60.SH NOTES
61.B e4defrag
62does not support swap file, files in lost+found directory, and files allocated
63in indirect blocks. When
64.I target
65is a device or a mount point,
66.B e4defrag
67doesn't defragment files in mount point of other device.
68.PP
69Non-privileged users can execute
70.B e4defrag
71to their own file, but the score is not printed if
72.B \-c
73option is specified. Therefore, it is desirable to be executed by root user.
74.SH AUTHOR
75Written by Akira Fujita <a-fujita@rs.jp.nec.com> and Takashi Sato
76<t-sato@yk.jp.nec.com>.
77.SH SEE ALSO
78.BR mke2fs (8),
79.BR mount (8).
80