From owner-freebsd-scsi Thu Sep 16 20: 9: 6 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from mail.HiWAAY.net (fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (Postfix) with ESMTP id B2C2314E69 for ; Thu, 16 Sep 1999 20:09:03 -0700 (PDT) (envelope-from kris@airnet.net) Received: from airnet.net (tc14-216-180-35-61.dialup.HiWAAY.net [216.180.35.61] (may be forged)) by mail.HiWAAY.net (8.9.1a/8.9.0) with ESMTP id WAA13078; Thu, 16 Sep 1999 22:07:59 -0500 (CDT) Message-ID: <37E1B079.27022011@airnet.net> Date: Thu, 16 Sep 1999 22:07:37 -0500 From: Kris Kirby Organization: Non Illegitemus Carborundum. X-Mailer: Mozilla 4.08 [en] (X11; U; FreeBSD 3.2-RELEASE i386) MIME-Version: 1.0 To: "Kenneth D. Merry" Cc: scsi@freebsd.org Subject: Re: Reformatting a 520-byte-per-sector drive References: <199909150229.UAA39212@panzer.kdm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Kenneth D. Merry wrote: > > Kris Kirby wrote... > > Kenneth D. Merry wrote: > > > > > > > # camcontrol cmd da1 -v -c "1A 0 3 0 c 0" -i 0xc "i1 i1 i1 i1 i1 i3 i1 i3" > > > > > 35 0 16 8 1 1052654 0 512 > > > > This spits out the appropriate answer. > > #root:orgy: {17} camcontrol cmd da0 -v -c "1A 0 3 0 c 0" -i 0xc "i1 i1 > > i1 i1 i1 i3 i1 i3" > > 35 0 16 8 0 1931265 0 520 > > Good. > > > > > > The last 3-byte integer is the block size. So, in theory, I suppose you > > > > > could change the blocksize by doing something like this: > > > > > > > # camcontrol cmd da1 -v -c "15 10 0 0 c 0" -o 0xc "b 0 0 8 0 0:i3 0 v:i3" 512 > > > > > [ of course you'd substitute "da3" for "da1" above ] > > > > This sets it properly, but when chased with a format, doesn't do > > anything. (Except format the drive. :-) > > Hmm...so the setting doesn't stick? > > > > > What would be the proper command to change the number of blocks? Docs > > > > say it needs both. > > > > > > Well, in that case, you'd do this I think: > > > > > > # camcontrol cmd da3 -v -c "15 10 0 0 c 0" -o 0xc "b 0 0 8 0 v:i3 0 v:i3" xxxx 512 > > > > > > Where the 'xxxx' is the number of 512 byte blocks. > > > > #root:orgy: {15} camcontrol cmd da0 -v -c "15 10 0 0 c 0" -o 0xc "b 0 0 > > 8 0 v:i3 0 v:i3" 1962030 512 > > camcontrol: error sending command > > (pass0:aha0:0:0:0): MODE SELECT(06). CDB: 15 10 0 0 c 0 > > (pass0:aha0:0:0:0): ILLEGAL REQUEST asc:26,0 > > (pass0:aha0:0:0:0): Invalid field in parameter list sks:80,0 > > Well, I neglected the fact that the length parameter in the mode page > header is reserved for mode select. The above error is pointing to the > first byte in the parameter list. So, try this instead: > > camcontrol cmd da0 -v -c "15 10 0 0 c 0" -o 0xc "0 0 0 8 0 v:i3 0 v:i3" 1962030 512 This latest incantation produces: #root:orgy: {7} fmt.sh Sep 16 22:03:05 orgy /kernel: (pass0:aha0:0:6:0): CCB 0xc04992e0 - timed out Sep 16 22:03:05 orgy /kernel: aha0: ahadone - Attempt to free non-active ACCB 0xbf89d000 camcontrol: error sending command CAM status is 0x14b #root:orgy: {8} Sep 16 22:03:05 orgy /kernel: aha0: ahadone - Attempt to free non-active ACCB 0xbf89d000 Sep 16 22:03:08 orgy /kernel: (pass0:aha0:0:6:0): CCB 0xc04992e0 - timed out Sep 16 22:03:05 orgy /kernel: aha0: ahadone - Attempt to free non-active ACCB 0xbf89d000 Sep 16 22:03:08 orgy /kernel: (pass0:aha0:0:6:0): CCB 0xc04992e0 - timed out Sep 16 22:03:08 orgy /kernel: aha0: No longer in timeout Usually the machine panics here (I think only when the id is 0). I've been disconnecting the drive to allow it to finish, without the machine. I'm using a AHA-1542B: aha0: AHA-1540/1542 64 head BIOS FW Rev. 1.1 (ID=41) SCSI Host Adapter, SCSI ID 7, 16 CCBs I've changed the drive's id to 6. And it _still_ thinks it has 520 byte sectors. :-/. Well, I've tried all that I can think of. I'm about to return the drives to the owner and let him deal with it. -- Kris Kirby ------------------------------------------- TGIFreeBSD... 'Nuff said. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message