LinuxQuestions.org
Visit Jeremy's Blog.
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 03-14-2003, 03:58 PM   #1
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Rep: Reputation: 30
Defrag in Linux?


Just curious ... is it possible to defrag a ext3 hdd in Linux?
 
Old 03-14-2003, 04:18 PM   #2
hegobald
LQ Newbie
 
Registered: Aug 2002
Location: Skåne
Distribution: *Bsd,Slackware
Posts: 27

Rep: Reputation: 4
You don't have to.
 
Old 03-14-2003, 04:21 PM   #3
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
??

Is it automatic?
 
Old 03-14-2003, 04:25 PM   #4
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
I have researched this before, and it usually isn't needed. As far as I have ever been able to research, Linux will only fragment if there is actually not enough physical space left on the partition contiguous that it has to split the file. Of course, unless it is a 2 gig file, you probably have other problems if you get that full. For very small partitions with lots of files, it can become fairly fragmented because a large number of files neccesarily need to be split and keep getting split. This is only with ext2. I haven't found a single instance of defrag on ext3

One way is to simply backup and restore the partition.
I ran Redhat 7.0 for 4 years (upgraded recently), and on power failures where fsck ran I always saw the same old 1.1% non contiguous.

You can always
fsck N
means run, but just state what you would do.

RO

references
http://www.extremetech.com/article2/0,3973,49641,00.asp
http://www.linux.org/docs/ldp/howto/...s-HOWTO-6.html
 
Old 03-14-2003, 09:36 PM   #5
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
It doesn't fragment?? Niiiice ... Thanks for the great info.
 
Old 03-14-2003, 09:52 PM   #6
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
Add to that, no Registry clutter, no lost files, no continual performance degradation. The performance you have today is EXACTLY what you will have 5 years from now with ZERO maintenance. (Of course, barring the changes/services you activate post today )

The only maintenance I ever do is backup all the program sources I download, backup my work to CD and test my firewall once in a while.

RO

On a side note, I think the performance degradation is an unexpected perk or possibly intentional with another type of OS. How many have heard, 'this computer is getting really slow, I guess time for a new one'
 
Old 03-14-2003, 10:10 PM   #7
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
This is off the top of my head, so I offer no guarantees on my information. Actually, my understanding is that the ext2 (& by extension, the ext3) filesystem actually fragments on purpose, but in a way that in efficient mechanically to read and that leaves appropriate free space for future files to also be written efficiently.

Moreover, contiguous files are not necessarily desirable on a multiuser/process operating system like linux. Say you have two files, both continguous in themselves, but on opposite sides of the platter. Say you are running two processes each accessing one of these files (but different). What is the poor disk to do?

The point is, it is not files themselves that must be contiguous, but rather a design for efficiency, so yes, "The performance you have today is EXACTLY what you will have 5 years from now with ZERO maintenance", (with many caveats, like, will my 7 year-old scsi disk last 5 more years? ;-)
 
Old 03-15-2003, 02:32 AM   #8
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Original Poster
Rep: Reputation: 30
Wow, that's great to hear! Windows systems just get all junked up like a 2-stroke weedwacker that's been sitting around in the shed flooded for 3 years.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
defrag on Linux ashley75 Linux - General 27 02-05-2009 04:21 PM
Defrag in Linux? fedivh Linux - General 4 02-09-2004 04:02 PM
How Can i Defrag Linux??? FearPasion710 Linux - General 9 10-29-2003 04:45 PM
Does Linux have defrag... kjp_72 Linux - Software 7 04-19-2003 12:57 PM
Defrag in Linux? glitch Linux - Newbie 2 09-02-2002 06:04 PM

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

All times are GMT -5. The time now is 04:52 AM.

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