Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 2006 13:09:34 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Marc van Woerkom <marc.vanwoerkom@FernUni-Hagen.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Dealing with bad blocks on a hard disc
Message-ID:  <20061218180934.GA19345@gizmo.acns.msu.edu>
In-Reply-To: <4586AE6D.3080704@fernuni-hagen.de>
References:  <4586AE6D.3080704@fernuni-hagen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

> Hi,
> 
> my notebook's hard drive seems to be damaged:
> 
> Dec 18 15:49:13 hokage kernel: ad0: FAILURE - READ_DMA 
> status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=9919567
> Dec 18 15:49:13 hokage kernel: 
> g_vfs_done():ad0s1f[READ(offset=1360723968, length=32768)]error = 5
> Dec 18 15:49:13 hokage kernel: vnode_pager_getpages: I/O read error
> Dec 18 15:49:13 hokage kernel: vm_fault: pager read error, pid 1048 (cvsup)
> Dec 18 15:49:17 hokage kernel: ad0: FAILURE - READ_DMA 
> status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=9919567
> Dec 18 15:49:17 hokage kernel: 
> g_vfs_done():ad0s1f[READ(offset=1360723968, length=32768)]error = 5
> Dec 18 15:49:17 hokage kernel: vnode_pager_getpages: I/O read error
> Dec 18 15:49:17 hokage kernel: vm_fault: pager read error, pid 1048 (cvsup)
> Dec 18 15:49:17 hokage kernel: pid 1048 (cvsup), uid 0: exited on signal 6
> 
> Is it possible to check the disc for bad blocks and to mark them as 
> unusable,
> thus allowing me continue using the hard drive?
> 
> Or what would you recommend?

My main recommendation is to get what you can off the disk and
replace it as soon as possible.   Disk failures are progressive.
When one shows up, more are quite sure to follow.

> Funny, I use FreeBSD about 10 years, this is the first time I have
> that problem and it seems not to be addressed in the handbook.

That is probably because it is not really an OS issue.  In modern disks
it happens at the hardware controller level.   Almost all disks nowdays
have spare sectors that the controller maps to automatically when it
detects a bad one.  You do not even see it happening.  Then when you 
finally see bad disk reads/writes reported, it is typically after the
controller has used up all of its spare sectors and can no longer do
any remapping.   It is an indication that there have been some failures
already and more are happening.

This issue has been covered numerous times in this list - usually about
every 4 to 6 weeks it comes up.  It is also covered in some FAQs somewhere,
maybe in some of the online magazines.   I haven't checked the handbook,
but it wouldn't hurt to have a mention there.

I think there may be some utilities out there that will allow you to
access the disk controller for such things, but I don't know them.
You might check with the disk manufacturer.   Some of them have disk
diagnostics, maintenance and recovery tools available.  But, you need
to assume that is only going to at best let you rescue some remaining
data after you have already moved to a new drive.

////jerry

> 
> Regards,
> Marc
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061218180934.GA19345>