Can't I get a /dev/one?

Rick Stevens rstevens at vitalstream.com
Thu Jul 15 20:11:56 UTC 2004


Benjamin J. Weiss wrote:
> On Thu, 15 Jul 2004, William M. Quarles wrote:
> 
>>James Wilkinson wrote:
>>
>>>You might not be aware of this:
>>>
>>>Modern hard disk drives keep a number of sectors spare. When a sector
>>>fails (or is failing), and the computer attempts to write to that sector,
>>>the hard drive will automatically use one of its spare sectors instead.
>>>Any further references to that sector will automatically be rerouted to
>>>the new, good location.
>>>
>>>This is all done internally by the drive: the OS typically never even
>>>sees this.
>>>
>>>It sounds like you've already written zeros to the entire drive. This
>>>would have replaced all the bad blocks already: you *shouldn't* see any
>>>bad blocks.
>>
>>I was partially aware of this.
>>
>>In M$ OSes, I've also seen disks get bad sectors detected on them, then 
>>when they are fully (or mediumly) reformatted, the bad sectors 
>>disappear.  Is this a necessary step to get the drive to make use of 
>>those spare sectors?
> 
> 
> I believe that this is what is called a "low level" format.  IIRC, it 
> formats all of the sectors, both good and bad and resets the flags.  Then 
> it reserves a bunch of sectors as spares.  Then it tests all of the 
> sectors to see if they'll hold the data properly.  If the software detects 
> a problem, it flags the bad sector and brings a spare into use, just as 
> James said.

I used to work for Micropolis and we made hard drives.  All hard drives
have bad sectors on them.  The maker reserves a bunch of good sectors to
be used as replacements and the first format tags the bad sectors and
modifies a remapping table on the drive which causes it to go to one of
the spares whenever one of the bad sectors is referenced.

As time goes on and other sectors go bad, a "low level" format finds
the new bad sectors and further modifies the remapping table to use more
of the spare sectors.  S.M.A.R.T. drives are supposed to be able to do
this on the fly.

Eventually, the drive will run out of spare sectors and you can't
successfully low level format it any more.  The manufacturer can wipe
the original remap table and go through it again, but by that time the
drive is usually well past its MTBF and it's somewhat silly to try to
push it any further.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-            The gene pool could use a little chlorine.              -
----------------------------------------------------------------------





More information about the fedora-list mailing list