A few questions...

Rashkae ubuntu at tigershaunt.com
Thu Apr 9 02:34:34 UTC 2009


Roy Smith wrote:
> Hi Everyone!  Being fairly new to Ubunto and Linux in general, I've got
> a few questions.  I've been using computers for a long time, started out
> with a C-64, then progressed to an Amiga, and for the past 11 years I've
> been using various versions of Windows.  Over the years I've gotten
> accustomed to having to do various maintenance tasks with the computer,
> such as checking the file system for errors, defragmenting the drives
> and so on.  I've found a few programs to do some of the things I'm
> accustomed to doing except I can't find where you would defragment the
> drives.  Is it necessary?
> 

Short answer, no, it's not necessary

Long answer: About all the Linux filesystems try very hard to avoid
fragmentation by writing files in areas of disk where there is large
contiguous space.  Fragmentation does happen, for various reasons, but
it defrags itself as files are written, over-written, copied, etc.
Unfortunately, there is no stand-alone on-line defrag utility (*), so if
you really want to do a good job of it, you have to do a backup/restore.
 It's very very rare that people do this for the purpose of defragging a
Linux filesystem however.


* Con Kolicas (I think I'm misspelling his last name, sorry,) a kernel
hacker from the days of yore, once wrote a file defrag utility for
Linux.  It was essentially a shell script that would copy each file to a
new file, check to make sure the original wasn't changed, then renamed
the new file to the correct file name.  This would take advantage of the
Linux filesystem built in allocation mechanism to defrag files.




More information about the ubuntu-users mailing list