stape(7) stape(7)
NAME
stape - SCSI tape interface
SYNOPSIS
/dev/iosb/[r]stapeppu[c][h][n][o][v][g]
DESCRIPTION
stape provides access to SCSI tape devices. SCSI tape devices are
accessed through the special files in the directory /dev/ios0. SCSI
tape drives are accessed through the raw (character) device only.
Access through the block tape device will return EINVAL.
The naming convention for SCSI tape devices is as follows (all numbers
are specified in decimal):
/dev/iosb/[r]stapeppu[c][h][n][o][v][g]
b Bus number (always 0).
r Designates the raw (character) device. If r is not specified, the
device is a block device.
pp (RM600)
The logical controller number. The controller number is any
2-character decimal number between 00 and 99. The number indi-
cates which SCSI bus the device is connected to on which host
adapter. Physical controllers are assigned to the logical con-
troller numbers in /etc/controller.
pp (RM400)
The logical controller number. The controller number is any
2-character decimal number between 00 and 99. The number indi-
cates which SCSI bus the device is connected to on which host
adapter.
u The SCSI tape drive number. This number ranges from 0 to 15. For
values 10 to 15 the hex representation a to f will be used. It is
important that the device address does not conflict with the SCSI
ID of the host adapter.
c If specified, designates the compression density device.
h If specified, designates the high density device.
n Designates the no-rewind on close device.
o Designates a device that does not rewind on closing and also does
not move forward to the next tape mark. This behavior is compati-
ble with certain earlier UNIX versions (e. g. BSD UNIX) and
should no longer be used.
Page 1 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
v Designates the variable block mode for devices which allow both
variable and fixed block mode.
g For these devices, the generic ioctl interface for reading and
writing by means of ioctl(2) system calls can be used in the tape
driver.
Note:
A higher level of recording density or data compression is not sup-
ported by all devices. If data is output via the directory entry of
one of these devices, the capacity of the tapes is not increased. The
generic interface for reading and writing to the drive by means of
ioctl(2) system calls, with which the corresponding ioctl calls are
forwarded directly to the device, is only supported for certain high-
performance drives.
MAJOR-MINOR DEVICE NUMBER
The major-minor device number may be determined via the /sbin/autoconf
-d devicename.
The (32-bit) major-minor device number is defined as follows:
BBBMMMMM MMMMMMxx xxxxxxdd duuvgCnh
B Bus number: (always 0).
M The major device number.
x The number of the host adapter and if necessary the numbers of
the SCSI bus on the hardware [the number coding depends on the
machine, for more information see sdisk(7)].
d The SCSI tape drive number.
u Unused.
v Encodes the variable block mode. This bit is used for tapes which
may be used in fixed and variable block mode. When 0, fixed block
mode is used; when 1, variable block mode is used.
g The code that defines whether the generic interface for reading
and writing by means of ioctl system calls may be used for this
device. If the bit is not set, each attempt to write to the
device by means of ioctl system calls is returned with an error
message. The g bit cannot be combined with other bits. The mean-
ing is different when combined with the n bit (see description of
the n bit).
Page 2 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
C Encodes the compression density attribute, which is currently
only used for Exabyte 8mm video tapes with compression modes.
When 1, the device is selected as the compression density/speed
unit. When 0, the device's default density/speed is used. As bit
h, this bit is ignored during read operations.
n Encodes the no-rewind attribute. When 1, the tape is positioned
at the End-of-Media (EOM) side of the filemark at close. When 0,
the tape is rewound to Beginning-of-Media at close. Refer to the
mtio(7) manual page for more detailed information. If the g bit
is set in addition to the n bit, the tape remains at its current
position when close is invoked (no wind forward or rewind opera-
tions).
h Encodes the density attribute. When 1, the device is selected as
the high density/speed unit. When 0, the device's default
density/speed is used. This bit is ignored during read opera-
tions.
ERROR DESCRIPTION
The error messages displayed for the SCSI tape drives have the follow-
ing format:
ios0/stape002: <02090200> Unit Not Ready - No Cartridge
where:
ios0/stape002: The SCSI tape drive that had an error. In this case,
the tape drive located at device address 2.
<KKAASSCC> The SCSI composite status code. The composite status
code has the following format:
KK The SCSI Sense Key value.
AA The SCSI Additional Sense Key value.
SS The SCSI status returned to the SCSI host adapter.
CC The SCSI host adapter error code.
Unit Not Ready The decoded SCSI Sense Key message.
No Cartridge The decoded SCSI Additional Sense Key message.
Page 3 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
SCSI TAPE CONFIGURATION
Device nodes are created using the /sbin/tpsetup command. Refer to the
tpsetup(8) manual page for more information.
SCSI tape devices are identified during boot. The tape type is deter-
mined by issuing the SCSI inquiry command. Bytes 8 to 31, the Vendor
and Product identification, returned by the SCSI inquiry are matched
against the inquiry names kept by the SCSI tape profile tables defined
in /etc/conf/pack.d/sti/space.c. The name in space.c must match
exactly, byte for byte, otherwise the tape will be classified as
"unknown".
The command autoconf(8) can be used to determine if a tape drive is
recognized by the system at boot. For example, using autoconf -l:
ios0/stape000 Tandberg TDC 3600
appears for a Tandberg QIC drive recognized by the system.
ios0/stape000: not configured - unknown type
appears for a tape drive the system did not recognize. This drive
would be classified as "unknown" by the driver.
An "unknown" tape drive is any drive that does not have a tape profile
defined. Default parameters are used to allow the drive to function.
However, since a minimal error table is defined to handle tape posi-
tioning status (end-of-tape and filemarks), error messages can not be
decoded from the composite status word. In addition, some tape drives
require specific bits to be set in order to function correctly. If
those tape drives are not recognized and are classified as "Generic",
they may not function properly. It is suggested that all tape drives
are configured onto the system using the appropriate tables so the
system recognizes the drive correctly at boot.
Density selection occurs on every tape open with a SCSI mode select
command. Other drive specific parameters are also set during tape
open. These parameters are specified by the default mode select param-
eter entry for the tape type in /etc/conf/pack.d/sti/space.c.
GENERAL INFORMATION ON SCSI TAPE DEVICES
Aborting jobs
When a job is issued for a tape device, it returns after a certain
period of time. The length of time that elapses depends on the type of
job (it can take several hours for a complete physical delete job) and
the type of tape device. If a job, which normally returns after a few
seconds, does not return after several minutes, you can assume that a
problem has arisen. The user has the option from Reliant UNIX V5.44
onwards of forcibly terminating such jobs using the SIGKILL signal or
the mt command with the reset parameter. The operating system itself
also identifies that a problem has arisen, but only aborts the job
after a specified period has elapsed (timeout). The timeout can be as
Page 4 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
long as six hours. If a tape job is aborted using the SIGKILL (kill
-9) signal or the mt -f /dev/iosX/rstapeXXX reset command, the data
written to tape up to this point can no longer be used and the last
job must be repeated.
Monitoring cleaning cycles
All tape drives must be cleaned after a certain number of jobs. Recom-
mendations have been given on how often certain tape drives should be
cleaned depending on operating conditions. From Reliant UNIX V5.44
onwards, the operating system automatically monitors whether or not
any of the connected tape drives need to be cleaned. If so, the fol-
lowing message is output on the system console:
CMN: NOTICE: sti 787 ios0/stapeXXX It's time to clean this drive
This message is output the first time the operating system determines
that the drive needs to be cleaned. If the drive continues to be used,
the following warning is output on the system console:
CMN: NOTICE: sti 790 Please clean the drive: ios0/stapeXXX
If you continue to use the drive without cleaning it, the following
message is output on the system console after, for instance, the data
on the data medium has been written or read:
CMN: NOTICE: sti 788 ios0/stapeXXX must be cleaned before use
If the tape drive is to continue being used, it must be cleaned
immediately. If it is not cleaned, any further attempts by the operat-
ing system to access the drive are rejected. This is a precautionary
measure designed to protect the tape drive. You could seriously damage
the EXABYTE drives, if you continue to use them without first cleaning
them. The following types of tape drive are affected here:
- All 8mm EXABYTE
- All PXT1-B1X (IBM-MAGSTAR)
- All DAT drives.
SCSI TAPE NOTES
When SCSI tape devices are used for either reading or writing, some
limitations apply. SCSI tapes may be accessed as raw (character)
devices only. Access through the block device will result in EINVAL
being returned at open.
When reading tape devices, the buffer start address must be "word
aligned".
Depending on the version of the operating system, the following values
for maximum block size apply:
Page 5 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
______________________________________
| Operating system version | Size KB |
|__________________________|__________|
| RM400 V5.41 | 128-2 |
|__________________________|__________|
| RM600 V5.41 B | 64 |
|__________________________|__________|
| RM400, RM600 V5.42 | 128 |
|__________________________|__________|
| RM600 V5.43 | 512 |
|__________________________|__________|
| RM600 E models V5.44 | 1024 |
|__________________________|__________|
Note for RM600:
Block sizes over 64 KB are only supported if their length is "long
word aligned". Other length specifications are rejected.
Reading and writing blocks of any arbitrary size within this limit is
allowed if the unit supports variable blocked mode.
The tape position can only be determined by moving the tape. The tape
position status can only be obtained through the extended sense bytes
returned by the SCSI request sense command after a tape movement com-
mand. To determine tape position, the driver first issues a backspace
record (BSR) ioctl. There can only be three outcomes for this move-
ment. The first possibility is the BSR reported a beginning-of-tape
(BOT) status. In this case, no further action is required since a BSR
at BOT leaves the tape at BOT. The second possibility is that a file-
mark was encountered during the BSR. The tape position was thus at the
EOM side of a filemark, so in order to restore the tape position, a
forward-space-file (FSF) is issued. The final possibility is that the
BSR completed without any error. This case requires a forward-space-
record (FSR) to restore the tape position.
Some SCSI tape drives return a "SCSI Busy" status when the drive is
still busy with a previous command (e.g. rewinding). The driver will
retry the I/O until either the device completes the I/O without
returning SCSI Busy status or the "Busy Retry Count" (as specified in
the tape's profile structure) is exhausted. The I/O will be retried at
the interval defined by the "Busy Retry Interval Time" in the tape's
profile structure.
QIC CARTRIDGE TAPE NOTES
Quarter-Inch Compatible (QIC) cartridge tape drives have different
tape capacities. Interchangeability is preserved since all QIC drives
can always read tapes written by other lower capacity tape drives. So,
for instance, a QIC tape written using the 60-Mbyte tape QIC format
can be read by a drive that supports the 150-Mbyte QIC format (the
reverse situation would, of course, not be true).
Page 6 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
Depending on the cassette drive, either fixed block mode only or vari-
able and fixed block mode is supported in the case of QIC devices.
In the case of tapes with fixed block size, where the minimum block
size is lower than the fixed block size, the data transferred is
filled with zeros when writing until the fixed block size is reached.
When reading, the block is read completely from the tape, but only the
required number of bytes are transferred for the call.
A 150-Mbyte tape is only written with 150 Mbytes of data when a high-
density device is used, otherwise low density (120-Mbyte) is used.
Note:
The maximum block size in variable block mode in QIC-150 format is 32
KB.
In a 525-Mbyte CARTRIDGE DRIVE, 525 Mbytes are always recorded when
525-Mbyte tapes are used (irrespective of whether they are low- or
high-density devices). A 150-Mbyte tape in a 525-Mbyte drive is always
written with 150 Mbytes.
There is also the exception in that tapes that have already been writ-
ten with 120 Mbytes, are recorded again with 120 Mbytes.
For QIC drives, only one filemark is written on tape closure. Normally
two filemarks are written whenever a tape is closed, and the tape is
positioned between the two filemarks. Writing the next file would
overwrite the second filemark with data. QIC drives cannot overwrite
filemarks, so the second filemark is omitted. The tape position is the
same however, on the EOM side of a filemark (the second filemark does
not exist).
Data cannot be added at the end of a QIC tape unless the MTAPP opera-
tion was used to position the tape at the end of the data area [see
mtio(7)]. A series of files may be written to QIC tape by issuing suc-
cessive writes to the no-rewind device. However, once the last file
has been written and the tape rewound or repositioned in any way,
attempts to position the tape at the end of the last file and write
additional data will result in an error.
QIC tape cartridges have stringent maintenance recommendations. The
recommended tape cleaning interval is every eight hours of use, with
the supplied tape cleaning cartridge. Besides maintenance, it is
recommended that all tapes be retensioned upon tape insertion. As
shipped, auto-retensioning is disabled in the default mode select
parameters for QIC tapes in /etc/conf/pack.d/sti/space.c. This option
can be enforced by changing the default mode select parameters for the
tape type. The major impact of auto-retensioning is that tapes are
positioned to EOM, and then back to BOT. This can take three minutes
or more. The auto-retensioning time can be halved if the tape drive
supports moving the tape to EOM before unloading the cartridge.
Page 7 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
NINE-TRACK TAPE NOTES
Nine-track tapes are considered variable-mode devices (blocks up to
128 KB are possible). Although nine-track drives usually support
either variable- or fixed-block modes, the recommended usage for the
drive is variable mode. Support of nine-track tape drives is limited
to only the SCSI differential electrical interface.
DAT/DDS NOTES
Digital Audio Tape (DAT) drive behavior is similar to nine-track
tapes. Although DAT drives support either variable- or fixed-block
modes, they are considered variable-mode devices. It is recommended
that they be used in variable-block mode.
The DAT drives supported are industry standard Digital Data Storage
(DDS) format. Tape interchange is possible with other standard DDS DAT
drives. However, tapes written in DDS tape drives can NOT be read in
incompatible non-DDS DAT (such as DATA/DAT) drives (and vice versa:
tapes written in non-DDS DAT drives can NOT be read in the DDS drive).
The tapes used in the DDS drive are industry standard DAT tapes. It is
strongly recommended that only DATA QUALITY tapes are used in the
drive. Audio quality DAT tapes may not be as reliable. The tapes are
available in several different lengths.
DDS-1 60m 1.3 GB
DDS-2 90m 2.0 GB
DDS-2 120m 4.0 GB (8.0 GB in compressed mode only)
DDS-3 125m 12.0 GB (24.0 GB in compressed mode only)
formats. The format in which a tape can be written can be ascertained
from the directory entry.
Format DDS-1 /dev/iosb/rstapeppu
Format DDS-2 /dev/iosb/rstapeppuh
Format DDS-2 (compressed) /dev/iosb/rstapeppuch
Format DDS-3 /dev/iosb/rstapeppuh
Format DDS-3 (compressed) /dev/iosb/rstapeppuch
Note: DSS-1 tapes cannot be written in DSS-2 format nor can DSS-2
tapes be written in DSS-3 format.
The exact amount of data stored on the tape may vary a little depend-
ing on the number of retries needed to write the data to tape and if
the drive was streaming.
Page 8 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
Tips for avoiding data backup problems
Remove all sources of dust and dirt from the vicinity of systems with
data recorders. Paper and toner dust from printers and photocopiers
always pose a danger.
The data recorder should only ever be used in streaming mode. The wear
and tear on the head drum and the magnetic tapes is increased enor-
mously in start/stop mode. Streaming mode can be achieved by
- recording the data to be backed up in blocks >= 16 Kbytes
- performing backups at times when the system utilization is low
Do not leave the data cartridge in the data recorder for longer than
absolutely necessary. The safest place for the cartridge is the anti-
static, dust-proof storage case supplied.
If the cartridges were subjected to climatic conditions other than the
operating environment, allow the cartridges at least 24 hours to
acclimatize before using them.
Store the data cartridges in an environment with a constant tempera-
ture and humidity. The optimum temperature is 5°C - 32°C and 20% - 60%
rel. humidity. Never allow a data cartridge to be exposed to direct
sunlight or to electrical or magnetic fields.
Cleaning
The data recorder must be cleaned at regular intervals. If it is not
cleaned at all, or only inadequately, the read/write error rate will
increase, the actual tape will wear out more quickly and particles of
dirt in the head drum may begin to smolder. In this last case, it is
already too late to use a cleaning cartridge. The drive will have to
be sent to the Service Center for cleaning and checking.
Cleaning Cartridges can be ordered from SIEMENS NIXDORF PLUS.
Cleaning intervals:
- daily, if you use the drive four to five times per day
- twice a week, if you use the drive between two and three times per
day
- weekly, if you use the drive briefly each day
If the system environment is dusty, as is often the case in offices,
much shorter intervals between cleaning will be required.
Page 9 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
If the error display flashes in amber, the drive should be cleaned
immediately. This is always if the tape pulling hours is more than 20
hours, or the error rate is to high or "MEDIUM ERROR" occurs.
Please observe the following cleaning procedure:
- Load the cleaning cartridge
- The cleaning procedure starts automatically; it lasts 30 seconds
- After the cleaning procedure, the cleaning cartridge will be
ejected automatically
- Remove the cleaning cartridge.
- Note down the date of cleaning on the cartridge label provided for
this purpose.
You can use the cleaning cartridge approximately 40 times.
Data Cartridges
Only use 4mm magnetic tape cassettes with the "DDS" (Digital Data
Storage) and "MRS ||||" (Media Recognition System) symbols, as other
cassettes can cause a malfunction. Suitable 4mm cassettes are listed
under "Accessories" in the appendix of your Operating Manual. DAT
audio cassettes cannot be written or read.
Data cartridges are subject to wear and tear, and in optimum operating
conditions can be used up to 500 times. Poor operating conditions
(e.g. dusty environment, start/stop mode) will reduce the cartridge
lifetime to 30 operation cycles.
Replace the data cartridge immediately with a new cartridge, if during
data storage "MEDIUM ERROR" occurs.
NOTES ON EXABYTE 8MM DATA RECORDERS
Exabyte devices can write or read 8mm data tapes in four logical for-
mats. The format in which a tape can be written can be ascertained
from the directory entry.
EXB-8900c compressed format /dev/iosb/rstapeppuch
EXB-8900 uncompressed format /dev/iosb/rstapeppuh
EXB-8500c compressed format /dev/iosb/rstapeppuch
EXB-8500 uncompressed format /dev/iosb/rstapeppuc
EXB-8200c compressed format /dev/iosb/rstapeppuc
EXB-8200 uncompressed format /dev/iosb/rstapeppu
Page 10 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
Important:
Not all exabyte devices support all formats. For example, the
compressed format is only supported by exabyte devices which have a
compress facility.
______________________________________________________________
| Device | Format |
|________________|____________________________________________|
| MC75 EXB-8900 | 8900c, 8900 (read/write) |
| | 8500c, 8500, 8200 (readonly) |
| MC15 ELIANT 820| 8500c, 8500 (read/write), 8200 (readonly) |
| MC10 EXB-8505 | 8500c, 8500, 8200 |
| MC10 EXB-8500 | 8500, 8200 |
| MC10 EXB-8200 | 8200 |
|________________|____________________________________________|
Tips for avoiding data backup problems
Remove all sources of dust and dirt from the vicinity of systems with
data recorders. Paper and toner dust from printers and photocopiers
always pose a danger.
The data recorder should only ever be used in streaming mode. The wear
and tear on the head drum and the magnetic tapes is increased enor-
mously in start/stop mode. Streaming mode can be achieved by
- recording the data to be backed up in blocks >= 16 Kbytes
- performing backups at times when the system utilization is low
Do not leave the data cartridge in the data recorder for longer than
absolutely necessary. The safest place for the cartridge is the anti-
static, dust-proof storage case supplied.
If the cartridges were subjected to climatic conditions other than the
operating environment, allow the cartridges at least 24 hours to
acclimatize before using them.
Store the data cartridges in an environment with a constant tempera-
ture and humidity. The optimum temperature is 20°C +2°C and 40% - 60%
rel. humidity. Never allow a data cartridge to be exposed to direct
sunlight or to electrical or magnetic fields.
Cleaning
The data recorder must be cleaned at regular intervals. If it is not
cleaned at all, or only inadequately, the read/write error rate will
increase, the actual tape will wear out more quickly and particles of
dirt in the head drum may begin to smolder. In this last case, it is
already too late to use a cleaning cartridge. The drive will have to
be sent to the Service Center for cleaning and checking.
Page 11 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
There are many cleaning procedures, most of which originate in Video
Tape technology (e.g. cleaning by means of solutions). Many procedures
are not suitable for cleaning data recorders. Using cleaning pro-
cedures of this kind can considerably impair the functioning of the
device and even damage it permanently. You should only use the clean-
ing cartridges approved by SIEMENS NIXDORF and EXABYTE.
Only use one of the following cartridges types:
- EXABYTE 8mm Cleaning Cartridge
- SONY QG6-CL
Cleaning Cartridges can be ordered from SIEMENS NIXDORF PLUS.
You should clean the data recorder at least once per month or after a
maximum of 30 hours of operating time, whichever is reached first.
If the system environment is dusty, as is often the case in offices,
much shorter intervals between cleaning will be required.
Please observe the following cleaning procedure:
- Load the cleaning cartridge.
- The cleaning procedure starts automatically and lasts 30 seconds to
4 minutes, depending of the type of drive
- After the cleaning procedure, the cleaning cartridge will be
ejected automatically.
- Remove the cleaning cartridge.
- Note down the date of cleaning on the cartridge label provided for
this purpose.
A special command needs to be executed to prepare the cleaning pro-
cedure with operating system versions V5.42 and V5.43. Please execute
the command clean8mm before beginning the cleaning procedure described
above. Follow the instructions that appear on the console.
You will find further information in clean8mm(8).
Depending on the cleaning cartridge type, 3 or 12 cleaning procedures
can be carried out. You should never tamper with the cleaning car-
tridge by trying to rewind it.
Page 12 Reliant UNIX 5.44 Printed 11/98
stape(7) stape(7)
Data Cartridges
You should only use data cartridges approved by SIEMENS NIXDORF and
EXABYTE. You can only ensure that the type and number of tape errors
will be within a permissible range by using these cartridges. The mag-
netic tape has an anti-static coating and is carefully designed for
processing digital data. Friction on coating particles and the associ-
ated wear and tear on the head drum are reduced to a minimum.
Only use one of the following cartridges types:
- EXATAPE AME (8900 only)
- EXATAPE
- SONY QG112MA
The SONY QG112MA cartridge is available from SIEMENS NIXDORF PLUS.
The EXABYTE AME tape must be used for the EXB-8900 device. Older tapes
can be read (however, this should remain the exception). The drive
must first be cleaned before you next write to AME tapes.
Data cartridges are subject to wear and tear process, and in optimum
operating conditions can be used up to 500 times. Poor operating con-
ditions (e.g. dusty environment, start/stop mode) reduce the cartridge
lifetime to 30 operation cycles.
Replace the data cartridge immediately with a new cartridge, if during
data storage "MEDIUM ERROR" or "EXCESSIVE WRITE ERROR" occurs.
FILES
/dev/iosb/[r]stapeppu[c][h][n][o][v][g]
/etc/conf/pack.d/sti/space.c
On RM400 servers, the tape devices are also responsive as
/dev/rmt/ctape[0|4] (high density)
/dev/rmt/vtape[0|4] (no-rewind)
SEE ALSO
cpio(1), mt(1), tar(1), devname(7), mtio(7), sdisk(7), clean8mm(8),
cleandev(8), tpsetup(8).
Page 13 Reliant UNIX 5.44 Printed 11/98