| 1 |
.\" -*- nroff -*- |
| 2 |
.TH E2FREEFRAG 8 "March 2025" "E2fsprogs version 1.47.4" |
| 3 |
.SH NAME |
| 4 |
e2freefrag \- report free space fragmentation information |
| 5 |
.SH SYNOPSIS |
| 6 |
.B e2freefrag |
| 7 |
[ |
| 8 |
.B \-c chunk_kb |
| 9 |
] |
| 10 |
[ |
| 11 |
.B \-h |
| 12 |
] |
| 13 |
.B filesys |
| 14 |
|
| 15 |
.SH DESCRIPTION |
| 16 |
.B e2freefrag |
| 17 |
is used to report free space fragmentation on ext2/3/4 file systems. |
| 18 |
.I filesys |
| 19 |
is the file system device name (e.g. |
| 20 |
.IR /dev/hdc1 ", " /dev/md0 ). |
| 21 |
The |
| 22 |
.B e2freefrag |
| 23 |
program will scan the block bitmap information to check how many free blocks |
| 24 |
are present as contiguous and aligned free space. The percentage of contiguous |
| 25 |
free blocks of size and of alignment |
| 26 |
.I chunk_kb |
| 27 |
is reported. It also displays the minimum/maximum/average free chunk size in |
| 28 |
the file system, along with a histogram of all free chunks. This information |
| 29 |
can be used to gauge the level of free space fragmentation in the file system. |
| 30 |
.SH OPTIONS |
| 31 |
.TP |
| 32 |
.BI \-c " chunk_kb" |
| 33 |
If a chunk size is specified, then |
| 34 |
.B e2freefrag |
| 35 |
will print how many free chunks of size |
| 36 |
.I chunk_kb |
| 37 |
are available in units of kilobytes (Kb). The chunk size must be a |
| 38 |
power of two and be larger than file system block size. |
| 39 |
.TP |
| 40 |
.B \-h |
| 41 |
Print the usage of the program. |
| 42 |
.SH EXAMPLE |
| 43 |
# e2freefrag /dev/vgroot/lvhome |
| 44 |
.br |
| 45 |
Device: /dev/vgroot/lvhome |
| 46 |
.br |
| 47 |
Blocksize: 4096 bytes |
| 48 |
.br |
| 49 |
Total blocks: 1504085 |
| 50 |
.br |
| 51 |
Free blocks: 292995 (19.5%) |
| 52 |
.br |
| 53 |
|
| 54 |
Min. free extent: 4 KB |
| 55 |
.br |
| 56 |
Max. free extent: 24008 KB |
| 57 |
.br |
| 58 |
Avg. free extent: 252 KB |
| 59 |
.br |
| 60 |
|
| 61 |
HISTOGRAM OF FREE EXTENT SIZES: |
| 62 |
.br |
| 63 |
Extent Size Range : Free extents Free Blocks Percent |
| 64 |
.br |
| 65 |
4K... 8K- : 704 704 0.2% |
| 66 |
.br |
| 67 |
8K... 16K- : 810 1979 0.7% |
| 68 |
.br |
| 69 |
16K... 32K- : 843 4467 1.5% |
| 70 |
.br |
| 71 |
32K... 64K- : 579 6263 2.1% |
| 72 |
.br |
| 73 |
64K... 128K- : 493 11067 3.8% |
| 74 |
.br |
| 75 |
128K... 256K- : 394 18097 6.2% |
| 76 |
.br |
| 77 |
256K... 512K- : 281 25477 8.7% |
| 78 |
.br |
| 79 |
512K... 1024K- : 253 44914 15.3% |
| 80 |
.br |
| 81 |
1M... 2M- : 143 51897 17.7% |
| 82 |
.br |
| 83 |
2M... 4M- : 73 50683 17.3% |
| 84 |
.br |
| 85 |
4M... 8M- : 37 52417 17.9% |
| 86 |
.br |
| 87 |
8M... 16M- : 7 19028 6.5% |
| 88 |
.br |
| 89 |
16M... 32M- : 1 6002 2.0% |
| 90 |
.SH AUTHOR |
| 91 |
This version of e2freefrag was written by Rupesh Thakare, and modified by |
| 92 |
Andreas Dilger <[email protected]>, and Kalpak Shah. |
| 93 |
.SH SEE ALSO |
| 94 |
.IR debugfs (8), |
| 95 |
.IR dumpe2fs (8), |
| 96 |
.IR e2fsck (8) |