Ubuntu / Linux news and application reviews.

On most forums, websites and so on, when someone asks "do I need to defragment my Linux filesystems?", the answer is "no". But that's a common misconception and in some cases you do have to defragment your Linux filesystems. This is even confirmed by an Ubuntu developer on a very recent post I stumbled upon just a few minutes ago about ureadahead on the ubuntuforums.

I'm not sure if this common misconception is related or not, but there aren't many applications for defragmenting your Linux filesystems. In fact I could only find 2 and posted about them a while back (shake and defrag). Unfortunately defrag development stopped some time ago, but Phillip Susi rescued Defrag by creating a bzr branch in Launchpad and converting Defrag to a native Ubuntu package which you can access @ https://code.launchpad.net/~e2defrag/e2defrag/trunk

To help in saving Defrag, I've uploaded it to the WebUpd8 PPA (packages available for Karmic and Lucid).

You can either get the Defrag code from the bzr link above and create the .deb yourself or install it via the WebUpd8 PPA.

To add the WebUpd8 PPA and install defrag (Karmic and Lucid), paste this in a terminal:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update && sudo apt-get install defrag


Defrag will work on Ext, Ext2 and XFS Linux filesystems:

Mdefrag will reorganise data on a minix file system partition in order to improve the file system's performance. Edefrag is the equivalent program for the old extended file system. E2defrag in its turn is designed for the second extended file system (versions 0.3 onwards). And the xdefrag program will operate on Xia FS filesystems.

For how to use defrag, type this in a terminal:
man defrag


Attention: do not run Defrag without reading it's man page. Also, back up the data before using Defrag!

To find out if your partition are fragmented and a lot more info on defragmenting the Linux filesystems, see this post: Defragment Linux EXT3 Filesystems Using Shake And Defrag