Whamcloud - gitweb
Disconnect e4defrag from build on non-Linux hosts.
[tools/e2fsprogs.git] / misc / e4defrag.8.in
1 .TH E4DEFRAG 8 "May 2009" "e4defrag version 2.0"
2 .SH NAME
3 e4defrag \- 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
16 reduces fragmentation of extent based file. The file targeted by
17 .B e4defrag
18 is created on ext4 filesystem made with "-O extent" option (see
19 .BR mke2fs (8)).
20 The targeted file gets more contiguous blocks and improves the file access
21 speed.
22 .PP
23 .I target
24 is a regular file, a directory, or a device that is mounted as ext4 filesystem.
25 If
26 .I target
27 is a directory,
28 .B e4defrag
29 reduces fragmentation of all files in it. If
30 .I target
31 is a device,
32 .B e4defrag
33 gets the mount point of it and reduces fragmentation of all files in this mount
34 point.
35 .SH OPTIONS
36 .TP
37 .B \-c
38 Get the fragmentation count and calculate fragmentation score based on it
39 before and after defrag. By seeing this score, we can determine whether we
40 should execute
41 .B e4defrag
42 to
43 .IR target .
44 When used with
45 .B \-v
46 option, the fragmentation count before and after defrag is printed for each
47 file.
48 .IP
49 If this option is specified,
50 .I target
51 is never defragmented.
52 .TP
53 .B \-v
54 Print error messages and the fragmentation count before and after defrag for
55 each file.
56 .SH NOTES
57 .B e4defrag
58 does not support swap file, files in lost+found directory, and files allocated
59 in indirect blocks. When
60 .I target
61 is a device or a mount point,
62 .B e4defrag
63 doesn't defragment files in mount point of other device.
64 .PP
65 Non-privileged users can execute
66 .B e4defrag
67 to their own file, but the score is not printed if
68 .B \-c
69 option is specified. Therefore, it is desirable to be executed by root user.
70 .SH AUTHOR
71 Written by Akira Fujita <a-fujita@rs.jp.nec.com> and Takashi Sato
72 <t-sato@yk.jp.nec.com>.
73 .SH SEE ALSO
74 .BR mke2fs (8),
75 .BR mount (8).
76