[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to handle the bad sectors on the hard disk?



On Wed, May 30, 2007 at 07:08:25AM -0600, Ninenineone Efx wrote:
> Programs freeze sometimes complaining i/o error, access failure on
> specific sectors.
> My hard disk begins to have bad sectors. It's 10-year old computer.
> 
> Is there any tools that make user/kernel programs stop writing data on
> bad sectors?
> 
> I feel like I gonna need a new system soon.

I think that it has been more than 10 years since hard drives started
automatically mapping bad blocks to spare blocks; when they start
showing bad blocks they've run out of spares.  Its probably time to find
a new hard drive.

That said, yes you can keep the filesystem from writing on bad blocks by
running a fsck on the filesysem while its unmounted, and select the
appropriate badblocks option.  Use the -f option to force a check even
though the filesystem is marked as clean.

For e2fsck its -c -c (to use a non-distructive read-write test)

Not all filesystems support badblocks (e.g. JFS) but rely on the hard
drive to handle them transparently (see above).

The hard drive and the computer are only related by a cable and some
screws.  If the computer does everything you need and is reliable, it
may only need a new hard drive.

Doug.



Reply to: