TC(4) COMMAND REFERENCE TC(4) NAME tc - SCSI cartridge tape for UTek System workstations SYNOPSIS #include <sys/mtio.h> #include <box/tcreg.h> DESCRIPTION This manual page describes a subset of general tape support described in mtio(4). It is for 1/4" cartridge tape drives only. The files /dev/tcnn refer to the SCSI 1/4" cartridge tape interface. Tape capacity varies with the drive and cartridge. It is either 45Mb or 60Mb, depending on whether a 450' or 600' cartridge is used. The driver normally rewinds the tape when closed; this may be suppressed (for example, if you intend to add data to a tape) by using the /dev/ntc device instead of the /dev/tc device. Tapes are formatted with fixed length 512 byte blocks. All reads and writes must be multiples of 512 bytes. The streaming drive used in the tc device takes several seconds to stop and restart if the workstation cannot produce or accept data fast enough. For this reason, large reads and writes (256Kb or larger) are preferred. reads and writes on tape are strictly sequential; seeks are ignored. The tape can be rewound or spaced forward with the operations described in mtio(4). Backward spacing is not allowed and attempts to backspace the tape may have peculiar results. The tc device cannot be opened for simultaneous reading and writing. Data can be written only at the beginning of the tape, erasing the old data, or at the end. Existing data cannot be selectively erased or overwritten. The operation MTEND (see mtio(4)) must be used to space a tape to the end of the present data in preparation for appending a new file. The driver writes a file mark when closed after writing. read returns a zero count when a file mark is read; the next read will fetch the first record of the next tape file. DIAGNOSTICS tcnn: can't update cartridge tape An attempt was made to open the device for simultaneous read/write. tcnn: write protected An attempt was made to write on a write protected tape. Printed 4/6/89 1
TC(4) COMMAND REFERENCE TC(4) tcnn: no tape An attempt was made to access a nonexistant tape drive or a drive without an installed tape cartridge. tcnn: hard error, err=value<bits> An unrecoverable tape error occurred. The error code is printed in hexadecimal with the bits symbolically decoded. This message is printed on the system console. RETURN VALUE read(2) returns zero at a file mark. If an error occurs, the call returns -1 and one of the following values is left in errno: [ENODEV] The named device doesn't exist, or you have attempted to open a write-protected tape for writing. [EBUSY] Some process has opened the device. No additional opens are allowed until the current user closes the device. [ENXIO] You have attempted to write past the end of the tape. [EIO] An unrecoverable read or write error has occurred. CAVEATS Programs which were written specifically for nine-track magtape may not work on cartridge tape because of the fixed block size. Other programs should be modified to buffer a reasonable amount of data with each write. New tapes, tapes which have been in storage, or tapes which have been exposed to temperature or humidity changes should be retensioned twice before use. (The mt(1) command provides an easy way to do this.) Failure to do this may result in unrecoverable read or write errors. Do not use the operation MTFSF to space a tape to the end of the present data in preparation for appending a new file. It will put the user at the right location on the tape, but will not write. SEE ALSO cpio (1), dd (1), mt (1), tar (1), mtio (4), dump (8), and restore (8). Printed 4/6/89 2
TC(4) COMMAND REFERENCE TC(4) REFERENCES For more information on this and related commands and functions, refer to the UTek System Administration manual for your system. Printed 4/6/89 3
%%index%% na:192,105; sy:297,555; de:852,2366; di:3218,414;3896,460; rv:4356,736; ca:5092,919; se:6011,227; re:6502,351; %%index%%000000000144