Is it really possible to reconfiger the usable space of HDD to..

hunted22

Distinguished
Dec 4, 2009
119
0
18,690
hi everyone..

I read sometime ago (and excuse me if this is not accurate) that if there is a 500GB hard drive, the media included is more than that.. that's because there have to be bed sectors on the media even in new drives, so the company include larger media (say 502GB of media), and then configure the actual usable part (say 498GB) around the bad parts, leaving behind these 4GB that include the bad parts of the media.

1. Does this have any truth to it?
2. if it does, is it possible if you got bad sectors on the hard drive, to re-reconfigure the usable space so that from now on, even if you reformat the drive, rescan it, your drive will not have bad parts(the usable part I mean)??

thanks in advance
 

John_VanKirk

Distinguished
Hello,

HDDs are engineered with additional sectors set aside, to be used by the drive in place of recognized "bad" sectors over time. They are marked by the drive electronics and you will not know they are present unless you use a Disk Diagnostic Program that can read the SMART parameters.

When you do a "full format" when installing a file system, all the sectors across the disk are checked, and any bad ones are marked as such. Over time, bad sectors are marked and any data stored there is moved to those reserved sectors.

It is used rarely if at all, but the cmd line Chkdsk does have a /b switch that clears all the marked bad sectors, and rescans again for bad ones, marking the ones it finds.
Hope that answers your question.
 

Paperdoc

Polypheme
Ambassador
Actually, there are two systems that do this kind of work and operate at different levels. Oddly, each is unaware of the other!

Your post is closest to what is done on the HDD unit itself. The HDD has, on its PC board, a microprocessor, some RAM, a small BIOS, EEPROM, etc - a tiny dedicated "computer" all its own. When it is manufactured and the process runs the final "Low-Level Format" (which no user can do, despite any stories you read), all the sectors created are tested thoroughly. All the ones needed for the unit's stated capacity are allocated for use. Any faulty sectors are noted and marked never to use. Any good sectors not needed now are noted and kept in an list of "good spares". All of this is on the HDD's board, and the outside world knows only how to get at and use the allocated good sectors.

During normal use, whenever a OS uses the drive, as each sector is accessed the HDD's board checks the quality of the signals read from that sector and judges whether they are OK. If there is any suspicion - as in weak signal - the board will try hard (and usually succeed) to get a good clean read of the data from that sector, then place a copy on one of the "Good Spare" sectors. Then it changes its internal records to substitute that good sector for the questionable one, marks the latter as not reliable, and puts it into the "never use these ones" list it keeps. NOTE that the board does not wait until it cannot read data from a sector - that would cause data loss. It tries to anticipate these weaknesses and get the data off and make the substitution BEFORE the data is unreadable. The outside world (the OS using the drive) never even knows about all this - all it knows is it got perfect performance from the HDD.

As it does this, the HDD's board also keeps track of how often these fixes are necessary. At some point, after all, it will run out of "good spare" sectors to do this. So, before that happens, it issues a warning through the SMART system that many bad sectors have been replaced, indicating that even more will continue to happen. The recommendation then is to BACK UP AND REPLACE that drive ASAP, before actual data loss does occur.

IF you are ready to wipe out all data (lose it) on a HDD, there is a way to force this self-correction process to re-process the entire drive. You can use a utility to "Zero Fill" a HDD. This forces it to write all zeros everywhere to every allocated sector it has. In doing that, the internal process also reads those newly-written sectors to check them, assessing the signals and replacing any sectors that appear weak. When it is finished, the HDD should have replaced ALL weak sectors, so there are NONE exposed to the outside world. After this is done, you have a truly empty HDD that must be Partitioned and Formatted before it can be used.

Completely separate from this, the Windows OS has tools that will write to and read from all the sectors on a HDD (that is, really, all the allocated sectors the HDD allows Windows to see), and make its own judgment whether each sector is good. Any it finds faulty it will note in its own table of "Bad Sectors", which it keeps as a data file on that same HDD. It will never try to use those sectors itself. Under normal circumstances, Windows will treat these sectors as permanently bad and never re-label them as good. However, that Bad Sector table is deleted and a new one created when a Full Format is done on a HDD, and also, as John_VanKirk says, when you use the special /b command-line switch with Chkdsk. So this is a second process under Windows' control, and it may from time to time catch errors the HDD's internal system has missed, usually because there has been no read operation on some sectors for a long time, so the HDD has not had an opportunity to check them itself.
 
A 500GB HDD will always have a guaranteed usable capacity of 500GB.

The P-list (primary defect list) is determined at the factory, while the G-list (grown defect list) develops over time. In modern drives, both lists of defects are written to a reserved System Area on the platters, not to the PCB.

There is some useful information in Hitachi's documents, eg ...

http://www.hgst.com/tech/techlib.nsf/techdocs/FFDF1FA949853DBD8825785A005CBC55/$file/DS5K3000_US5K3000_OEMSpecRev1.1.pdf

... and Quantum's, eg ...

http://www.noise.physx.u-szeged.hu/DigitalMeasurements/Interface/IDE/Fireball-ST-ATA_product_manual.pdf

See the "Defect flagging strategy" section on page 25 of Hitachi's manual, and the "Defect Management" discussion in section 5.5.4 of Quantum's manual. The latter also has an excellent discussion on error correction.
 

John_VanKirk

Distinguished
Great education from both of you! Thanks.

The Hitachi spec sheet is especially informative. I thought Hitachi was incorporated into the WD fold, and wonder if there is a similar spec sheet on the latest WD drives? If their bad and spare sectors are handled the same.

Also, is there any good informative paper on exactly what is stored in the EEPROM chip at low level calibrating by the manufacturer?