Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2003 17:01:05 +0100 (CET)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: badblocks?
Message-ID:  <200302181601.h1IG15cf018906@lurza.secnetix.de>
In-Reply-To: <Pine.GSO.4.32.0302181555570.4977-100000@nippur.irb.hr>

next in thread | previous in thread | raw e-mail | index | archive | help
Mario Pranjic <mario.pranjic@irb.hr> wrote:
 > It seems that /usr partition has a bad blocks.
 > With what tool can I check/fix it?

The dust bin might be the right tool for it.  However ...

You could try overwriting the whole disk with dd.  This
will force the firmware to remap any bad sectors, if there
are any spare sectors left.  For SCSI disks, make sure that
reallocation-on-write is enabled (there's an example for it
in the camcontrol(8) manpage).  Something like this:

$ dd if=/dev/zero of=/dev/daX conv=noerror,sync

It will take a long time, and it will OVERWRITE the whole
contents of the disk.  You'll have to fdisk, disklabel,
newfs and restore your backup afterwards.

However, depending on the kind of defect, it might work or
not.  If there's a serious surface problem on the media,
loose abrasion/debris will cause further bad sectors.  If
that happens, there's no other way than to replace the
disk.

But if the defects were only small and didn't cause any
abrasion in the drive, the disk can very well run fine for
several years to come.

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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