[Q] Is this true and does it mean there is dynamic defragmentation in ext2/3?

Markus Peuhkuri puhuri at iki.fi
Tue Jun 21 05:07:50 UTC 2005

(by mistake only replied to Ted, sorry)
Theodore Ts'o wrote:

>Ext2/3 has advanced algorithms to make sure that the blocks that are
>allocated avoid fragmentation, but it is not doing any kind of dynamic
And there is a tool 'filefrag' in e2fsprogs that reports how fragmented
a particular file is.  If your disk grows full (over 90-95%, depending
on file sizes etc..) then it is more difficult to find continuous blocks
for files.  Now, if you delete files, then new files most probably are
non-fragmented but those files that were written when disk was full are
still fragmented.

You can "unfragment" those files just by copying them and deleting old
ones (if you have plenty of free space), but as Damian told, you must be
careful with locks and nfs handles.


More information about the Ext3-users mailing list