* Re: HP C1553A DAT drive, Ultrix, OSF/1, Solaris, ???
1995-03-08 21:37 HP C1553A DAT drive, Ultrix, OSF/1, Solaris, ??? Michael J Allard
@ 1995-03-13 11:17 ` Kevin Jones
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Jones @ 1995-03-13 11:17 UTC (permalink / raw)
Michael J Allard (mgrmja@rose-hulman.edu) wrote:
: Greetings.
: I have an HP C1553A DAT autoloader that looks like it will be a really
: neat drive... if I can get it to work correctly.
Configuring DDS drives on SUN systems
-------------------------------------------
Configuration Switch Settings
Switches on drive underside should be set to either: <.br> 12345678=11111000 (
MRS off)
or 12345678=11111001 ( MRS on).
SCSI Address
SUN requires that the SCSI address of Tape devices be either 4 or 5. If the
address is set to 4, the 'rst0' or 'nrst0' drivers are used. If the address is
5, 'rst1' or 'nrst1' is used.
SUNOS 4.1.X
The following changes should be made to the files listed below;
1. In file /user/sys/scsi/targets/stdef.h add the following line after the
entry defining an Exabyte device;
#define ST_TYPE_EXABYTE 0x28 /* Exabyte */ (existing line)
#define ST_TYPE _HP1 0x29 /* HP */ (added new line)
2. In the file /user/sys/scsi/targets/st_conf.c add the following paragraph
after the Exabyte entry;
/* Exabyte 8mm cartridge */
{
"Exabyte 8mm Helical Scan", 7, "EXABYTE", ST_TYPE_EXABYTE, 1024,
(ST_VARIABLE | ST_BSF | ST_BSR | ST_LONG_ERASE |ST_AUTODEN_OVERRIDE),
5000, 5000,
{ 0x00, 0x00, 0x00, 0x00 },
{ 0, 0, 0, 0 }
}
(New Paragraph Starts Here)
/* HP 4mm Helical Scan */
{
"HP-354XXA 4mm DAT", 2, "HP", ST_TYPE_HP1, 10240,
(ST_VARIABLE | ST_BSF | ST_BSR | ST_LONG_ERASE | ST_AUTODEN_OVERRIDE),
6000, 6000,
{ 0x00, 0x00, 0x00, 0x00 },
{ 0, 0, 0, 0 }
}
Recompile your kernel, and then you are ready to start backing up files to the
HP354XXA tape drive. These changes should result in a transfer rate on the
order of 6-11 MBytes/minute, depending on the UNIX command used. (C15X3 series
drive's transfer rates should be 30MByte/min or more but are highly dependant
on the systems ability to source data quickly enough).
Solaris 2.x x>1
In /kernel/drv/st.conf
tape-config-list =
"HP C1533A", "HP DDS2 4mm DAT", "HP-data2",
"HP HP35480A", "HP DDS-DC 4mm DAT", "HP-data1",
"HP HP35470A", "HP DDS 4mm DAT", "HP-data1",
"HP C1553A", "HP DDS2 4mm DATloader", "HP-data2";
HP-data1 = 1,0x34,1024,0x19,3,0x00,0x13,0x03,2;
HP-data2 = 1,0x34,1024,0x239,4,0x0,0x13,0x24,0x3,3;
/* Note: block size is set to 1024 to avoid a kernel hang problem */
/* Note: The space characters in the above strings are significant */
and the switch settings are:
1 2 3 4 5 6 7 8
ON ON ON ON ON OFF OFF OFF
Halt.
boot -r
Data Compression Control Utility
The utility below enables DC on writes to be disabled/enabled. This only works
on Solaris. SunOS does not properly support SCSI pass-thru facility that this
utility relies on.
/****************************************************************
*
* SUN_dc_xtrl.c
*
* Hack to control DC in an HP DDS drive from a SUN
* Works with Solaris. Will not work with SunOS.
*
* Use: SUN_dc_xtrl device-file-name 1 Turns DC on
* SUN_dc_xtrl device-file-name 0 Turns DC off
*
* Note: Switch 2 on the underside of the drive must be ON
* in order for this utility to work.
*
******************************************************************
* Kevin Jones. | Hewlett Packard Ltd,
* | Computer Peripherals Bristol,
* kev%hpcpbla@hplb.hpl.hp.com | Filton Road,
* | Stoke Gifford,
* | Bristol. BS12 6QZ.
* | ENGLAND.
******************************************************************
*
* This code is not official HP code.
* It is provided for informational purposes only.
* It is supplied without warranty of any kind.
*
****************************************************************/
#include
#include
#include
#include
#include
int fd;
unsigned char msel_data[] = { 0,0,0x10,0,0xf,0xe,0x40,0x80,0,0,0,0x20,0,0,0,0,0,0,0,0 };
main (argc, argv)
int argc;
char *argv[];
{ struct uscsi_cmd scsi_cmd, *cmd = &scsi_cmd;
char cmd_cdb[6];
if (argc != 3)
printf ("Usage: SUN_dc_xtrl device-file-name [01]\n");
if ((fd = open(argv[1], O_RDWR | O_NONBLOCK)) < 0)
{ if ((fd = open(argv[1], O_RDWR | O_NONBLOCK)) < 0)
{ printf ("Failed to open device %s\n", argv[1]);
exit (1);
}
}
if (*(argv[2]) == '1')
msel_data[6] = 0xC0;
cmd->uscsi_cdblen = 0x06;
cmd->uscsi_timeout = 5000;
cmd->uscsi_flags = USCSI_WRITE;
cmd->uscsi_bufaddr = msel_data;
cmd->uscsi_buflen = sizeof (msel_data);
cmd->uscsi_cdb = cmd_cdb;
cmd->uscsi_cdb[0] = 0x15;
cmd->uscsi_cdb[1] = 0x10;
cmd->uscsi_cdb[2] = 0x0;
cmd->uscsi_cdb[3] = 0x0;
cmd->uscsi_cdb[4] = 0x14;
cmd->uscsi_cdb[5] = 0x0;
if (ioctl (fd, USCSICMD ,cmd) < 0)
{ printf ("Mode Select command failed :-(\n");
exit (1);
}
exit (0);
}
Compression control via device file name
This ability exists only on drives with firmware dated after Nov 1994. If your
drive firmware is not new enough to support this then don't contact HP to
obtain upgrade tapes. Firmware upgrades are at the discretion of drive
distributors. You would be just as well to use the DC control utility supplied.
You need to set the config switches to:
1 2 3 4 5 6 7 8
ON ON OFF OFF ON ON OFF OFF
Make the st_conf.c entries described in section 13. You should now be able to
control compression via device file name:
/dev/rmt/#[lmhc][b][n]
b = Berkley mode
n = No rewind
l = Low density (compression disabled)
m = Medium Density (compression unchanged)
h = High Density (compression unchanged)
c = Compression (compression enabled)
If you can't open the device then it might well be due to the
drive's firmware being too old. You will need to use the "old"
config switches and rely on the DC control utility.
dump parameters
dump bds 64 15000 7000 /* 60m tape */
dump bds 64 15000 11000 /* 90m tape */
dump bds 64 15000 22000 /* 120m tape DDS2 format */
The block size is set to 64Kbytes for optimum SCSI performance. Capacity
calculations are as follows:
15000 * 12 * 110000 = 1.98 Gbytes:
12 = inches per foot.
11000 = "notional" length of a 90m tape (in feet).
15000 = "notional" bit density (in bits/inch) of a DDS1 format tape. (note that
since dump assumes 9 track wide tape, bits convert to bytes for capacity
calculations).
With data compressing drives you might want to factor this into the equation by
adjusting the "length" of the tape to adjust for compression ratio. eg. if you
reckon you're getting 2X compression then set the tape length to 15000 * 2. Its
fair to say that dump + data compression don't get along too well. If your
compression ratio "dipps" then suddenly dump will run off the end of tape.
NB: All dump parameters above have been "kept below" 65536 since some versions
of dump don't seem to handle "long" values.
------------------------------------------------------------------------
Here is a utility that !might! work on Solaris.
It works on HP-UX and I hacked it for Solaris but never got round
to trying it out (OK, I'll be honest, I never even tried compiling it!)
YGWYPF.
/*************************************************************
*
* dds_changer.c
*
* Utility to control a DDS autochanger (eg. C1553A, C156XA)
* HP S700 only.
*
* Kevin Jones kev@hpcpbla.bri.hp.com
*
* eg. dds_changer [123456ne] /dev/rmt/3hcn
*
* 1..6 = Select cartridge
* n = next cartridge
* e = eject magazine
*
*******************************************************************
*
* To make: cc -o dds_changer dds_changer.c
*
* You must use with major number 121, eg.
* crw-rw-rw- 1 bin bin 121 0x20130f Feb 26 1993 3hcn
*
***************************************************************/
#define SOLARIS
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#ifdef HPUX
#include <sys/scsi.h>
#else
#ifdef SOLARIS
#include <sys/scsi/impl/uscsi.h>
#endif
#endif
int fd;
int temp = 1;
main(argc, argv)
int argc;
char *argv[];
{
#ifdef HPUX
struct sctl_io sctl_io;
#else
#ifdef SOLARIS
struct uscsi_cmd scsi_cmd, *cmd = &scsi_cmd;
#endif
#endif
if (argc < 3)
{ fprintf (stderr, "Usage: dds_changer [123456ne] device-filename\n");
exit(1);
}
#ifdef HPUX
if ((fd = open (argv[2], O_RDWR | O_NDELAY)) < 0)
#else
#ifdef SOLARIS
if ((fd = open(argv[1], O_RDWR | O_NONBLOCK)) < 0)
if ((fd = open(argv[1], O_RDWR | O_NONBLOCK)) < 0)
#endif
#endif
{ fprintf (stderr, "Couldn't open device: %s\n", argv[2]);
exit(1);
}
#ifdef HPUX
sctl_io.cdb_length = 6;
sctl_io.data_length = 0;
sctl_io.max_msecs = 100000; /* Allow 100 seconds */
sctl_io.flags = 0; /* Wrt, No WDTR, No ADTR, Use ATN */
sctl_io.cdb[0] = 0x1B;
sctl_io.cdb[1] = 0x00;
sctl_io.cdb[2] = 0x00;
sctl_io.cdb[3] = 0x00;
sctl_io.cdb[4] = 0x00;
sctl_io.cdb[5] = 0x00;
#else
#ifdef SOLARIS
cmd->uscsi_cdblen = 0x06;
cmd->uscsi_timeout = 100000;
cmd->uscsi_flags = USCSI_WRITE;
cmd->uscsi_bufaddr = 0;
cmd->uscsi_buflen = 0;
cmd->uscsi_cdb[0] = 0x1B;
cmd->uscsi_cdb[1] = 0x00;
cmd->uscsi_cdb[2] = 0x00;
cmd->uscsi_cdb[3] = 0x00;
cmd->uscsi_cdb[4] = 0x00;
cmd->uscsi_cdb[5] = 0x00;
#endif
#endif
switch (*argv[1])
{ case 'e' :
#ifdef HPUX
sctl_io.cdb[5] = 0x80;
#else
#ifdef SOLARIS
cmd->uscsi_cdb[5] = 0x80;
#endif
#endif
break;
case 'n' : break;
default : if ((*argv[1] >= '1') && (*argv[1] <= '6'))
{
#ifdef HPUX
sctl_io.cdb[3] = *argv[1] - '0';
sctl_io.cdb[4] = 0x01;
#else
#ifdef SOLARIS
cmd->uscsi_cdb[3] = *argv[1] - '0';
cmd->uscsi_cdb[4] = 0x01;
#endif
#endif
break;
}
fprintf (stderr, "Unrecognized option\n");
close (fd);
exit (1);
}
for (temp = 0; temp < 2; ++temp) /* 2 tries in case we hit unit attention */
{
#ifdef HPUX
if (ioctl(fd, SIOC_IO, sctl_io) < 0)
#else
#ifdef SOLARIS
if (ioctl (fd, USCSICMD ,cmd) < 0)
#endif
#endif
{ fprintf (stderr, "Failed to exec IOCTL command !\n");
close (fd);
exit (1);
}
#ifdef HPUX
if (sctl_io.cdb_status == S_GOOD)
{ close (fd);
exit (0);
}
else
if ( (sctl_io.cdb_status != S_CHECK_CONDITION)
|| (sctl_io.sense_status != S_GOOD)
|| ((sctl_io.sense[2] & 0xF) != S_UNIT_ATTENTION)
)
break;
#endif
}
fprintf (stderr, "Device Reported Error !\n");
close (fd);
exit (1);
}
-----------------------------------------------------------------
Kevin Jones. | Hewlett Packard Ltd,
| Computer Peripherals Bristol,
kev%hpcpbla@hplb.hpl.hp.com | Filton Road,
| Stoke Gifford,
| Bristol. BS12 6QZ.
| ENGLAND.
-----------------------------------------------------------------
This response does not represent the official position of, or
statement by, the Hewlett-Packard Company. The above data is
provided for informational purposes only. It is supplied
without warranty of any kind.
^ permalink raw reply [flat|nested] 2+ messages in thread