[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference stkhlm::magtape

Title:MAGNETIC TAPEDRIVES
Moderator:STKHLM::GJOHNSSON
Created:Mon Sep 21 1987
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3775
Total number of notes:13147

3646.0. "short Compac IV tape?" by DECWET::LENOX (Attack the future!) Tue Feb 04 1997 23:20

Is there any way to get a short Compac IV tape?  I've been 
checking out a TL894/893 on an NT system and I am getting
tired of things taking forever to check various situations.
I figure that 4 or 5 such tapes would be best (at least 
having the same number of tapes as drives is good).

any pointers appreciated,

Amy
lenox@zso.dec.com
decwet::lenox
T.RTitleUserPersonal
Name
DateLines
3646.1NABETH::alanDr. File System's Home for Wayward Inodes.Wed Feb 05 1997 01:175
	The TZ87s and TZ88s had a jumper on the drive that would
	limit the number of tracks used.  It gets the same basic
	affect of a short tape.  I haven't heard if the TZ89s
	have a similar feature.  Since we'll have much the same
	problem for EOT testing, maybe there is something...
3646.2Not jumper anymore..SUBSYS::TRANStraight <Left> Hitter..Wed Feb 05 1997 02:575
    
    TZ89 doesn't have jumper. It's setting via EEPROM param. Alan you may
    able to do it from your MODE_SELECT program. I'll confirm this.
    
    T.
3646.3SSDEVO::ROLLOWDr. File System's Home for Wayward Inodes.Wed Feb 05 1997 10:284
	Please do find out.  A GK driver based version on VMS
	will be pretty easy.  Command disk based things are
	always hard.  Or, I could just move it to Digital UNIX
	for the necessary minute or two.
3646.4DECWET::LENOXAttack the future!Wed Feb 05 1997 20:265
A unix solution would be preferable to vms (I don't think my
group has a system running vms anymore, none within cable
length to any tower).  At least there are many unix systems
sitting next to the NT system.
3646.5NABETH::alanDr. File System's Home for Wayward Inodes.Thu Feb 06 1997 03:3441
	Here are the contents of the EEPROM page from a V29 TZ89.  Nothing
	is obviously "short tape".  

H            Name T            Current            Default    Minimum    Maximum
- --------------- - ------------------ ------------------ ---------- ----------
   FORCEEEREBUILD b                  0                  0          0          1 
    DEBUGPRINTSON b                  1                  1          0          1 
         PERFMODE b                  1                  1          0          1 
     MAXBURSTSIZE                    0                  0          0      65535 
   REDUNDANCYMODE                    1                  1          0          3 
  SCSIBUSDMATIMER                    0                  0          0        255 
     DISUNBUFMODE b                  0                  0          0          1 
   NODEFERRCVDERR b                  1                  1          0          1 
  SCSIRESELRETRIES                   10                 10          0        255
    REPBUSYINPROG b                  0                  0          0          1 
    NORDYUAONUNLD b                  0                  0          0          1 
   REPUAONSEQUNLD b                  1                  1          0          1 
   UNLDSNSOPERRMV b                  0                  0          0          1 
        INQVUAREA b                  0                  0          0          1 
  ENACHECKDENONWR b                  1                  1          0          1 
   DISDEFERCLNRPT b                  0                  0          0          1 
           DEFSEW b                  1                  1          0          1 
   ENAINITSYNCNEG b                  0                  0          0          1 
  REPORTRCVDPERRS b                  1                  1          0          1 
  ENATHIRDPTYDENS b                  1                  1          0          1 
     ENAREPDECOMP b                  0                  0          0          1 
   REPORTRCVRDERR b                  0                  0          0          1 
    DEFAULTCOMPON b                  1                  1          0          1 
        FORCECOMP                    0                  0          0          2 
     FORCEDENSITY                    0                  0          0          6 
     SCSIRDYEARLY b                  1                  1          0          1 
   DISLDRAUTOLDMC b                  1                  1          0          1 
     ENALDRAUTOLD b                  1                  1          0          1 
      ENAMODEPG22 b                  0                  0          0          1 
   NODISCONFXDBLK b                  1                  1          0          1 
    DISRQSPKTDATA b                  1                  1          0          1 
   PROTECTDIRONWP b                  0                  0          0          1 
        LOADERLUN                    1                  1          1          7 
         VENDORID A         "DEC     "         "DEC     " 
        PRODUCTID A "TZ89     (C) DEC" "TZ89     (C) DEC" 

3646.6Here is a copy of the program to change a parameter.NABETH::alanDr. File System's Home for Wayward Inodes.Thu Feb 06 1997 03:36147
/*
 *	Author:  Alan Rollow, StorageWorks Software, Digital Equipment Corp.
 *	File:	 %M%
 *	Date:	 %G%
 *	Version: %I%
 *
 *	%M% - Send a Mode Select via the rzdisk interface to
 *	change EEPROM parameters.
 */
#ifndef	lint
static	char	SccsId[] = "%W% (scsi) %G%" ;
#endif

#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/ioctl.h>

#include <io/common/iotypes.h>

#include <io/cam/rzdisk.h>

#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <errno.h>

#define SCSI_EEPROM     (0x3e)

typedef struct {
	u_char	sense_key ;
	u_char	asc ;
	u_char	ascq ;
} scsi_status_t ;

request_sense(int fd, char *device, scsi_status_t *sp)
{
        struct extended_sense sense ;

        memset((void *)sp, 0, sizeof(scsi_status_t)) ;

        if( ioctl(fd, SCSI_GET_SENSE, &sense) == -1 )
                fprintf(stderr, "Request Sense Failed on %s: %s.\n",
                        device, strerror(errno)) ;
        else {
                sp->sense_key = sense.snskey ;
                sp->asc       = sense.asc ;
                sp->ascq      = sense.rb2 ;
        }
}

char *mode_select_failed = "Mode Select failed on %s: %s (%d,%x,%x)\n" ;

mode_select(int fd, char *option, char *value, char *device)
{
	scsi_status_t			status ;
	struct mode_sel_sns_params	params ;
	struct mode_sel_sns_data	data ;
	struct page_header		*hp ;

	/*
	 *	Clear these out.
	 */
	memset((void *)&params, 0, sizeof(params)) ;
	memset((void *)&data,   0, sizeof(data)) ;

	/*
	 *	Set up the I/O control data.
	 */
	params.msp_addr   = (caddr_t)&data ;	/* Address of data (pages) */
        params.msp_pgcode = SCSI_EEPROM ;	/* The pages to send/get   */
        params.msp_pgctrl = SAVED_VALUES ;	/* The values to send/get  */

	/*
	 *	First, do the real data, since we need the length for the
	 *	header.
	 */
	sprintf(data.ms_pages + 2, "%s %s", option, value) ;

	/*
	 *	Then the page header.
	 */
	hp = (struct page_header *)data.ms_pages ;

	hp->pgcode   = SCSI_EEPROM ;
	hp->ps       = 0 ;
	hp->pglength = strlen(data.ms_pages + 2) + 1 ;

	printf("Data:   \"%s\", Length: %d\n", data.ms_pages + 2,
		hp->pglength) ;

	/*
	 *	Even though we don't use it, set the block descriptor
	 *	length.
	 */
	data.ms_hdr.blk_des_len = 8 ;

	/*
	 *	The parameter list is the mode_sel_sns_header +
	 *	block_descriptor + 2 + pglength.
	 */
        params.msp_length = sizeof(struct mode_sel_sns_header) +
			    sizeof(struct block_descriptor) +
			    hp->pglength + 2 ;

	if( ioctl(fd, SCSI_MODE_SELECT, &params) == -1 ) {
		request_sense(fd, device, &status) ;

		fprintf(stderr, mode_select_failed, device, strerror(errno),
			status.sense_key, status.asc, status.ascq) ;
	}
}

main(int argc, char *argv[])
{
	int	bus, target, lun ;
	int	fd ;
	char	*device ;
	char	*parameter ;
	char	*value ;

	if( argc < 4 ) {
		fprintf(stderr, "usage: %s special parameter value\n",
			argv[0]) ;
		exit(-1) ;
	}
	else {
		device    = argv[1] ;
		parameter = argv[2] ;
		value     = argv[3] ;
	}

	if((fd = open(device, O_RDWR|O_NDELAY)) == -1 ) {
		fprintf(stderr, "Can't open %s: %s.\n", device,
			strerror(errno)) ;

		exit(errno) ;
	}

	mode_select(fd, parameter, value, device) ;

	if( close(fd) == -1 )
		fprintf(stderr, "Can't close %s: %s.\n", device,
			strerror(errno)) ;

	return 0 ;
}
3646.7Example.NABETH::alanDr. File System's Home for Wayward Inodes.Thu Feb 06 1997 03:4620
	Recall from .-2 that the VENDORID is:

	         VENDORID A         "DEC     "         "DEC     "

	Using the previous program, calling it "select":

	% select /dev/rmt0h VENDORID "Alan's  "
	Data:   "VENDORID Alan's  ", Length: 18

	% eeprom /dev/rmt0h
	...
	         VENDORID A         "Alan's  "         "DEC     "

	% scu -f /dev/rmt0h sho device
	Inquiry Information:

	...
	            Vendor Identification: Alan's  
	           Product Identification: TZ89     (C) DEC
	...
3646.8Can't access short tape param from SCSI.SUBSYS::TRANStraight &lt;Left&gt; Hitter..Thu Feb 06 1997 22:0212
    
    
    I just found out that TZ89 has short tape jumper but not documented.
    Will get to you offline when I get more detail.
    
    As far as EEPROM param, this short tape is a hidden param which you
    can't change it from SCSI mode select.
    
    As far as changing DLT param please use it with your own risk. Don't do
    it unless you know the param is doing.
    
    T.
3646.9cool! Thanks.DECWET::LENOXAttack the future!Mon Feb 10 1997 22:010