From owner-freebsd-scsi Thu Aug 21 07:26:49 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id HAA22967 for freebsd-scsi-outgoing; Thu, 21 Aug 1997 07:26:49 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA22962 for ; Thu, 21 Aug 1997 07:26:47 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id AAA13070; Fri, 22 Aug 1997 00:23:50 +1000 Date: Fri, 22 Aug 1997 00:23:50 +1000 From: Bruce Evans Message-Id: <199708211423.AAA13070@godzilla.zeta.org.au> To: andrew@zeta.org.au, freebsd-scsi@FreeBSD.ORG Subject: Re: newfs on Fujitsu R640 (2k sector media) Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >I have a Fujitsu M2513A magneto-optical disk drive, and I've >been using it quite happily with R230 media (230M, 512-byte >sectors) for a while, because I was not confident that my >pre-release 2.2 FreeBSD would support non-512-byte sectors. >I have since upgraded to 2.2.2, and bought myself some R640 >disks (640M, 2048-byte sectors), and lo: it doesn't work. I don't think it will work in any version of 2.2. (Only) -current has some hacks to support non-512-byte sectors. ># disklabel -e od0 >disklabel: ioctl DIOCGDINFO: Invalid argument > >Here's a question: where do I find a description of >DIOCGDINFO to figure out what this means? DIOCGDINFO just gets the in-core disk label. This is described with a moderate amount of detail in too many places (cd.4, matcd.4, mcd.4, od.4 and sd.4). It fails because there is no in-core disk label (drivers attempt to read the label using 512-byte sectors and this doesn't work for your disk). ># disklabel -r -w od0 R640 ># disklabel od0 >disklabel: ioctl DIOCGDINFO: Invalid argument ># disklabel -r od0 ># /dev/rod0c: >type: SCSI >disk: fuj640 >label: >flags: >bytes/sector: 2048 >sectors/track: 32 >tracks/cylinder: 64 >sectors/cylinder: 2048 >cylinders: 151 >sectors/unit: 310352 >rpm: 3600 >interleave: 1 >trackskew: 0 >cylinderskew: 0 >headswitch: 0 # milliseconds >track-to-track seek: 0 # milliseconds >drivedata: 0 > >3 partitions: ># size offset fstype [fsize bsize bps/cpg] > a: 310352 0 4.2BSD 2048 16384 0 # (Cyl. 0 - 151*) > c: 310352 0 unused 0 0 # (Cyl. 0 - 151*) > > >OK, that looks like it worked, but then: `disklabel -r ...' works because it bypasses the in-core label and writes 8K at a time. ># newfs od0a >newfs: /dev/rod0a: Invalid argument Newfs fails because it uses the in-core label. ># newfs od0c >newfs: ioctl (GDINFO): Invalid argument >newfs: /dev/rod0c: can't read disk label; disk type must be specified > ># newfs -T R640 od0c >write error: 310351. Tried 2048, wrote -1. >wtfs: Invalid argument Something like this might work for the 'c' partition only, because the 'c' partition can be accessed when there is no label (it has to be accessible so that the label can be written). The above error is probably caused by the last 3/4 of the disk not being accessible because the bounds checking routine assumes that sectors have size 512. Try using fake 512-byte sectors (`se#512', and sector counts 4 times as large as the actual counts). Bruce