?
Solved

Defragment an ext2 filesystem ?

Posted on 1997-04-28
8
Medium Priority
?
466 Views
Last Modified: 2013-11-15
I am currently running linux 2.0.27 with an ext2 filesystem.
When I check the system it reports that my filesystem is
10% fragmented. I have tried to compile defrag-0.6 but I get invalid pointer errors. So the question is: How do I defragment an ext2 filesystem ?
0
Comment
Question by:wilt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 

Accepted Solution

by:
garret050297 earned 200 total points
ID: 1626212
OK, a couple of possibilities here.

If you're running Slakware, make sure you've installed the whole of the 'd' set.

More likely, you haven't got full kernel source on your machine. Once you have, or if you have already, you need to compile a kernel yourself, which will create all the include files for you.

If you have done all of this already, and are using a recent version of gcc, and it still doesn't work, then get back to me.

--
garret
0
 

Author Comment

by:wilt
ID: 1626213
I have installed the full source code and compiled my own kernal. The information I have recieved from news groups says that there are no utilities for this purpose. It is a shame that such a fine operating system lacks the proper tools to do clean up work.
0
 
LVL 2

Expert Comment

by:jprohart
ID: 1626214
the fast way is to use defrag. You can also backup your files and then restore them. I compiled defrag (with many tries) but you cannot use it on mounted filesystems.
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 

Expert Comment

by:garret050297
ID: 1626215
defrag-0.6 isn't the latest version. Debian have a later version but it needs tweaking to run on non-debian systems. As soon as I get a running version of it I'll make it available.

(Don't blame me, I didn't change the file system specs...;)
0
 

Author Comment

by:wilt
ID: 1626216
Thank you for trying to help me garret. Since I asked the question I have upgraded my hard drive and in the process of installing slackware again. Your answer didn't solve the problem but you were very kind with your help. I hope you get the debian version working. Again THANK YOU!
0
 

Expert Comment

by:garret050297
ID: 1626217
No problem. There is now a version of defrag that compiles messily but does produce a working binary.

If you still need it it's at ftp://gulag.newhall.ml.org/pub/
and the file is called defrag-0_61-1.tar.gz
0
 

Expert Comment

by:garret050297
ID: 1626218
Sorry, one last thing. You'll need ncurses installed and you might need to change display.c to include curses.h instead of ncurses.h -- enjoy
0
 

Author Comment

by:wilt
ID: 1626219
Thanks for the information garret. I hope that this time the file system holds up a little better. The last check showed 2.2%. I will keep my fingers crossed. You have been very helpful. If you have any questions about PC hardware you can email me at cwilt@hotmail.com. I was a tech for several years. Thanks again!
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question