TAPE(C) UNIX System V
Name
tape - magnetic tape maintenance program
Syntax
tape [ -c ] [ -f ] [ -a arg ] command [ devicefile ]
Description
tape sends commands to and receives status from the tape
subsystem. tape can communicate with QIC-02 cartridge tape
drives, SCSI tape drives, and QIC-40, QIC-80 and Irwin
mini-cartridge tape drives.
tape reads /etc/default/tape to find the default device name
for sending commands and receiving status. For example, the
following line in /etc/default/tape will cause tape to
communicate with the QIC-02 cartridge tape device:
device = /dev/xct0
If a device name is specified on the command line, it
overrides the default device. tape queries the device to
determine its device type. If the device does not respond
to the query, for example if the cartridge tape driver is
from an earlier release, tape will print a warning message
and assume the device is a QIC-02 cartridge tape.
You can explicitly specify the type of the device by using
the device type flags, as follows:
-c QIC-02 cartridge tape
-s SCSI tape
-f QIC-40 mini-cartridge tape
-8 QIC-80 mini-cartridge tape
-i Irwin mini-cartridge tape
The -a flag allows you to pass an argument to commands that
can use them. The only command that currently can take an
argument is the format command, used only with QIC-40, QIC-
80 and Irwin tape drives.
The following commands can be used with the various tape
drivers supported under UNIX. The letters following each
description indicate which drivers support each command:
A All drivers
C QIC-02 cartridge tape driver
S SCSI tape driver
F QIC-40 and QIC-80 mini-cartridge tape drivers
I Irwin mini-cartridge tape driver
amount
Report amount of data in current or last transfer. (A)
erase
Erase and retension the tape cartridge. (C,S,F)
reset
Reset tape controller and tape drive. Clears error
conditions and returns tape subsystem to power-up state.
(A)
reten
Retension tape cartridge. Should be used periodically to
remedy slack tape problems. Tape slack can cause an
unusually large number of tape errors. (A)
rewind
Rewind to beginning of tape. (A)
status
The status output looks like this:
status: status message
soft errors: n
underruns: m
status message is a report of the current status of the
drive; ``no cartridge,'' ``write protected,'' or ``beginning
of tape'' are typical status messages.
soft errors is the number of recoverable errors that
occurred during the last tape operation. A recoverable
error is one which is correctable by the drive or
controller. An example of a non-recoverable ``hard'' error
is an attempt to write to a write-protected cartridge. Note
that if the number of soft errors greatly exceeds the
manufacturer's specifications, the drive may require service
or replacement.
underruns is the number of times the tape drive had to stop
and restart due to tape buffer underflows. Underruns are
not an error indication, but that the data transfer did not
occur at the drive's maximum data transfer rate. The number
of overruns can be affected by system load. (A)
format Format the tape cartridge. Tapes must be formatted
before they can be used. This command takes approximately
one minute per megabyte of tape capacity. Note that on
Irwin mini-cartridge tape drives, blank tapes must be
servo-written with the servo command before they can be
formatted. If an argument is provided with the -a flag, the
number of tracks specified by the argument will be
formatted. Only even numbers less than or equal to the
number of tracks on the tape are allowed. (See tape(HW) for
more information.) If no argument is given, the entire tape
will be formatted. (F,I)
servo
Prepares a blank tape for formatting by writing servo
information on each track. This command must be used
on blank mini-cartridge tapes before they can be used
in an Irwin mini-cartridge drive. If the tape has been
previously servo-written, it must be bulk-erased with a
commercial tape eraser before it can be servo-written
again. Normally, a tape should only be servo-written
once in its lifetime, although it can be formatted with
the format command many times. (I)
getbb
Prints a list of bad tape blocks detected during the
last tape operation. This listing can be saved in a
file for use by the putbb command. (F,I)
map Prints out a map of the bad blocks on the tape. The
format is a series of lines of the format:
track n: -------------X------...
Each '-' represents a good block on the track; an 'X'
represents a block marked as bad. (F,I)
putbb
Reads a list of bad tape blocks from the standard input
and adds them to the bad block table on the tape. The
format expected by putbb is the same as generated by
the getbb command. (F,I)
rfm Wind tape forward to the next file mark. (C,S)
wfm Write a file mark at the current tape position. (C,S)
The amount and reset commands can be used while the tape is
busy with other operations. All other commands wait until
the currently executing command has been completed before
proceeding.
When you are using the non-rewinding tape device or the tape
commands rfm and wfm, the tape drive light remains on after
the command has been completed, indicating that more
operations may be performed on the tape. The tape rewind
command may be used to clear this condition.
For more information on devicefiles, (listed below), see the
tape(HW) manual page.
Files
/dev/rStp0 /dev/xft0 /dev/nrct0 /dev/erct0
/dev/nrStp0 /dev/rir0 /dev/rct2 /dev/xct0
/dev/xStp0 /dev/xir0 /dev/nrct2 /dev/rctmini
/dev/rft0 /dev/rct0 /dev/xct0 /dev/xctmini
/etc/default/tape
Include files:
/usr/include/sys/tape.h
/usr/include/sys/ct.h
/usr/include/sys/ft.h
/usr/include/sys/ir.h
See Also
backup(ADM), cpio(C), dd(C), restore(ADM), tape(HW), tar(C),
xbackup(ADM), xrestore(ADM)
Notes
See tape(HW) for a list of supported tape drives.
If you use the status command while the tape drive is busy,
no message is displayed until the drive is free.
The amount command doesn't work with QIC-40 mini-cartridge
tape devices.
(printed 8/24/89) TAPE(C)