hpux 10.20 - tcio (1)
NAME
tcio - Command Set 80 CS/80 Cartridge Tape Utility
SYNOPSIS
tcio -o[dervVZ] [-l number [-n limit]] [-S buffersize] [-T tty] file
tcio -i[drvZ] [-l number [-n limit]] [-S buffersize] [-T tty] file
tcio -u[rvV] [-l number] [-m blocknumber] file
DESCRIPTION
tcio is designed to optimize the data transfer rate between certain
cartridge tape units and the controlling computer. When used in
conjunction with other utilities (such as cpio) a significant
improvement in throughput can be obtained, in addition to reducing the
wear and tear on the tape cartridges and drives. With autochanger
mechanisms, tcio provides the capability of loading a specified
cartridge, or automatically switching to successive cartridges as
needed. With the utility operation, tcio provides functions that are
unique to cartridge tapes.
tcio commands take one of the following forms:
tcio -o (copy out) Reads the standard input and writes the
data to the CS/80 Cartridge Tape Unit specified by
file.
tcio -i (copy in) Reads the CS/80 Cartridge Tape Unit
specified by file and writes the data to the standard
output.
tcio -u (utility) Performs utility functions on the cartridge
tape, such as unload, mark, and/or verify the
cartridge.
In all cases, file must refer to a character special file associated
with a CS/80 cartridge tape unit.
During input and output operations, tcio enables immediate report mode
on cartridge tape units that support this mode (see DEPENDENCIES).
During writing, this mode enables the drive to complete a write
transaction with the host before the data has actually been written to
the tape from the drive's buffer. This allows the host to start
gathering data for the next write request while the data for the
previous request is still in the process of being written. During
reading, this mode enables the drive to read ahead after completing a
host read request. This allows the drive to gather data for future
read requests while the host is still processing data from the
previous read request. Under favorable conditions, immediate report
mode allows the drive to stream the tape continuously across multiple
read/write requests, rather than having to reposition the tape between
each read/write request. See ct(7) for more information.
By default, tcio writes a tape mark in the first block on each tape to
prevent the tape from being image restored onto a disk. It also uses
the last block on each tape to hold a flag indicating whether or not
the tape is the last tape in a multi-tape sequence.
Options
Every tcio command must be followed by a -o, -i, or -u option to
indicate the type of operation being performed. In addition, the
following command options are recognized. They can be specified in
any order, but all must precede the file name. Options without
parameters can be listed individually (each preceded by a -) or
grouped together. Options with parameters require the parameter, and
must be listed individually.
-d Print a checksum to standard error. The checksum
is a 32-bit unsigned addition of all bytes written
to or read from the tape, providing an extra check
of data validity (in addition to tape
verification). The checksum value is only
reported to the user, and is not written on the
media; thus, the user must manually record and
check it. The checksum is valid only if the same
number of bytes are read from the tape as were
written to it; in other words, the checksum as a
data verification test is meaningless unless the
-e option was used when writing the tape. This
option is independent of the verbose modifier.
-e Cause a tape mark to be written on the nearest
1024-byte boundary following the end of the data.
When a tape containing an end-of-data tape mark is
read back, the read terminates upon encountering
the tape mark. Thus, by using this option, the
checksums generated by the input and output
operations are guaranteed to agree.
-r Unload the tape from the drive. On autochanger
units, the tape is returned to the magazine.
-v Verbose mode; prints information and error
messages to standard error.
-V This option turns off tape verification. Some
cartridge tape units (see DEPENDENCIES) provide
hardware for verifying the data output to the tape
(called "read-while-write"). For these units
software-driven verification is somewhat
redundant, and this option is suggested as a means
of reducing wear on tape heads and transport
mechanisms. However, read-while-write
verification does not completely eliminate all
risk of data loss, so software verification may
still be desired in situations where data
preservation is critically important.
For drives that do not have the read-while-write
hardware, a separate verification operation is
suggested. Thus, it is recommended that this
option not be used with drives that do not support
read-while-write.
-Z Prevents tcio from writing a file mark in the
first and last blocks. This option should be used
with care because a tape without a tape mark in
block zero can be image-restored to a disk.
-l number This option is intended solely for autochanging
tape drives. For input or output operations (-i
or -o) the -l option selects the cartridge
specified by number from the magazine as the first
cartridge used in the transfer. For utility
operations (-u option), tcio loads the cartridge
specified by number into the drive. (Note: the
autochanger must be in selective mode for the
autochanger options to work properly.) Whitespace
between -l and number is optional.
-m blocknumber This option writes a tape mark on a tape at the
specified block. A tape mark in block zero of the
tape prevents it from being image-restored to a
disk. Whitespace between -m and blocknumber is
optional.
-n limit This option specifies the maximum number of
cartridges to be allowed in a multitape transfer.
It applies only to autochanger type units, and
must be preceded by the -l option. Thus, -l
starts the transfer by loading cartridge number
and uses at most limit cartridges. If -l is
specified without -n, tcio quietly assumes all
remaining cartridges (in ascending order) in the
magazine. Whitespace between -n and limit is
optional.
-S buffersize Enable specification of buffer size. This option
forces allocation of a block of memory to be used
in reading or writing the tape. The size of the
buffer in bytes is 1024 times the value specified
for buffersize. If buffersize is less than 4, it
is silently increased to 4. A buffersize greater
than 64 is silently decreased to 64. If
buffersize is not specified, tcio allocates a
64K-byte buffer. Whitespace between -S and
buffersize is optional.
On tape units that support immediate report, a
significant performance increase can often be
obtained by using a smaller buffer. 8 Kbytes is
the recommended buffer size for these units. On
tape units that do not support the immediate
report mode, or on tape units that share a
controller with a disk (see DEPENDENCIES) that is
simultaneously being accessed, an increase in
performance can usually be obtained with a larger
buffer. 64K bytes, the default, is the
recommended buffer size for these units.
-T tty Specify tty as an alternative to /dev/tty.
Normally /dev/tty is opened by tcio when terminal
interaction is required. The specified file tty
is opened instead of /dev/tty. Whitespace between
-T and tty is optional. If no input device is
available, use /dev/null.
EXAMPLES
Copy the contents of a directory into an archive:
ls | cpio -o | tcio -o /dev/rct/c4t1d0
Restore it:
tcio -i /dev/rct/c4t1d0 | cpio -i
Unload the cartridge from the drive (without verifying the tape):
tcio -urV /dev/rct/c4t1d0
Copy all files in the current directory to the tape specified by the
device file > .CR /dev/rct/c4t1d0 . The device has a read-while-write
head, so verify is turned off; a buffer size (option -S) of 8 blocks
(8 Kbytes) is to be used:
ls | cpio -o | tcio -oV -S 8 /dev/rct/c4t1d0
Assume that the cartridge tape unit is an autochanger on controller 2,
with 8 tapes in the magazine. Start writing with cartridge 3, and use
at most 4 cartridges before prompting the user for additional media:
find usr -cpio | tcio -oV -S 8 -l 3 -n 4 /dev/rct/c2t0d0
DEPENDENCIES
HP7941CT, HP9144A, HP9145A, and HP35401
These cartridge tape devices contain read-while-write hardware and
support immediate report mode.
HP7942, HP7946
These cartridge tape devices contain read-while-write hardware and
support immediate report mode. Use of a small buffer size is not
recommended with these shared-controller devices when simultaneous
access to the disk is also required because the intervening disk
accesses prevent proper tape streaming.
HP7908, HP7911, HP7912, and HP7914
These cartridge tape devices do not contain read-while-write hardware,
and therefore do not support immediate report mode.
AUTHOR
tcio was developed by HP.
SEE ALSO
ct(7).
HP-UX System Administrator Manuals.