Linux.com

Re:Defragmenting?

Posted by: Anonymous Coward on October 10, 2003 09:24 PM
A common means of defragging is to copy the files to a new location, delete the original, and copy back. Chances are, the FS will attempt to allocate a continous area on the disk when you copy it back. The caveat is, you need to have a fair amount of free space available on the FS before you attempt to do this. If you do not have a lot of free space already, the fix for that is, copy large groups (directories, hint, hint) of files at one time, delete, then copy back.

** Make sure you preserve permissions and ownership when you do all this copying and moving! **

#

Return to Optimizing Linux filesystems