Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tc(7) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mtio(7)

mt(1)

tar(1)

tcb(1)

tp(1)




tc(7) tc(7)
NAME tc - tape device driver DESCRIPTION tc is a device driver that supports the Apple Tape Backup 40SC and other tape drive drives using the generic tape driver interface described in mtio(7), with certain exceptions. Other devices that it can support are DDS-DC DAT devices, 1/4-inch QIC devices, and nine-track tape devices. (To be more compatible with nine-track tape units, this driver approximates nine-track drive tapemarks through the use of special tapemark records. Other exceptions are mentioned where appropriate.) The Apple Tape Backup 40SC is an example of a SCSI tape drive that is connected through the SCSI device chain. To select the correct device, you must reference it properly through a device file. The SCSI ID number of the tape backup device should match the number after the letters tc in the device file name. Device files for tape backup drives are supplied in these forms: /dev/rmt/tcx /dev/rmt/tcx.n /dev/rmt/tcx.600 /dev/rmt/tcx.6250 where x is the SCSI ID number of the drive in the range 0 through 7. For example, /dev/rmt/tc0 and /dev/rmt/tc0n both select the device with its SCSI ID set to 0. Device files with the n suffix support a special form of device reference. When used, such device files initiate tape operations that are not followed by the rewinding of the tape afterwards. If you use the no-rewinding forms of reference, the tape is positioned so that the next archive in a series of archives can be accessed. The tcx.1600, tcx.3200, and tcx.6250 forms of device reference are for operations at 1600 bpi density, 3200 bpi density, and 6250 bpi density only. The tape cartridge for the Apple Tape Backup 40SC must be formatted in order to store data. Nominal capacity is 40 megabytes (MB). Usable capacity is closer to 38.5 MB (reduced because of formatting overhead). One of the characteristics of the Apple Tape Backup 40SC and other tape drive devices is that it only reads and writes fixed 8 kilobyte (KB) blocks, streaming when possible. The exceptions are nine-track devices. For all the other March 1993 1



tc(7) tc(7)
devices, reads and writes are performed using 8 KB blocks, restricting raw I/O size to a multiple of 8 KB. Reading and writing many 8 KB blocks at once minimizes user-process overhead and maximizes streaming. It should be noted that positioning subcommands always act on physical 8 KB blocks. The tcb program (see tcb(1)) helps accommodate devices that expect the 8 KB fixed-size blocks. To take advantage of tcb, data must be channeled directly from tcb to the tape drive (so no other buffering is activated at another program's choice of block size). Each read or write call writes the next record on the tape. For nine-track devices (such as Qualstar 3410), the record size returned is the same length as the block size given. When reading, the record size returned is the actual number of bytes read, which can be no greater than the buffer size; if the record is too long, an error is indicated. For the Apple Tape Backup 40SC the I/O controls and data structures associated with the mtio(7) generic tape interface are supported, including MTIOCGET and MTIOCTOP. The MTIOCGET I/O control returns the driver's notion of current file and block number information in mt_fileno and mt_blkno. The mt_dsreg field contains the logical block number where the last I/O operation occurred. Though this generally matches mt_blkno, they are both returned for testing purposes. Other tape drives may also be supported with mtio calls (see mt(1)). The mt_erreg field always contains the current driver version. The number is a short integer, which is expressed as x.mn (for example, 3.24). The version is encoded as (100 * x) + (10 *m) + n For this example, the value would be decimal 324. The mt_resid field contains the number of usable blocks on the currently loaded cartridge. If this field is 0, the cartridge is not formatted. STATUS MESSAGES AND VALUES If an unformatted cartridge is loaded and the device is opened for read only, EINVAL is returned. LIMITATIONS The tapemark format does not conform to any known standard because such standards are nonexistent. When end-of-file is encountered at a simulated tapemark, the tapemark record is transferred to the user's buffer, even though the return from read(2) (correctly) does not include the tapemark 2 March 1993



tc(7) tc(7)
bytes. A 0-byte count is returned when a tapemark is read, but another read fetches the first record of the next tape file. If the tape device remains in an error state, tc may have to be closed to clear the error condition. The mtio(7) subcommands MTNOP, MTCACHE, and MTNOCACHE are not supported. After issuing the MTFORMAT I/O control, you must close and reopen the device before it will allow any other subcommands. For raw tape I/O accesses, seeks are ignored. FILES /dev/rmt/tc[0-6] Device files used for an operation followed by rewind /dev/rmt/tc[0-6]n Device files used for an operation not followed by rewind /dev/rmt/tc[0-6].1600 Device files used for an operation at 1600 bpi only /dev/rmt/tc[0-6].3200 Device files used for an operation at 3200 bpi only /dev/rmt/tc[0-6].6250 Device files used for an operation at 6250 bpi only SEE ALSO mtio(7) mt(1), tar(1), tcb(1), tp(1) in A/UX Command Reference March 1993 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026