CT(4)
NAME
ct − cartridge tape access
HP-UX COMPATIBILITY
Level: HP-UX/RUN ONLY
Origin: HP
DESCRIPTION
This page describes the actions of the general HP-UX cartridge tape drivers when referring to a cartridge tape as either a block-mode or character-mode (raw) device.
Cartridge tapes are designed for use as “streaming” devices, and are not designed to start and stop frequently. Like discs, they are technically “random access” devices, but such access is less efficient and causes more tape and drive wear than streaming mode. While it is possible to use a cartridge tape as a file system or random access storage device, such use will dramatically reduce the life expectancy of tape cartridges and the tape drive itself.
Any CS/80 cartridge tape unit, whether built into a disc drive or operated as a standalone device, can be accessed as a blocked or raw device.
Block special files access cartridge tapes through normal system buffering mechanisms. Buffering is handled such that concurrent accesses through multiple opens or mounts on the same physical device do not get out of phase. Block special files can be read and written without regard to physical cartridge tape records. Each I/O operation results in one or more logical block transactions. Use of this mode is discouraged because it increases wear on tapes and drives.
Character special files provide a raw interface for transferring data directly between the cartridge tape and the user’s read or write buffer. A single read or write operation always results in exactly one I/O transaction. This is considerably more efficient than block-mode I/O which can require several transactions to transfer the same amount of information and cannot handle the transfer directly between the drive and user space.
Tcio(1) is provided on some systems so you can take advantage of the efficiencies of raw I/O, while also making optimal use of the streaming capabilities of the cartridge tape drives. During writes, buffers small transactions into larger data blocks that are optimal for cartridge tapes, and reverses the process during reads. It is particularly designed for use as a complement to cpio for handling backups.
During raw I/O, there may be implementation-dependent restrictions on the alignment of the user buffer in memory and its maximum size. Also, each transfer must occur on a record boundary and must read a whole number of records. Record size is hardware dependent, but is usually 1024 bytes. Use of tcio (1) hides all these issues.
Each raw access is independent of other raw accesses and of block accesses to the same physical device. Thus, transfers are not guaranteed to occur in any particular order. Having multiple programs access the cartridge tape is, in effect, random access, and is subject to the warnings above.
In raw I/O, each operation is completed to the device before the call returns. For block-mode writes, data may be cached until it is convienient for the system to write it. In addition, block-mode reads potentially do a one (or more) block read-ahead. The interaction of block-mode and raw access to the same cartridge tape is not specified, and in general is unpredictable. Because block-mode writes can be delayed, it is possible for a program to generate requests much more rapidly than the drive can actually process them. Flushing a large number of requests could take several minutes, and during that time the system will not have use of the buffers taken by these requests, and thus will suffer a possibly severe performance degradation. If the tape drive and the system disc share a single controller, disc activity may be severely limited or stopped until the buffers are flushed.
The name of a raw device (its character special file name) is typically the same as the name of the corresponding blocked device (its block special file name) prefixed with an "r".
HARDWARE DEPENDENCIES
Series 500:
Block-special devices cannot be opened for I/O.
SEE ALSO
mkdev(1M), mknod(1M), tcio(1), intro(4), disc(4), mt(4), and the HP-UX System Administrator Manual provided with your system.
Hewlett-Packard — last mod. May 11, 2021