[Techtalk] bad blocks

R. Daneel Olivaw linuxchix at r-daneel.com
Sun Mar 27 20:16:44 EST 2005


Hi,

Hard drives develop bad blocks because of the physical way they are
built. Hard drives are disks with a layer of magnetic aware matter.
Writing a disk is exposing a piece of magnetic sensitive matter to an
electro mgnetic field. The matter then changes magnetic orientation.
Reading a disk is to apply a lower magnetic field and to "sense" the
magnetic orientation.
It occurrs, because of the small size, that some parts loose their
ability to store magnetic information. Therefore, some 'blocks' are bad,
after a number of read/write cycles.
This may be detected by filesystems, but it is not the purpose of the
filesystem (ie. the operating system's storage device access subsystem)
to check if the hardware is ok.
In the older times, SCSI disks had already enough intelligence to keep
track of bad blocks, and some of them used to be shipped with their 'bad
blocks list', given to the filehandler of your operating system so they
were marked as unusable on the filesystems.
Nowadays, E-IDE drives are so huge, that fatality is to get some bad
blocks. Hard drives are shipped with origianlly unused blocks, that are
not shown, and drives are able to re-allocate (your OS is unaware of
this) faulty blocks dynamically. For instance, the S.M.A.R.T. system
implemented in most BIOSes is a sytem that alerts the user that a disk
is becoming unusable, because all spare reallocation blocks have been
replaced. Your OS (linux also) knows how to read this alert.
The only way to detect bad blocks at the OS end, is to perform a
read/write test while formatting.
So, while you format an ext3 filesystem, you may ask for a bad blocks
check, but this means reading out the whole disk and may last several
hours. As the modern disks are smart enough, this often is not
necessary. IT may be useful on older hard drives, or if you have a
doubt.
Now, for hard disks, you need to know that they are shipped with a
certain mtbf : mean time between failures, this is an average value,
meaning that you may experience problems much sooner, or even not at all
during the drives lifetime. Also, heating and usage conditions (number
of spin ups/downs, storage stability, ...) may influence lifetime.

If you have faulty blocks, you may use all of the disk, perform an in
depth formatting, marking all blocks, but ... I would say that with
time, if your drive has more and more bad blocks, you should change it.
Hard drives are really cheap, and the time loss (worse : data loss)
really is worth the change. Once a disk starts being damaged, you will
loose sleep not being able to trust that hardware.

Well, as far as I am concerned, I would wipe that drive out and use a
newer, probably faster and smarter one.

Bye,

R. Daneel Olivaw,
THe Human Robot Inside.


Le Sat, 26 Mar 2005 20:20:33 -0600
ed orphan <millward at Ms.UManitoba.CA> a écrit:

> Can anyone tell me why a hard drive develops bad blocks?
> I read somewhere that a good file system will detect and
> isolate bad hard drive blocks so that they are not a problem.
> Is this true for the ext3 file system?
> And how many bad blocks can you expect before the
> hard drive is unstable?  I've got an 80 Gig hard drive with
> bad blocks on a 2 Gig partition. The drive is only two years
> old! I've had drives for 6 - 7 years that are still clean ( well,
> they do make a lot of noise these days ) and still work fine.
> 
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://linuxchix.org/cgi-bin/mailman/listinfo/techtalk


More information about the Techtalk mailing list