Operating in immediate mode and with infinite flush improves the drive's performance by reducing the time it takes to write data and filemarks because all commands will be treated as immediate. The drawback is that if power fails during a write operation, any data in the buffer will be lost. These settings allow drives to "plug-and-play" with Sun workstations that have internal SCSI support and are running SunOS 4.1.x (Solaris 1) and later without modifying the Device Definition files. For SunOS 5.x (Solaris 2), you will have to modify the kernel's st.conf file as described below. Note: If you use vendor-supplied software that recommends a switch setting other than this, use the setting the software vendor recommends. HP SureStore DAT24x6 and DAT40x6:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Option Switch Value |
Internal Switch Settings | |||
|---|---|---|---|---|
1 |
2 |
3 |
4 |
|
7 |
On |
On |
On |
Off |
Note: Set the value with the autoloader switched off.
The HP SureStore DAT24 internal autoloaders also have an option selector on the rear panel. These are four on-off switches that allow you to set the value, as above. Instructions for setting these switches are provided in the Installation Guide. You should not need to change them after installation.
For a more detailed explanation, please see Autoloader Option Switch.
SunOS 4.1.x requires that the
SCSI address of tape devices be either 4 or 5. If
the address is set to 4, the "rst0"
or "nrst0" driver is used.
If the address is 5, "rst1"
or "nrst1" is used.
When using the "cpio"
command, set the block size option (B)
to a block size of 5120 or greater to improve
performance.
Note: If you use the configuration switch setting described above, the tape drive should work well with SunOS 4.1.x without modifying the SCSI tape configuration files.
If you want to optimize performance in plug-and-play applications, modify the device files as follows:
In the file /usr/sys/scsi/targets/stdef.h,
add the following line (shown in bold)
after the entry which defines an Exabyte
device:
#define ST_TYPE_EXABYTE 0x28 /* Exabyte * #define ST_TYPE_HP1 0x29 /* HP */
For "0x29 " in the second line, use the next unused number.
In the file /usr/sys/scsi/targets/st_conf.c,
after the paragraph:
/* 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 }
}
add the following paragraph:
/* HP 4mm Helical Scan */
{
"<drive name>; 4mm DAT", <n>, "<drive number>",
ST_TYPE_HP1, 1024, (ST_VARIABLE | ST_BSF |
ST_BSR | ST_LONG_ERASE | ST_AUTODEN_OVERRIDE),
8000, 8000, { 0x00, 0x00, 0x00, 0x00 },
{ 0, 0, 0, 0 }
}
where <drive
name> is any descriptive
name you like, and <n>
(the string length) and <drive
number> should be as in the
following table. Each drive number has 6
spaces after the first "HP".
Drive |
n | Drive Number |
|---|---|---|
| HP SureStore Tape 5000 | 16 |
"HP HP35480A" |
| HP SureStore DAT8 | 14 |
"HP C1533A" |
| HP SureStore DAT24 | 14 |
"HP C1537A" |
| HP SureStore DAT24x6 | 14 |
"HP C1557A" |
| HP SureStore DAT40 | 14 |
"HP C5683A" |
| HP SureStore DAT40x6 | 14 |
"HP C5713A" |
If you wish to change the default SCSI IDs allowed for tape devices, modify the kernel configuration file in:
% /usr/sys/`arch
-k`/conf
To identify the configuration file, use the following command:
% /etc/dmesg | grep
Sun | tail -1
This produces output similar to the following:
SunOS Release 4.1.4
(GENERIC) #1: Thu Jul 18 10:17:29 GMT
1996
This means that the configuration file to examine is called GENERIC. Look for the tape entries in the scsibus listing (see example below) and modify the target (SCSI ID) assignments for the appropriate SCSI controller.
# declare first scsi bus
scsibus0 at esp
# first hard SCSI disk
disk sd0 at scsibus0 target 3 lun 0
# second hard SCSI disk
disk sd1 at scsibus0 target 1 lun 0
# third hard SCSI disk
disk sd2 at scsibus0 target 2 lun 0
# fourth hard SCSI disk
disk sd3 at scsibus0 target 0 lun 0
# first SCSI tape
tape st4 at scsibus0 target 4 lun 0
# second SCSI tape
tape st5 at scsibus0 target 5 lun 0
# CD-ROM device
disk sr1 at scsibus0 target 6 lun 0
Once you have made these modifications, recompile your kernel as follows:
% cd /usr/sys/`arch
-k`/conf
If you already have a kernel configuration file (called MYCONF), then configure the kernel with the following command:
% /usr/etc/config
MYCONF
This will create a directory (../MYCONF) in which you can rebuild the kernel:
% cd ../MYCONF
% make
Note: If the make reports any errors, you should not proceed in using the kernel generated. Check that you have followed all the instructions correctly.
If the make runs successfully, move the existing kernel somewhere safe and install the new one using the following commands:
% mv /vmunix
/vmunix.old
% mv ./vmunix /vmunix
You are now ready to halt the system. (If others users are on the system, use shutdown instead.)
% sync;halt
Once the system is halted, power on the tape drive and reboot the system from the boot prompt. (On older workstations, the boot prompt is a > symbol.) If you have powered the system down completely, it may reboot automatically.
% ok boot vmunix
In the file /kernel/drv/st.conf,
after these lines:
########
# Copyright (c) 1992, by Sun Microsystems, Inc.
#ident "@(#)st.conf 1.6 93/05/03 SMI"
add the following (the six spaces are significant in the strings):
tape-config-list = "HP HP35470A", "HP DDS 4mm DAT", "HP-data1", "HP HP35480A", "HP DDS-DC 4mm DAT", "HP-data1", "HP C1533A", "HP DDS2 4mm DAT", "HP-data2", "HP C1537A", "HP DDS3 4mm DAT", "HP-data2", "HP C5683A", "HP DDS4 4mm DAT", "HP-data2", "HP C1553A", "HP DDS2 4mm DATloader", "HP-data2", "HP C1557A", "HP DDS3 4mm DATloader", "HP-data2", "HP C5713A", "HP DDS4 4mm DATloader", "HP-data2"; HP-data1 = 1,0x34,1024,0x639,3,0x00,0x13,0x3,2; HP-data2 = 1,0x34,1024,0xd639,4,0x00,0x13,0x24,0x3,3; name="st" class="scsi" target=X lun=0;
For a DAT24x6e or a DAT40x6e autoloader, also add the following lines below:
name="st" class="scsi" target=X lun=1;
Where the values for HP-data1, HP-data2, and name, which provide normal DDS mode, have the following meanings:
| Value | Meaning | |
|---|---|---|
1 |
This value should be 1. | |
0x34 |
Value for a
DAT drive in /usr/include/sys/mtio.h.
|
|
1024 |
Default block size. For variable block size, use 0 instead of 1024 (except with Solaris 2.3, where you should not use 0). | |
0x639 |
A value is
derived from constants provided in /usr/include/sys/scsi/targets/stdef.h.
The value determines which operations the
driver can perform with the attached
device by using a unique value for each
feature and then adding them together to
form 0x639. The features are as follows: |
|
| 0x001 | Device supports variable length records. | |
| 0x008 | Device can backspace
over files (as in the `mt bsf'
option). |
|
| 0x010 | Device supports
backspace record (as in `mt bsr').
|
|
| 0x020 | Device requires a long time-out period for erase functions. | |
| 0x0200 | Device knows when end of data has been reached. | |
| 0x0400 | Device driver is unloadable. | |
| 0x1000 | Time-outs five times longer than normal. | |
| 0x4000 | Driver buffers write requests and preacknowledges success to application. | |
| 0x8000 | Variable record size not limited to 64 KB. | |
0x00 |
Default density setting. Creates a device file with compression disabled. | |
0x03 |
Creates a device file with compression enabled if configuration switches are set appropriately. | |
0x24 |
Creates a DDS-2 device file for use with a 120m DDS-2 tape. (No special DDS-3 device file is required.) | |
|
X specifies the SCSI ID (target) of the device. | |
|
Specifies
the LUN for the device. A standard tape
drive requires only the lun=0
line. An autoloader requires lun=0
for the embedded tape drive and lun=1
for the changer mechanism. |
|
tape-driver-buffering
= 4;
% cd
/dev/rmt
% rm *
% cd /
% touch /reconfigure
% sync
% halt
%
boot -r
Make sure you include the -r
switch, so that the device directory is
reconfigured using the new data.
You will now be able to use the drive by
accessing the appropriate device file (where X
is the SCSI ID of the drive).
/dev/rmt/Xcb /dev/rmt/Xcbn The autoloader configuration switch settings cause the autoloader's changer mechanism (lun=1) to report itself as a tape drive. This configuration allows random access to any tape within the autoloader using the mtx utility.
The necessary device files should exist. If you find you need to create them, follow the steps for Solaris 2 above. The correct device files in the /dev/rmt directory will look similar to the following examples:
For the lun=0 device file:
lrwxrwxrwx 1 root 50 Apr 25 16:45 0-> ../../device/sbus@1,f8000000/esp@0,800000/st@4,0:
For the lun=1 device file:
lrwxrwxrwx 1 root 50 Apr 25 16:45 1-> ../../device/sbus@1,f8000000/esp@0,800000/st@4,1:
You can check these files with the following command:
% ls -al /dev/rmt | grep "st@X,1" | head -1
where X is the autoloader's SCSI ID.