TCIO(1)
Series 500 Implementation
NAME
tcio − Command Set 80 Cartridge Tape Utility
SYNOPSIS
/etc/tcio −o [ dervSVC ] [ buffersize ] filename
/etc/tcio −i [ drvS ] [ buffersize ] filename
/etc/tcio −u [ cmrvV ] [ blocknumber ] [ save | restore ] filename [ disc_filename ]
Remarks:
This manual page describes the Series 500 implementation only. See other manual page for Series 200/300 implementation. Not supported on the Integral Personal Computer.
DESCRIPTION
Tcio −o (copy out) reads the standard input and writes the data to the raw Command Set 80 Cartridge Tape Unit specified by filename.
Tcio −i (copy in) reads the Command Set 80 Cartridge Tape Unit specified by filename in raw mode and writes the data to the standard output.
Tcio −u (utility) performs utility functions on the cartridge tape, such as image backup and restore, release, mark, and/or verify cartridge.
In all cases, filename MUST refer to a character special file associated with a Command Set 80 cartridge tape unit.
With the output and input operations, tcio utilizes a large buffer to transfer data to/from the cartridge tape, yielding a significant increase in performance, as well as a savings in wear and tear on the media and the mechanism. In addition, tcio puts a tape mark in the first block on each tape to prevent the tape from being image restored over a disc; it also utilizes the last block on each tape to flag whether the tape is the last tape in a multi-tape sequence or not.
With the utility operation, tcio provides functions that are unique to cartridge tapes.
One of the options o, i, or u must be specified. The meanings of the available modifiers are:
v Verbose mode; prints information and error messages to stderr.
d Prints a checksum to stderr. The checksum is a 32-bit unsigned addition of the bytes, providing an extra check of the validity of the tape in addition to tape verification. The value is only reported to the user and is not written on the media; thus, it’s left up to the user to manually record and check it. The checksum is valid only for the i and o operations, and if the same number of bytes are read from the tape as were written to it. This option is independent of the verbose modifier.
e Applies only to the output operation, and causes 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 will terminate upon encountering the tape mark. Thus, with the use of this option, the checksums generated by the input and output operations are guaranteed to agree.
S Enables 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 32 or greater than 512 will cause the program to terminate. If buffersize is not specified, tcio will attempt to allocate buffer sizes in powers of 2 from 512 down to 64, taking the largest one possible. The primary uses of this option are to allow buffer sizes smaller than 64 Kbytes, and to allow the user to pick a buffer size that is most suitable for his application.
V This option turns off tape verification. It is suggested that this option not be used, for the sake of the integrity of the data output to tape.
m This option writes a tape mark on a tape at the specified block. If a tape is created by some other means than tcio, a tape mark in block 0 of the tape will prevent it from being image restored to a disc. Note that blocknumber must be specified.
r Releases the tape from the mechanism, unlocking the door.
c Image copy option. Provides the same capability as the push-button save and restore available in the HP 79XX single controller drive. The save and restore keywords are the same as the labels on those switches. Save implies disc to tape; restore implies tape to disc. Currently only single controller disc/tape units can be backed up in this way.
C Check read option. Provides a measure of data security not found in the tape verification or check digit options. Check read requires two I/O buffers of the size indicated by buffersize, one for writing and one for reading. The data in the first buffer is written to the tape. Then the tape is backspaced and read into the second buffer. The two buffers are then compared. If a difference occurs, tcio reports the error and terminates. This option forces no tape verification. Note that this option promotes wear and tear on both the media and the drive, and should only be used when complete assurance of the data’s integrity is required.
HARDWARE DEPENDENCIES
In general, tapes which have any tape marks other than in the first or the last block cannot be read successfully. The e option is not supported, and because of the above restriction, tapes which have been written under the e option cannot be read successfully.
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
tcio −i /dev/rct | cpio −i
The next example copies all files in the current directory (via executing find)to the tape specified by the device file /dev/rct; a checksum (option -d) is performed to verify that the write to tape was performed correctly; verbose mode (-v) is used so that you can see the file names of files being copied; in addition, a buffer size (option -S) is specified at 128 memory blocks:
find . -print | cpio -o | tcio -odvS 128 /dev/rct
The following example copies all the files and directories from the tape (specified by /dev/rct) to the current directory; the data is transfered through a 128-block buffer. Note that with the cpio command, the wildcard character ∗ is inclosed in double quotes “∗”; this must be done so that the shell doesn’t expand the ∗ to all the files in the current directory--i.e., you want the ∗ to be interpreted as all the files on the tape, not your current directory. Here is the command:
tcio -ivS 128 /dev/rct |cpio -icdvu "∗"
SEE ALSO
WARNING
To be able to use the save/restore facility, the following two conditions must be met:
your system must be in single-user mode;
you must never have used networking on your system. If networking has been used on your system, you must reboot the system before using the save/restore facility.
Tcio can tie up substantial portions of memory, creating a situation where progress on other processes (including those processes feeding tcio) is hindered. If this should occur, it is best to kill tcio and re-execute using a smaller buffersize. This problem is especially acute when using the C option, because two buffers are required.
BUGS
If the cartridge drive cannot read the manufacturer’s block on the tape, the cartridge is locked in the drive and cannot be extracted without turning off the disc/tape drive. This failure is usually the result of faulty tapes or a dirty drive mechanism.
Hewlett-Packard Company — April 12, 1993