LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-04-2002, 03:15 PM   #1
elmetald00d
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.2 and StingLin
Posts: 35

Rep: Reputation: 15
Defragmenting and Error checkin?


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

thx
 
Old 04-04-2002, 03:51 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
everyone asks it sooner or later. no really... *everyone*.

ext2 file systems do not require defragmentation. and use fsck to check a file system.
 
Old 04-04-2002, 05:17 PM   #3
glock19
Member
 
Registered: Aug 2001
Distribution: Debian Etch
Posts: 510

Rep: Reputation: 32
are there any requirements when running fsck on your mounted partitions (like "/" and "/boot")
 
Old 04-04-2002, 05:23 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you shouldn't check a mounted file system, you shuold drop down to runlevel 1 and unmount /usr or whatever.
 
Old 04-04-2002, 05:35 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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
 
Old 04-04-2002, 07:09 PM   #6
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
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
 
Old 04-04-2002, 08:54 PM   #7
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 31
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
 
Old 04-04-2002, 10:51 PM   #8
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dreamweaver style checkin/checkout file locking nouse66 Linux - Software 0 11-13-2005 01:39 PM
Finally took the plunge, this time w/out checkin the temperature bingodeville LinuxQuestions.org Member Intro 1 07-17-2004 02:42 PM
defragmenting ttilt Linux - Software 11 12-28-2003 08:34 AM
Defragmenting cucolin@ Linux - Software 2 11-25-2003 12:10 AM
defragmenting otaku9876 Linux - Software 4 09-24-2001 03:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration