LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Defragmenting and Error checkin? (https://www.linuxquestions.org/questions/linux-general-1/defragmenting-and-error-checkin-17718/)

elmetald00d 04-04-2002 03:15 PM

Defragmenting and Error checkin?
 
Where can I do a defragment on my hd and a scandisk (sorry for reference)???
0

thx

acid_kewpie 04-04-2002 03:51 PM

everyone asks it sooner or later. no really... *everyone*.

ext2 file systems do not require defragmentation. and use fsck to check a file system.

glock19 04-04-2002 05:17 PM

are there any requirements when running fsck on your mounted partitions (like "/" and "/boot")

acid_kewpie 04-04-2002 05:23 PM

you shouldn't check a mounted file system, you shuold drop down to runlevel 1 and unmount /usr or whatever.

trickykid 04-04-2002 05:35 PM

yeah, you can run fsck on a mounted partition/file system, but you can lose data, ruin your parition...
acid responded with the correct and safe way to run fsck..

-trickykid

jeremy 04-04-2002 07:09 PM

I think that "ext2 does not get fragmented" is a common misconception. It *does* get fragmented. It just does not suffer the huge performance decrease that FAT file systems do, so most people do not bother. Someone (I think from SuSE) did write a defrag util from ext2, but in most cases you do not need it. I know ReiserFS plans to have a utility for this starting with v4.1 (which is quite a ways off).

--jeremy

Sixpax 04-04-2002 08:54 PM

Actually, most all UNIX type filesystems do a decent job of defragmenting on-the-fly so to speak. As opposed to windoze which pretty much writes randomly on the drive :D

jeremy 04-04-2002 10:51 PM

Good point, one that I forgot to mention. *NIX file systems do a much better job of writing files in contiguous blocks. The fragmentation comes in when the final size of a file is not known by the filesystem layer at write time making it impossible to allocate space in one contiguous block. Files such as logs and MySQL DB files are good examples of this.

--jeremy


All times are GMT -5. The time now is 05:17 PM.