Use Gparted to defrag your file system
If you have enough space on your hard drive, you can use GpartedGparted to defrag your file system (ext2, ext 4, nfts, etc.). You have to boot from a CD/DVD/USB boot disc because the drive you're working on has to be unmounted. You also have to have more unused space available than used space for this to work and it may take a while.
- Boot from a boot disc.
- Run gparted and shrink the partition that contains the data you want to defrag to just over the amount of your data.
- Make sure the partition you want to defrag is the last partition on the drive by moving it to the end (you may have to create another blank partition in front of it if there's only one partition on the drive).
With the partition you want to defrag as the last partition on the drive:
- grow the partition to the left of it to maximum size. This will move your partitions data to the end of the drive.
- Once it's done, shrink that partition back to it's previous size.
- If you created a blank partition to have more than one on the disc, you can now delete it.
- Move your partitions back into the original order and regrow the partition you wanted defragged back to it's full size.
It's now defragged.
And I know you're not interested in why/why not to defrag ubuntu, but I'll post the link to why-is-defragmentation-unnecessarywhy-is-defragmentation-unnecessary anyway.