Hard drives function in mysterious ways.
There are clever explanations out there in the A+ certification training programs, if you want to browse a bit.
I'll give you a version of my "clever" explanation in brief.
Hard Drive Disks are about the same size as CD/DVD's, just a little thicker/sturdier.
They are "organized" in concentric circles of electro-magnetic film.
The concentric circles are then further organized in wedge shapes much like cutting a pie, except the slices had already been sliced with the concentric circle routine.
Then the concentric, sliced wedge pieces are further organized through the process of Formatting, such that very small physical chunks of the hard drive are catagorized into Sectors and given address numbers, with a Table of Contents containing a listing of every last little sector on the disk. The Table of Contents (Master File Table) works just like a book's table of contents, or more specifically like the Index at the back of a reference book.
The above segmenting, organizing, formatting, addressing, and indexing, makes it possible for your computer to "know where to look" for any bit, byte, of information it needs at any one time.
One or more "wands" like a phonograph-needle-arm is/are capable of scanning from the larger outside circles, all the way down to the inner smaller circles as the disk itself spins. If you "visualize" that image, you will notice that the moving wand has access to the entire surface of the moving disk. The "wand" has a laser-light emitter, instead of a needle. The laser-light is capable of "noticing" only two conditions.... 1 or 0. Or put another way, something or nothing, or a reflection vs no reflection. The wand's laser-light emitter also has the ability to "polarize" the tiny bits contained in the sectors. The wand can only cause two conditions... polarized or not polarized. It does this by "distressing" the electromagnetcally sensitive film embedded deep inside of the plastic disk. Thus light on the wand both creates and reads the individual 1s and 0s that make up the wonderful Binary Number System with which computers store, read, write, and communicate.
Now it would be absolutely "too much to expect" to have an absolutely "bleamish-free" surface on a shiny disk organized in tiny "micron" measurements. Hey, the Disk is just two round slabs of plastic with something looking like plastic-film-tinfoil sandwiched in the middle. Gotta make some allowances for error, don't you think.
Now throw into the formula that these disks are spinning at the absolutely crazy rates of 4500rpm, 5400rpm, 7500rpm or 10,000rpm depending on what hard drive you own.
Now throw into the formula that the "wand" has to track back and forth accross the spinning disk in incredibly precise motion and has to be "calibrated" to "look" at "pinpoint size" locations mapped all over that rapidly spinning reflective surface.
Now throw into the formual that the laser-light emmitter/detector also has to know when to read and when to stop reading, when to write and when to stop writing, in order to get the precise information from the desired address and not be reading junk from some adjoining sector.
Now throw into the formula that Hard Drives get hot spinning so fast, and centrifical forces on the spinning plastic are enormous at those speeds, and distressing to the plastic.
Now throw into the formula that tiny electromagnetic charges representing the 1s and 0s are not terribly strong signals to detect. Think of trying to watch for a friend standing 200 yards away at night periodically turning on and off a flashlight, while you are sitting on a Merry-Go-Round horse as it spins at high speed. Do you think it would be easy to see and decode his message, if the message was being flashed to you in some version of Morse Code?
So let's take a moment to salute the manufacturer's of Hard Drives.
Well done, chaps!!!!
It's an absolute wonder that Hard Drives work at all.
Now Hard Drives are "mechanical". And anything mechanical begins to wear out. So the Hard Drive has to constantly be aware of it's sectors/clusters and organizational table, and speed and position, and physical wear on the disk, and electromagnetic "fatigue" of specific sectors of the electromagnetic film.
CHECKDISK Error-Checking is assigned the task of keeping everything "lined up" and varifying that the electromagnetic 1s and 0s are actually alligned in a way that allows the laser-light tipped wand to detect them competently. CHECKDSK doesn't actually do any "aligning" just checks to see if things are already lined up correctly.
CHECKDISK doesn't know what the patterns of 1s and 0s mean. It only knows that a specific sector has been addressed to display a pattern that can be only a specific size, in a specific "grove" in a specific segment of a wedge.
If CHECKDISK doesn't find the correct "size" of pattern, it makes another pass, and another, and another, until it "finds" all of the expected information. Or until it declares that it "cannot find" all of the expected information. If CHECKDISK "has trouble" detecting the expected information, it "assigns" a New Sector/cluster to be addressed to "hold" the expected information. Then it consults Master File Table, to match the exact information that should appear in the New Sector, and then modifies Master File Table to inform the machine where to find the information in the future. Finally, CHKDSK "marks" the bad-sector/cluster as bad, and records that address information into the Master File Table, so that the "bad-spot" will nevermore be used by the operating system or application programs.
CHECKDISK is a very "physical thing" in terms of location, (grove, wedge, sector, address, secotr/cluster), and in terms of spin and swing of the the wand.
But CHECKDISK is "ignorant" of the meaning of what it is caring for. Kinda like a sheep-dog is probably not aware that any particular animal is destined to eventually arrive at a mid-west slaughterhouse and then have parts of itself travel to a New York Restaurant for some couples anniversary dinner. The sheep dog just does its job of keeping things organized and protected.
Now as for MEANING, we move to System File Checker (SFC)
SFC expects that CHECKDISK has done its job of keeping things calibrated and organized.
SFC, then goes to each "file" that may be located in one or more Sectors.
SFC "Reads" the file and compares it to what is expected, such that the Operating System, or Application Program is actually "saying" and "saving" and "reading" what its supposed to say, save, read.
If SFC "reads" a file and it doesn't "say" exactly what is expected, SFC declares the "file" to be corrupt or missing. SFC then goes to a backup source (i386 or Installation CD or dllcache), to find a master-copy of the original file, and then Re-Writes the information (for meaning). into the location that it has been assigned.
CHKDSK and SFC are two of the "Best Friends" that a computer owner/user has, when it comes to keeping things straight on the machine, and restoring things in proper order if something goes haywire.
So to answer your question.......... Yes.
It was a good thing, that CHKDSK identified information in various Bad-Sectors/clusters, and moved or replicated the information into a New Good Sector/cluster.
When things start "wearing out" they are not found to be conforming to their exact "address" or "alignment parameter" Thus it becomes harder for the laser-light to distress or read the reflective surface. Every hard drive has its own criterion for "tolerance". If it doesn't get all the information on the first-pass, it may allow a second or third pass to complete the read. But at some point the Hard Drive says "enough", fix this or move it, so I can read it more easily without multiple passes.
Defragmenting is "good", but doesn't have anything to do with groves, wedges, sectors, clusters and other physical stuff.
Instead Defragmenting, just identifies items "that should go together".
For instance, when you download and save a Song........
Your hard drive will "save" it to the "first available empty address" until that address and adjacent addresses are filled. Then it may have to "skip" to another empty address to continue saving the rest of the song. A song can be "spread" over many groves, wedges, sectors, clusters, but since the MFT has the Table of Contents, it knows all the places to go to find the whole Song and allow it to be played back to you on your MediaPlayer.
Defragmenting identifies "files" that have been "spread" in this fashion, and then "finds" a better "single place" for the entire Song to be stored.... all in one piece so the Hard Drive doesn't have to work so hard reading and scanning and writing just to gather one file.
But there is "no guarantee" that the application and CPU/RAM will be "polite" when it is done with the information. In fact, it is downright "rude" and demands that the Hard Drive "save" the file to the first available place again, whether or not the place/places are all located close together.
So Files get Fragmented. It's just a fact of Hard Drive life.
That's why the "powers-that-be" gave us owner/users the magical Disk Defragmenter tool.
There certainly has been a tremendous amounts of brilliant thinking from thousands of individuals and hundreds of companies to make things work right on our machines. And of course, there are probably better ways to organize, preserve and work with data that will be discovered or created in the future.
It's just amazing to me, that computers work so well so much of the time!
Edited by dough, 16 March 2007 - 07:17 PM.