*BSD News Article 40224


Return to BSD News archive

Xref: sserve comp.unix.bsd:15796 comp.sys.sun.admin:41367 comp.sys.sun.misc:16830 comp.unix.admin:25614
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!cs.utexas.edu!howland.reston.ans.net!Germany.EU.net!nntp.gmd.de!dearn!barilvm!vms.huji.ac.il!itex!usenet
Newsgroups: comp.unix.bsd,comp.sys.sun.admin,comp.sys.sun.managers,comp.sys.sun.misc,comp.unix.admin
Subject: Adding 4mm DAT to SunOS 4.1.3
Message-ID: <D1qows.C40@itex.jct.ac.il>
From: roman@shekel.jct.ac.il (haim İhoward¨ roman)
Date: Sun, 1 Jan 1995 18:34:03 GMT
Sender: usenet@itex.jct.ac.il (USENET News System)
Organization: Jerusalem College of Technology
Keywords: sun sunos tape kernel DAT
Summary: Changing SunOS 4.1.3 kernel to add 4mm DAT tape drive
X-Newsreader: TIN İversion 1.2 PL2¨
Lines: 92

We have a SPARC 2 clone running SunOS 4.1.3, with a an HP35470A 4mm
DAT (We used to have an Exabyte 8mm).  The problems:

(1) "mt" still says that I have an Exabyte 8mm (although the system
    logs messages saying it's an HP 4mm DAT).

(2) A back up program (Legato's NetWorker) thought that the tape 1/2
    as long as it really was.  The system logged an "Incorrect Length
    Indicator Set" (see Appendix B below)

It turns out that we do NOT have an entry in
/usr/kvm/system/scsi/targets/st_conf.c for 4mm DAT drives.  I found
the following entry on the net (I added comments):

    /* Local addition for ArchiveST DAT Drive systems */
    /* Modifications Copyright 1992 Archive Corporation */
    {
      "ArchiveST 4mm DAT/DAT-DC",	// Name, for debug
      14,				// Length of vendor id
      "ARCHIVE Python",			// Vendor id and model (product) id
      0x30,				// Drive type for driver
      512,				// Block size
      (					// Drive options:
	   ST_KNOWS_EOD |		//	knows when EOD has been reached
	   ST_BSF       |		//	Supports backspace file
	   ST_BSR			//	Supports backspace record
      ),
      5000, 5000,			// Max read (& write) retries
      { 0x00, 0x00, 0x00, 0x00 },	// density codes, low->hi
      {  0, 0, 0, 0 }			// speed codes, low->hi
    }

I have the following questions:

(1) Do I only have to add this entry?  Can I set "drive type" to what
    I want?    I assume that it's one of the following:

	(a) an code returned by the hardware.

	(b) an index into some other table.  If so, which table(s)?

	(c) an arbitrary ID number used by the sytem (instead of the
	    names) to identify the st_conf.c entry.

    If it's (a) or (b), simply adding the above entry (modified for HP
    DAT) is NOT enough.

(2) The speed & density codes are all 0.  Is this OK?

Please mail answers to me.  I'll summarize & post.

Thanks.

====================== APPENDIX A: ENTRY FOR 8MM TAPE ===========

    /* Exabyte 8mm 2GB cartridge */
    {
      "Exabyte EXB-8200 8mm Helical Scan", // Name, for debug
      16,				// Length of vendor id
      "EXABYTE EXB-8200",		// Vendor id and model (product) id
      ST_TYPE_EXABYTE,			// Drive type for driver (=0x28)
      1024,				// Block size (different from above)
      (					// Drive options:
	   ST_VARIABLE        |		//	supports variable length I/O
	   ST_BSF             |		//	Supports backspace file
	   ST_BSR             |		//	Supports backspace record
	   ST_LONG_ERASE      |		//	Long Erase option
	   ST_AUTODEN_OVERRIDE		//	Auto-Density override flag
      ),
      5000, 5000,			// Max read (& write) retries
      { 0x00, 0x00, 0x00, 0x00 },	// density codes, low->hi
      {  0, 0, 0, 0 }			// speed codes, low->hi
    },

============== APPENDIX B: INCORRECT LENGTH ERROR ====================

The following was logged by the system when backing up via Legato's NetWorker:

	vmunix: st0: Error for command 'read', Error Level: 'Fatal'
	vmunix:      Block: 0        File Number: 0
	vmunix:      Sense Key: Media Error
	vmunix:      Vendor (Vendor 'HP' Product 'HP3470A'
	vmunix: ) Unique Error Code: 0x70
	vmunix:  Incorrect Length Indicator Set

=========================================================================
Haim (Howard) Roman              | E-mail: roman@brachot.jct.ac.il
Computer Center                  | Phone:  +972-2-751 160
Jerusalem College of Technology  |         +972-2-963 163
P.O. Box 16031                   | FAX:    +972-2-422 075
Jerusalem, ISRAEL                |