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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-14-2003, 03:58 PM
|
#1
|
Member
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834
Rep:
|
Defrag in Linux?
Just curious ... is it possible to defrag a ext3 hdd in Linux?
|
|
|
03-14-2003, 04:18 PM
|
#2
|
LQ Newbie
Registered: Aug 2002
Location: Skåne
Distribution: *Bsd,Slackware
Posts: 27
Rep:
|
You don't have to.
|
|
|
03-14-2003, 04:21 PM
|
#3
|
Member
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834
Original Poster
Rep:
|
??
Is it automatic?
|
|
|
03-14-2003, 04:25 PM
|
#4
|
Member
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843
Rep:
|
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
|
|
|
03-14-2003, 09:36 PM
|
#5
|
Member
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834
Original Poster
Rep:
|
It doesn't fragment?? Niiiice ... Thanks for the great info.
|
|
|
03-14-2003, 09:52 PM
|
#6
|
Member
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843
Rep:
|
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'
|
|
|
03-14-2003, 10:10 PM
|
#7
|
Member
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464
Rep:
|
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? ;-)
|
|
|
03-15-2003, 02:32 AM
|
#8
|
Member
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 04:52 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|