From owner-freebsd-scsi Mon Aug 11 19:21:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA17626 for freebsd-scsi-outgoing; Mon, 11 Aug 1997 19:21:09 -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 TAA17615 for ; Mon, 11 Aug 1997 19:20:51 -0700 (PDT) Received: from gurney.reilly.home (d30.syd2.zeta.org.au [203.26.11.30]) by godzilla.zeta.org.au (8.8.5/8.6.9) with ESMTP id MAA06237 for ; Tue, 12 Aug 1997 12:20:21 +1000 Received: (from andrew@localhost) by gurney.reilly.home (8.8.5/8.8.5) id MAA00314; Tue, 12 Aug 1997 12:19:44 +1000 (EST) Date: Tue, 12 Aug 1997 12:19:44 +1000 (EST) From: Andrew Reilly Message-Id: <199708120219.MAA00314@gurney.reilly.home> To: scsi@freebsd.org Subject: Newfs on Fujitsu R640 (2k sector media) Cc: andrew@gurney.reilly.home Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi all, 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. Here's the skinny: This is what the boot probe says: Aug 8 09:09:21 gurney /kernel: (ahc0:6:0): "FUJITSU M2513A 1300" type 7 removab le SCSI 2 Aug 8 09:09:22 gurney /kernel: od0(ahc0:6:0): Optical 606MB (310352 2048 byte s ectors) Aug 8 09:09:22 gurney /kernel: od0(ahc0:6:0): with approximate 151 cyls, 64 hea For reference, here's what an earlier boot with an R230 disk in the drive looks like: Aug 7 10:25:48 gurney /kernel.vm86: (ahc0:6:0): "FUJITSU M2513A 1300" type 7 re movable SCSI 2 Aug 7 10:25:48 gurney /kernel.vm86: od0(ahc0:6:0): Optical 217MB (446325 512 by te sectors) Aug 7 10:25:48 gurney /kernel.vm86: od0(ahc0:6:0): with approximate 217 cyls, 6 4 heads, and 32 sectors/track On a side issue (I hope), I tried a few different things after the upgrade, including enabling the "Spindle automatic stop mode" on the drive, and setting the "Device type mode for INQUIRY command" to MO, and using the od driver, instead of the sd driver. I don't know what the difference is (I was hoping for an eject on unmount...) but now I get these messages occasionally: This one every time I mount one of the R230 disks I had formatted under the pre-release 2.2 FreeBSD: Aug 7 14:29:43 gurney /kernel: od0: invalid primary partition table: no magic This looks like a spin-down thing. Note at the end that I re-tried the mount, and it just worked: Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): NOT READY asc:4,0 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): Logical unit not ready, cause no t reportable Aug 8 13:24:00 gurney /kernel: , retries:2 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): NOT READY asc:4,0 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): Logical unit not ready, cause no t reportable Aug 8 13:24:00 gurney /kernel: , retries:1 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): NOT READY asc:4,0 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): Logical unit not ready, cause no t reportable Aug 8 13:24:00 gurney /kernel: , FAILURE Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): NOT READY asc:4,0 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): Logical unit not ready, cause no t reportable Aug 8 13:24:00 gurney /kernel: , retries:2 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): NOT READY asc:4,0 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): Logical unit not ready, cause no t reportable Aug 8 13:24:00 gurney /kernel: , retries:1 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): NOT READY asc:4,0 Aug 8 13:24:00 gurney /kernel: od0(ahc0:6:0): Logical unit not ready, cause no t reportable Aug 8 13:24:00 gurney /kernel: , FAILURE Aug 8 13:24:17 gurney /kernel: od0: invalid primary partition table: no magic This one caused a hang that I had to press the reset button to get out of: Aug 7 14:30:14 gurney /kernel: od0(ahc0:6:0): SCB 0x0 - timed out while idle, L ASTPHASE == 0x1, SCSISIGI == 0x0 Aug 7 14:30:14 gurney /kernel: SEQADDR = 0x4 SCSISEQ = 0x12 SSTAT0 = 0x5 SSTAT1 = 0xa Aug 7 14:30:14 gurney /kernel: od0(ahc0:6:0): Queueing an Abort SCB Aug 7 14:30:14 gurney /kernel: od0(ahc0:6:0): Abort Message Sent Aug 7 14:30:14 gurney /kernel: od0(ahc0:6:0): SCB 0 - Abort Completed. Aug 7 14:30:14 gurney /kernel: od0(ahc0:6:0): no longer in timeout Aug 7 14:30:22 gurney /kernel: ahc0:A:6: no active SCB for reconnecting target - issuing BUS DEVICE RESET Aug 7 14:30:22 gurney /kernel: SAVED_TCL == 0x60 ARG_1 == 0x0 SEQADDR == 0x10d Aug 7 14:30:22 gurney /kernel: ahc0: Bus Device Reset delivered. 1 SCBs aborted Aug 7 14:30:22 gurney /kernel: ahc0: Bus Device Reset delivered. 1 SCBs aborted OK, those are unpleasant, but I figure I can get rid of them if I care to by preventing the drive from spinning down. What's bugging me at the moment is that I don't seem to be able to disklabel or newfs one of the R640 disks. I'm using this disktab entry, which I built out of the numbers reported at boot time, but it's essentially the same as the one that you get with disklabel -w -r auto: fuj640|R640|Fujitsu R640 media Meg 3.5inch Magneto-Optical:\ :ty=removeable:dt=SCSI:rm#3600:\ :se#2048:nt#64:ns#32:nc#151:sc#2048:su#310352:\ :pa#310352:oa#0:ba#16384:fa#2048:ta=4.2BSD:\ :pc#310352:oc#0: (Auto leavs ba and fa 0, which I guess causes newfs to pick sensible defaults?) # 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? # 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: # newfs od0a newfs: /dev/rod0a: Invalid argument # 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 So, obviously there's something wrong with reading the disklabel. You can see that I've doctored the error printf() in the wtfs function in mkfs.c, in /usr/src/sbin/newfs, to see what was going on, and it was obviously trying to write a valid block size. Anyone care to offer suggestions? I'm happy to try patches or new things: I want this to work... Thanks in advance, -- Andrew "The steady state of disks is full." -- Ken Thompson