Possible Duplicate:
Why is defragmentation unnecessary?

This could be for any file system but EXT4 works.

Does Ubuntu need to be defragged like windows. Does it do this on its own.


1 Answer 1


Most Linux file systems avoid fragmentation to begin with*, so you don't need to defrag Ubuntu under normal circumstances.

*This is accomplished in the way files are written to the disk. Mostly files are written in such a manner that they remain contiguous, with some filesystems arranging the inodes to avoid fragmentation, and when it occurs, to keep it to a minimum. Even when files are modified a lot, moved around etc, the filesystem uses the same principles to avoid fragmentation.

See here: https://secure.wikimedia.org/wikipedia/en/wiki/File_system_fragmentation#Preventing_fragmentation

  • How is this done? I am really more intrested on how Ubuntu handles this compared to windows. May 10, 2011 at 1:35
  • Windows finds the 1st available space and uses it regardless of size. When the file being written overflows that continuous space it looks for the next available space and so on. A single file can be broken into many pieces. If you will it ignores the fragmentation problem and focuses on filling the physical contiguous disk space.
    – fragos
    May 10, 2011 at 3:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.