Print

Print


On Jan 17, 2010, at 9:36 PM, "Bill Merriam" <[log in to unmask]> wrote:
>
> This is not a question so you can ignore it.

OK. But, ummm, ... ooh those paradoxes get me every time.

>
> I have read that IDE disk will reassign bad sectors to alternate
> locations only if there is an error during a write, so bad reads don't
> do you any good.  I have read the fix is to write /dev/zero to the  
> whole
> disk so write errors cause reassignment.

True, but a drive that has a significant number of errors will  
probably develop more at an accelerating rate. Unless it was killed by  
an unlucky random error you may not want to save it except as a  
temporary measure.

It is wise to run some sort of SMART monitor that reports drive status  
daily or weekly so you have a feel for the health of your drive(s).

>
>
> If there is an easier way to fix bad sectors I would be happy to hear
> about it.  This isn't actually hard for me but it takes many hours of
> the computers time.
>

Not so much a fix as a preventative: in the old days (on other *nixes)  
it was often recommended that you do something like

dd if=/dev/hda of=/dev/hda bs=128k

once a month or so. This would refresh every sector of the drive in an  
attempt to remap bad sectors while they are still soft errors instead  
of hard errors, and could be run in the background at low priority.  
Modern filesystems might optimize this out to doing nothing, though.  
If you try it and it is faster than writing all zeroes then it perhaps  
didn't do anything.

In a RAID system you could install a spare drive and once in a while  
remove an active drive from the array and replace it with the spare.  
The active drive becomes the new spare. If your array can rebuild  
itself quickly enough you could arrange for this to happen  
automatically when the system is at low load (overnight?). In RAID 1  
you could sync the spare into the array before removing the existing  
drive.

- Bob

Sent from my iPod