Solved

Defragment an ext2 filesystem ?

Posted on 1997-04-28
8
444 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
  • 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
 

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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 10 4 43
Weird Samba Connectivity Issue... 7 17
Free software that handles employee timesheet 1 46
Centos 6 User Can't Assign Password 2 25
A list of useful business intelligence software.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now