Solved

Defragment an ext2 filesystem ?

Posted on 1997-04-28
8
455 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 100 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
database connection error mysql stops 7 82
hp laptop chargers 4 66
swp file in unix 16 42
SCCM Software updates 2 17
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Invest in your employees with these five simple steps to improve employee engagement and retention.
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

732 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