1E4DEFRAG(8) System Manager's Manual E4DEFRAG(8)
2
3
4
6 e4defrag - online defragmenter for ext4 filesystem
7
9 e4defrag [ -c ] [ -v ] target ...
10
12 e4defrag reduces fragmentation of extent based file. The file targeted
13 by e4defrag is created on ext4 filesystem made with "-O extent" option
14 (see mke2fs(8)). The targeted file gets more contiguous blocks and
15 improves the file access speed.
16
17 target is a regular file, a directory, or a device that is mounted as
18 ext4 filesystem. If target is a directory, e4defrag reduces fragmenta‐
19 tion of all files in it. If target is a device, e4defrag gets the mount
20 point of it and reduces fragmentation of all files in this mount point.
21
23 -c Get a current fragmentation count and an ideal fragmentation
24 count, and calculate fragmentation score based on them. By see‐
25 ing this score, we can determine whether we should execute
26 e4defrag to target. When used with -v option, the current frag‐
27 mentation count and the ideal fragmentation count are printed
28 for each file.
29
30 Also this option outputs the average data size in one extent. If
31 you see it, you'll find the file has ideal extents or not. Note
32 that the maximum extent size is 131072KB in ext4 filesystem (if
33 block size is 4KB).
34
35 If this option is specified, target is never defragmented.
36
37 -v Print error messages and the fragmentation count before and
38 after defrag for each file.
39
41 e4defrag does not support swap file, files in lost+found directory, and
42 files allocated in indirect blocks. When target is a device or a mount
43 point, e4defrag doesn't defragment files in mount point of other
44 device.
45
46 Non-privileged users can execute e4defrag to their own file, but the
47 score is not printed if -c option is specified. Therefore, it is desir‐
48 able to be executed by root user.
49
51 Written by Akira Fujita <a-fujita@rs.jp.nec.com> and Takashi Sato <t-
52 sato@yk.jp.nec.com>.
53
55 mke2fs(8), mount(8).
56
57
58
59
60e4defrag version 2.0 May 2009 E4DEFRAG(8)