5

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 Answers1

5

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

RolandiXor
  • 51,541
  • How is this done? I am really more intrested on how Ubuntu handles this compared to windows. – Seth Hikari May 10 '11 at 01: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 '11 at 03:36