Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Defragment an ext2 filesystem ?

Posted on 1997-04-28
8
Medium Priority
?
472 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
Invest in your employees with these five simple steps to improve employee engagement and retention.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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…

618 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