View Full Version : Defrag fragged my drive

11-18-2005, 06:25 AM
Did a defrag on my 80GB NTFS volume and immediately after....the whole thing died a horrible death. Over 5000 unreadable file segments...prob more but I hit the big X to shut the damn thing down because it made me sick.

What would cause this given that my drive seems ok now? A reformat fixed it. Why did I have to lose 65GB of precious precious precious (they were really precious) files?

Anyone else have probs with defrag? Never seen this happen before.

Weird too because I defragged C and it was ok. But D: was not readable and was causing major lockups. Windows shell does not respond to drive/file-system failures very well.

11-18-2005, 06:32 AM
I haven't done a defrag in years. I think it puts a lot of stress on the drive, for very little, if any, noticeable benefit.

11-18-2005, 07:19 AM
Well it stressed my drive to the max. Totally corrupted the file system. Thanks, Bill.

11-18-2005, 07:45 AM

Buy it, use it, love it. I used to not defrag, but after using this, I won't ever go back. You'd be surprised at the performance boost. Windows Defrag is a flaming piece of poo, by the way.

You can probably find a version of Diskkeeper Lite (free version) if you look around as well. It works just as good, but takes longer.

11-18-2005, 08:15 AM
Thanks, will look into it. Flaming piece of poo is right. Whoever wrote it for MS didn't get all of the bugs out of it. That's the only thing that could have brought my drive down. The last thing I did was build my editor source and e-mail it to one of the team members. Then I defragged, went to bed, got up, defragged, and then shut the system off. When I came home from work last night the system was slower than crap but my systray applets were still loading off D: Drive. Then out of nowhere it all went south and read failures left and right - missing MSVC shortuct, no DX 9.0 SDK and incorrect free space reporting. What a mess.

But it didn't crash because I deleted the partition (quite hesitantly I might add) after I realized all was lost and the patient was dying. Then I formatted and so far everything works fine. Had to be defrag.

11-18-2005, 08:30 AM
This reminds me of when I got up and found a blue screen on my machine and after restarting my machine wouldn't boot complaining of corrupted/missing SYSTEM file. So I had to format and everything was lost. My system has been running fine ever since and I never did find out what caused it.

11-18-2005, 09:57 AM
Do you have S.M.A.R.T. monitoring enabled, Bubba? Just to make sure that the drive's telemetry isn't on the way out. Depends on its age though, it's practically unheard of for a reasonably new drive to develop a fault.

Can't see how Defrag could be buggy, myself. It's job isn't really that complicated, unless of course M$ hasn't properly tested modern NTFS partitions with it. :rolleyes:

11-18-2005, 03:07 PM
isnt the WinXP defrag written by the same exact people who make diskeeper... ?

and by the by, Diskeeper has corrupted a many of my files... mostly pseudo-important windows files.... but yeah...
and it used to corrupt my friends filesystem ALL THE TIME.

O&O is much better...

11-18-2005, 03:34 PM
I use DIRMS, but the way I do it thrashes your disk even worse (although it does a MUCH better job of defragging).

I usually back things up before defragging... but then again I think it must have been almost a year since I last did either

/me shudders

11-18-2005, 04:00 PM
Flaming piece of poo is right. Whoever wrote it for MS didn't get all of the bugs out of it.
I totally agree. One question though? Why use Diskkeeper by Executive Software? They're the ones that made the MS defrag tool. Check the about box for it sometime. :D

11-18-2005, 07:07 PM
So maybe they purposely messed up the Win Defrag tool so that more people would switch to their product ;)

11-18-2005, 11:49 PM
We've uncovered a conspiracy.


EDIT: Good thing about uploading attachments....most of my sound code and most of my 3d engine has been posted here. So I d/l about half of my engine directly from this site.

Nice that the board saves your attachments. Thanks a million for helping me - albeit unknowingly.

I know I posted my MFC OnDraw function as well.
Perhaps if I look at my posts I can piece together some of what was lost in my drive disaster.

11-19-2005, 01:25 AM
Regular backups to CD or DVD might also be a good idea. Both the media and the drives have gotten cheap lately. ;)

11-19-2005, 02:14 AM
Websites are a good place to backup code too, if you have a site. I personally am using GMail right now as a backup for my code (via GMail FS). Just took my code, rar'ed it down to 20meg files and uploaded it.

11-19-2005, 09:42 AM
Wow, what ........ty luck Bubba.

I tried Nortons System Works, but always had troubles, even when just using their defrag software.
I defrag my nfts drives frequently just so it doesn't take all night to complete the task. I must admit I have never had any defrag. problems, other than leaving some files fragmented that is. Oh, and I also use PageDefrag by sysinternals.com in addition to Windows default defrag.

11-19-2005, 08:05 PM
Ok, ok, ok. I guess I might owe old Bill and apology here. Code some more last night and seems that I finally hit the bad sectors on the drive. Data read error's all over the place.
Guess the drive did in fact die.

But here is my problem. The old Scandisk utility used to scan the drive and produce somewhat helpful diagnostic information. The Windows XP Disk Management piece of poo does not. In fact when you have a problem is when Windows XP really shows some major oversights. Because they attempted to make the interface simpler, they really screwed those who actually understand what the heck is going on and how to fix it.

It won't scan the surface of the drive.
It won't fix bad sectors (it does, but requires a reboot because of dismounting the drive)
It won't fix bad clusters (or file segments)
It won't format a range of sectors.
It won't attempt to move the corrupted data from one sector (segment) to another.

These seem like glaring oversights. If I had known the drive did crash then I wouldn't have continued to use it. Why didn't format report that it could not format the whole drive?
Why does it still show 73 GB avail when format only formatted about 4GB?
It basically said that D: was not formatted when I tried to read my project file. Weird error.
It seems that format only formatted the segments/sectors that were ok and left the others unformatted. Very strange.

11-19-2005, 09:23 PM
When I have seen issues like this the HD has been 'delaminating'. Sectors go bad randomly, one after the other. Once it starts things just rapidly get worse.

Used to see it often with Win95A. Win95A would wear out the area it used as virtual memory when you had only 16Mb RAM.

One other thing to consider is a RAM chip on the way out. Is OK 99% of the time, until stressed, and is corrupting your data.

11-19-2005, 10:02 PM

Buy it, use it, love it. I have another solution, and it's free! It's called Linux:

11-20-2005, 03:20 PM
Just wanted to say I'm sorry you are having such a difficult time, I hope you didn't lose too much in terms of precious programming files (I know just how catastrophic it can be losing stuff like that).

11-20-2005, 06:47 PM
Well I lost everything because I didn't burn my recent stuff. But it's not all bad because some of the 'hacked in' portions of my code were really annoying me. Now I have a chance to fix those. I've also re-started the tile editor and it has a much better structure and is faster.

Starting over is not all bad I reckon.

I'm sure all of us have at one time or another looked at our code and thought......I really wish I could alter this design a bit after we have thought it through a bit. Well, now I have that chance w/o reworking all the code. The major problem with C++ is that if you change anything in a class be it a member variable name, function, algo, etc., it's ramifications reach much farther into your code than you ever expect. Before long it's not unreasonable to go from 0 errors to 100 errors. Even though we try to create re-usable code, sometimes it is good just to start over. Maybe this is why game companies often scrap a 3D engine to build a completely new one. It's like a book. It's never ever really finished, but what is there can always be polished up a bit.

11-21-2005, 03:09 PM
Way to make me scared to defrag my drive! :(

Now it's like a gamble. Do I want my HD to wear out from reading all my fragments or do I want to risk loosing data and having to reformat. Now that I have wirtten it out, I can't really understand how a defrag could do that.

11-22-2005, 12:18 AM
Well Windows defrag sucks anyways. Look how it arranges the files when its all done. Half in front, half in the middle, and half in the last portion of the drive. The old defrag did it all in front. Perhaps this is because of NTFS or perhaps it's because defrag sucks. You choose.

Defrag can hurt the drive because the stupid thing has to sit their and access ten million sectors,


1. Read source data into buffer.
2. Read dest data into buffer.
3. Write dest data at source
4. Write source data at dest.
5. Wash, rinse, repeat about 10 billion times.