Bad sectors: how bad can it be

Jerry McAllister jerrymc at msu.edu
Tue Oct 27 14:05:11 UTC 2009


On Tue, Oct 27, 2009 at 08:31:18AM +0100, Grünewald Michaël wrote:

> Dear list,
> 
> after an incorrect power-off of my FreeBSD system, it does not boot  
> any more, BTX stops even before showing the cute beastie menu.  
> Starting the machine by other means, I found that the hard-drive is  
> installed on has bad sectors. I am looking for advices on how to  
> recover from this, if possible.
> 
> Basically the question is: shall I discard my hard-drive with bad- 
> sectors, or can I continue using it?
> 
> The Linux system I use to diagnose this says:
> 
>   hdb: media error (bad sector): status=0x51 { DriveReady  
> SeekComplete Error }
>   hdb: media error (bad sector): error=0x30 { LastFailedSense=0x03 }
>   ...
>   Buffer I/O error on device hdb, logical block 1663200
> 
> etc.
> 
> Since I use computers (1992) these are my first bad sectors :) (on  
> hard drives, taking floppies into account is no fun!). I hence have  
> several questions:
>   -- is it possible to let these sectors?
>   -- to which extents a hard-drive with bad sectors is usable?
>   -- while the apparition of these bad sectors coincide with an  
> incorrect power-off, are the two events related? The machine suffered  
> plenty improper power-offs (or many), in the last years and did not  
> react so badly!

If a disk begins to have actual bad sectors - ones that cannot be
written and/or read then it is likely that the problem will progress
and soon the disk will be unusable.  All modern disk drives have built
in remapping of bad sectors and you will normally not see any error
messages until so many sectors go bad that it runs out of spare ones.
So, it should replaced.  

But your situation makes it just a little more difficult to make this 
broad generalization.  In this case, it might just be that the power 
outage came at a bad time and in a bad place so it caused a couple of 
essential sectors to be incorrectly written.  If it was in an inode or 
a superblock it could make it unusuable, but possible to recover, at 
least everything but the bad ones.  You can use an alternate superblock.   
This incorrect writing due to a power loss is actually not very likely, 
but could happen.  Anyway, in that case, if you could get what you need 
off the disk, you could then just reformat/renewfs it, load stuff back 
up and go back to using it.

So, study up on recovering data by using an alternate superblock
and see what you can find out.   If you rebuild it and it continues
to put out bad sector messages, then discard it.

Since disk is relatively cheap nowdays, it might be more worth your
time to just get another one and start over anyway.   Probably able
to get a much larger capacity disk that way too.

Good luck and have fun,

////jerry    

> -- 
> Thank you in advance for your advices,
> Michaël_______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 


More information about the freebsd-questions mailing list