From owner-freebsd-stable Sat Feb 26 21:51:30 2000 Delivered-To: freebsd-stable@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 6D89437B5C5 for ; Sat, 26 Feb 2000 21:51:26 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id WAA29585; Sat, 26 Feb 2000 22:47:37 -0700 (MST) (envelope-from ken) Date: Sat, 26 Feb 2000 22:47:37 -0700 From: "Kenneth D. Merry" To: Warner Losh Cc: Rahul Dhesi , freebsd-stable@FreeBSD.ORG Subject: Re: disk repair on SunOS Message-ID: <20000226224737.A29523@panzer.kdm.org> References: <20000226210121.A28630@panzer.kdm.org> <20000226235005.6973B3FF09@bolero.rahul.net> <20000226210121.A28630@panzer.kdm.org> <200002270530.WAA64001@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200002270530.WAA64001@harmony.village.org>; from imp@village.org on Sat, Feb 26, 2000 at 10:30:01PM -0700 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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