Helping people with computers... one answer at a time.
File corruption happens most commonly when there's a hardware issue or bad sector on your hard drive. I'll look at implications and preventative steps.
How are files "corrupted" and why do they go "missing"? I had this happen recently and was told that it was not a virus that caused it: that it "Just happens". Whatever! Windows had to be re-loaded.
Yes, it does "just happen".
That should make you a little nervous, and perhaps motivate you to invest in that backup strategy you've been putting off.
The fact is, things occasionally break, and when they break the failure can be catastrophic - as in suddenly your machine won't turn on - or much more subtle, not showing up for weeks or months or sometimes never.
For the most part, I'm talking about the hard disk in your computer.
It's not uncommon for a hard disk to develop or even come with a bad sector - an area on the magnetic media that is somehow damaged. Think of it much like a scratch on an audio compact disc; sometimes it'll play the music just fine and you'll never notice, but then sometimes it'll skip or have a little distortion. In the worst case you might not be able to play the rest of that song or disc.
Bad sectors develop for a number of different reasons. The magnetic media may have come with a subtle flaw or a "thin spot" that simply wears out over time. The more common cause is likely motion - a drive getting moved around while its in use, and the read/write mechanism perhaps ever so slightly touching the magnetic material and scratching it. This is one of the reasons that the more rugged laptop drives are also somewhat slower: the mechanisms are often built more solidly with motion in mind so as to minimize the possibility of this type of thing happening. But regardless of these and other causes, it can and does happen.
And when it happens to data the result is corruption - data that used to be
The quick brown fox jumps over the lazy dog.
might suddenly become:
The quick br¿-tü?hïZ»O1E¦ê¦-çCa ¦f E??IG¦Gq+
Now, it's one thing if the text you're reading is suddenly garbled like that, but if that's your financial data, or one of your installed programs - or even Windows itself - you could be in a world of hurt.
In the simplest case you might never notice, because the bad sector is on some unused portion of your hard disk, or in part of a file you never or rarely use, or where the corruption is actually benign. You'd simply never see it.
In relatively benign cases you might get a "read error" or a "CRC error" as the operating system detects that some form of data corruption had occurred.
As you can see above, if it happens in a data document of yours, you might open that document to find its content scrambled.
In more complex document formats (Microsoft Office documents are a good example), the program might not be able to even open the document due to corruption somewhere within.
If the corruption happens within the file that contains a computer program (an EXE or DLL file), then the program might not run at all, might crash when you do run it, or it might crash at some point when you access a certain feature that uses the instructions that have been corrupted.
If the corruption happens within the file system information - perhaps the information about what files are stored on the disk - files can disappear.
If the corruption happens within the files that comprise Windows itself, Windows can crash or even fail to boot.
If the corruption happens within the master boot record, partition information or other key areas of the hard disk, the entire disk may suddenly appear unformatted or empty.
As you can see, problems resulting from even a single bad sector's worth of data corruption can range from benign to disastrous.
You'll sometimes have warning. CRC errors are common as a hard disk starts to go bad, as are sudden slowdowns as the operating system attempts to read and re-read areas of the disk that are having trouble.
But you won't always get a warning. You could just wake up one morning with a dead hard drive; it quite literally has happened to me.
The good news in all this is that it's not something that happens every day. Hard drives often run for years without a problem. But in a sense it's a game of Russian Roulette: your hard drive could also develop a failure tomorrow.
So, how do you prevent it?
The most common answer is simply that you cannot. You cannot prevent a hard drive from developing bad sectors or failing. It happens. The best you can do is prepare.
There are tools - most notably SpinRite - that can "condition" your hard drive by carefully writing and rewriting your data on the drive and in doing so repair or avoid known bad areas on the drive. That can delay, sometimes significantly, a drive having a problem.
But the real "solution" is simply to know that someday when you least expect it (and perhaps when it'll be most inconvenient) it will happen, and to prepare.
And that of course means having regular backups so that when, not if, a file becomes corrupt you can repair or replace the drive and restore that file or even the entire contents of the drive as needed.
Comments on this entry are closed.
If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.
If you don't find your answer, head out to http://askleo.com/ask to ask your question.