Subject: RE: Conner minicartridge tape drive - quirky drive
To: None <jlindgren@espus.com>
From: Stephen Brown <sbrown@best.com>
List: current-users
Date: 07/22/1999 11:13:03
I guess I've discovered two things then:

1) NetBSD's version of dump could definitely use a smarter algorithm
   for calculating tape capacity.  Most versions of unix that I've
   used are fairly good at recognizing the amount of tape needed
   for a dump.

   The actual density code should be returned by a mode sense of the
   tape device.  If dump can(when using a local tape), ask the kernel
   to give it the tape density, etc. through ioctl() calls then it would
   be possible to do the tape calculations in a much more sane manner.
   I'll take a look at this in more detail and see how easy it would
   be to do...
   
2) This tape device doesn't like to respond to queries/commands
   while it's reseating the tape.  So, the code in "st.c" might
   need a delay or retry added.

   On a regular GENERIC kernel, the dmesg output gives:

st0 at scsibus0 targ 6 lun 0: <CONNER, CTMS  3200, 7.15> SCSI2 1/sequential
removable
st0: drive empty

   Note that the drive does have a tape inserted.
   Now, on a kernel with the proper SCSIDEBUG options added:

st0 at scsibus0 targ 6 lun 0: <CONNER, CTMS  3200, 7.15> SCSI2 1/sequential
removable

	<copious debugging output removed>

st0: density code 0x29, 512-byte blocks, write-enabled

   The only real difference is that the debugging output delays the
   mode sense until after the drive has time to reseat the tape.

   This does leave me with a big question though.  What exactly
   does a density code of 0x29 mean?  That one's not defined in 
   the SCSI2 specification.  It must be a vendor-specific density.
   I'll have to try to work backwards from the tape length and
   stated capacity(Argggh!!).  Do most new drives have density
   codes not listed in the SCSI spec??  Hmm, this may be harder
   than I thought...


Steve B.
sbrown@best.com
   


2)>
> Here's what I could grab from dmesg...
>
> Sorry - I forgot to get the blocksize...
>
> --------------------------------------------------------------------
> Copyright (c) 1996, 1997, 1998
>     The NetBSD Foundation, Inc.  All rights reserved.
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>     The Regents of the University of California.  All rights reserved.
>
> NetBSD 1.3.3 (YUBYUB) #8: Mon Apr 26 20:11:56 EDT 1999
>     root@yubyub:/usr/src/sys/arch/alpha/compile/YUBYUB
> AlphaStation 200 4/166 ("Mustang II"), 166MHz
>
> .
> .
> .
>
> ahc0 at pci0 dev 13 function 0
> ahc0: interrupting at isa irq 10
> ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs
> scsibus0 at ahc0 channel 0: 16 targets
> ahc0: target 0 synchronous at 20.0MHz, offset = 0xf
> sd0 at scsibus0 targ 0 lun 0: <IBM, DDRS-34560, S97B> SCSI2 0/direct fixed
> sd0: 4357MB, 8387 cyl, 5 head, 212 sec, 512 bytes/sect x 8925000 sectors
> ahc0: target 1 synchronous at 5.0MHz, offset = 0xf
> st0 at scsibus0 targ 1 lun 0: <CONNER, CTMS  3200, 7.00> SCSI2 1/sequential
> removable
> st0: drive empty
> --------------------------------------------------------------------
>
> -Jon Lindgren