Linux - GeneralThis 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.
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.
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'
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? ;-)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.