From owner-freebsd-scsi Tue Sep 14 19:29:44 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id A731E1568D for ; Tue, 14 Sep 1999 19:29:16 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id UAA39212; Tue, 14 Sep 1999 20:29:11 -0600 (MDT) (envelope-from ken) Message-Id: <199909150229.UAA39212@panzer.kdm.org> Subject: Re: Reformatting a 520-byte-per-sector drive In-Reply-To: <37DEF81A.520E2D1B@airnet.net> from Kris Kirby at "Sep 14, 1999 08:36:26 pm" To: kris@airnet.net (Kris Kirby) Date: Tue, 14 Sep 1999 20:29:11 -0600 (MDT) Cc: scsi@freebsd.org From: "Kenneth D. Merry" X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 > > To figure out the number of blocks, you'll probably want to look at the > > current dmesg, and find the number of blocks. Then: > > I've got the IBM pages, which tell exactly how many blocks. > Good deal. Let me know whether this works. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message