Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Feb 2000 22:47:37 -0700
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Warner Losh <imp@village.org>
Cc:        Rahul Dhesi <dhesi@rahul.net>, freebsd-stable@FreeBSD.ORG
Subject:   Re: disk repair on SunOS
Message-ID:  <20000226224737.A29523@panzer.kdm.org>
In-Reply-To: <200002270530.WAA64001@harmony.village.org>; from imp@village.org on Sat, Feb 26, 2000 at 10:30:01PM -0700
References:  <20000226210121.A28630@panzer.kdm.org> <20000226235005.6973B3FF09@bolero.rahul.net> <20000226210121.A28630@panzer.kdm.org> <200002270530.WAA64001@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 26, 2000 at 22:30:01 -0700, Warner Losh wrote:
> In message <20000226210121.A28630@panzer.kdm.org> "Kenneth D. Merry" writes:
> : First, make sure that read and write reallocation are turned on in mode
> : page 1.  Then you can issue a write(6) or write(10) command using
> : 'camcontrol cmd' with null data.  The drive will remap the block for you.
> 
> How is this different than 'dd of=/dev/rdaX if=/dev/zero oseek=XXX'?

It's more or less the same thing.  I like to do it with camcontrol, though,
so I can be sure I'm getting the right block. :)

I suppose that /dev/rdaX starts at the beginning of the drive, no matter
what your partition layout is?

In any case, using camcontrol usually isn't that hard, since you can often
use the same CDB that was printed out in the error message, and change the
read opcode to the corresponding 6, 10 or 12-byte write opcode.

> I've turned on read/write reallocation in page 1 in a drive I have
> here.  I did a dd for the entire drive, and I still have sectors I
> can't read.  After doing the remapping via the adaptech 19160
> controller for a few sectors, they read fine.  It looks like there are
> about 100 of bad sectors clustered 3 at a time every cylendar or so.
> It appears that the defect list of the drive was lost....

Maybe the drive didn't want to remap the sectors automatically for some
reason.

> : To find out the format of SCSI write commands, see the SCSI drafts at
> : www.t10.org.
> 
> I was afraid that you'd say that. :-)
> 
> I suppose this is the same thing that the test media function of a
> adaptech controller bios, no?

Test media?  You mean verify?  No.  When they're testing or verifying
media, they probably just try to read every block on the disk,

When they can't read a block, they then probably issue a reassign blocks
command for the sectors that they couldn't read.  That's probably what
SunOS is doing as well, I guess.

Ken
-- 
Kenneth Merry
ken@kdm.org


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?20000226224737.A29523>