TCIO(1)
NAME
tcio − Command Set 80 Cartridge Tape Utility
SYNOPSIS
tcio −o[dervVZ] [ −S buffersize ] [ −l number [ −n limit ] ] [ −T tty ] file
tcio −i[drvZ] [ −S buffersize ] [ −l number [ −n limit ] ] [ −T tty ] file
tcio −u[rvV] [ −m blocknumber ] [ −l number ] file
DESCRIPTION
Tcio is designed to optimize the data transfer rate between certain cartridge tape units and the host processor. When used in conjunction with other utilities (such as cpio(1)) 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 −o (copy out) reads the standard input and writes the data to the Command Set 80 Cartridge Tape Unit specified by file.
Tcio −i (copy in) reads the Command Set 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 Command Set 80 cartridge tape unit.
With the output and input 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 further details.
By default, tcio puts a tape mark in the first block on each tape to prevent the tape from being image restored over a disk. It also utilizes the last block on each tape to flag whether or not the tape is the last tape in a multi-tape sequence.
The following command options are recognized. One of the options −o, −i, or −u must be specified. Additional options can be specified in any order, but all must precede the file name. Options without parameters can be listed individually or grouped together. Options with parameters require the parameter and must be listed individually.
Options
−S buffersize Enable specification of buffer size. This option forces the allocation of a block of memory to be used in reading or writing the tape. The size in bytes of the buffer is 1024 times the value specified for buffersize. A buffersize less than 4 is silently increased to 4; a buffersize greater than 64 is silently decreased to 64. If buffersize is not specified, tcio allocates a 64-kilobyte buffer.
On tape units that support immediate report, a significant performance increase can often be obtained by using a smaller buffer -- 8 kilobytes 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. Sixty-four kilobytes, 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.
−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 redundant, and this option is suggested.
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 This option prevents tcio from writing a file mark in the first and last blocks. This option should be used with care, since a tape without a tape mark in block zero can be image-restored to a disk.
−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.
−l number This option is intended solely for autochanger-type tape units. With the input or output operations (−i or −o) the autochanger option selects the cartridge from the magazine with which the transfer begins. When used with the utility function (−u option), tcio loads the specified cartridge into the drive. (Note: the autochanger must be in selective mode for the autochanger options to work properly.)
−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.
−n limit This option specifies the maximum number of cartridges to be used 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 the remaining cartridges (in ascending order) from the magazine.
−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.
EXAMPLES
The first example below copies the contents of a directory into an archive; the second restores it:
ls | cpio −o | tcio −o /dev/rct/c0d1
tcio −i /dev/rct/c0d1 | cpio −i
To unload the cartridge from the drive (without verifying the tape) execute:
tcio -urV /dev/rct/c0d1
The next example copies all files in the current directory to the tape specified by the device file /dev/rct/c1d0s2. Because the device has a read-while-write head, verify is turned off; a buffer size (option -S) of 8 blocks (that is, 8 kilobytes) is specified:
ls | cpio -o | tcio -oV -S 8 /dev/rct/c1d0s2
The next example assumes that the cartridge tape unit is an autochanger, on controller 2, with 8 tapes in the magazine. The tcio operation starts writing with cartridge 3, and uses at most 4 cartridges before prompting the user for additional media:
find usr -cpio | tcio -oV -S 8 -l 3 -n 4 /dev/rct/c2
DEPENDENCIES
HP7941CT, HP9144A, and HP35401
These cartridge tape devices support the immediate report mode and provide the read-while-write hardware.
HP7942, HP7946
These cartridge tape devices support the immediate report mode and provide the read-while-write hardware. The use of a small buffer size is not recommended with these shared controller devices when there is simultaneous access to the disk, because the disk accesses prevents proper tape streaming.
HP7908, HP7911, HP7912, and HP7914
These cartridge tape devices do not support the immediate report mode and provide the read-while-write hardware.
AUTHOR
Tcio was developed by HP.
SEE ALSO
ct(7). HP-UX System Administrator Manual.
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989