Avoiding bad sectors?

Ruslan Ermilov ru at freebsd.org
Sun Aug 20 07:21:07 UTC 2006


On Sun, Aug 20, 2006 at 12:27:26PM +0930, Daniel O'Connor wrote:
> On Sunday 20 August 2006 06:43, Nik Clayton wrote:
> > I realise that I need to replace the disk.  However, while I'm waiting
> > until I can schedule the downtime, is there a short term solution I can
> > use to stop FreeBSD (I'm running current from a couple of months ago)
> > from trying to use this block?
> 
> Reboot into single user mode so swap is not being used and then try
> dd if=/dev/zero of=/dev/XXX bs=64k
> 
> (where XXX is your swapdev)
> 
> The disk should remap the sector, if it refuses to write to the sector because 
> it's out of remappable sectors then you could try splitting your swap into 2 
> partitions around the dead sector and then using them both (should be no 
> appreciable speed decrease)
> 
I can confirm using this technique.  You can also confirm with
smartctl(8) that it was indeed relocated (I assume your disk is
modern enough to support SMART).


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20060820/20d19de1/attachment.pgp


More information about the freebsd-current mailing list