Bad sector on drive ...

Marc G. Fournier scrappy at freebsd.org
Sat Feb 10 14:47:18 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



- --On Saturday, February 10, 2007 01:00:21 -0600 Dan Nelson 
<dnelson at allantgroup.com> wrote:

> In the last episode (Feb 10), Marc G. Fournier said:
>> Short of a reformat, any way of marking the following as bad? :(
>>
>> Feb 10 02:27:20 ganymede kernel: ad4: FAILURE - READ_DMA
>> status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=176887263 Feb 10
>> 02:27:25 ganymede kernel: ad4: TIMEOUT - READ_DMA retrying (1 retry  left)
>> LBA=176887324 Feb 10 02:27:30 ganymede kernel: ad4: TIMEOUT - READ_DMA
>> retrying (0 retries  left) LBA=176887324 Feb 10 02:27:35 ganymede kernel:
>> ad4: FAILURE - READ_DMA timed out LBA=176887324
>
> Try writing to the block causing the error, using dd and the seek=
> option; if the write succeeds, you're done (and the drive will have
> either reused the block or reassigned it to a spare). 176887324 If it doesn't
> succeed, copy what you can off the drive and toss it, since all its
> spares are used up.
>
> I think LBA numbers map directly to seek= values assuming you keep
> bs=512 and access /dev/ad4 .  I'd try reading the bad block with dd to
> verify it's the right one before doing a write, though.

'k, how do you use dd to write to a specific sector?

	dd of=/dev/ad4 seek=176887324 bs=512 if=/dev/null

- ----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email . scrappy at hub.org                              MSN . scrappy at hub.org
Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFzdr14QvfyHIvDvMRAtdXAKC4Fjjd7tn8tjtqyQzO10NlYYBXTACgmYaa
bTZ9nTHTrd6HzUJXWm1ND6I=
=YBMq
-----END PGP SIGNATURE-----



More information about the freebsd-questions mailing list