Disk defragmentation

Asked by Muhammad Umar Ibrahim on 2011-09-21

how to defragment linux partitions have no problem but was windows user just asking not found any built in software in ubuntu for Disk defragmentation ?i have formatted my drives to ext4
and which one is best bye the way there was ext2,3 and some others.what are advantages and disadvantages of ex4 and others?

Question information

English Edit question
Ubuntu gparted Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :

With Ext3 and Ext4 there is no need (nor will you benefit much at all) by defragging it. There is a defrag tool for Ext2. The journal in Ext3 and Ext4 means it doesn't need defragging as the files are intelligently managed. NTFS just shoves files where they fit and overtime the file become fragmented and need manually correctng. Linux file systems are designed for uptime and took care of this issue YEARS ago.

Ext3 is Ext2 with a journal. Ext4 has some cache and block managing features over Ext3 and makes it faster

Revision history for this message
delance (olivier-delance) said :

Ext4 use a mechanism called "extent" to gather many sectors in contiguous disk area. So you don't need to defragment while you use less than 90% of disk. Be aware, when Ubuntu report 90% of usage, it could be 90% of true disk size or 90% of lambda user disk capacity, which is itself 90% of full capacity.

Revision history for this message
Muhammad Umar Ibrahim (mumaribrahim) said :

Thanks actionparsnip, that solved my question.