Tape Basics
SCSItape
Tape Basics
Drive Mechanisms
Records and Tape Marks
Tape Movement and Control
User's Manual
Programmer's Manual
Glossary
Valid HTML 4.0!
Drive Mechanisms
The operating principle behind most (if not all) tape drives is simple: A long strip of a flexible substrate is coated with a thin layer of a material which can be magnetized. Information is recorded and retrieved by passing this recording medium in front of a read/write head similar to those found in hard-disk drives or audio/video equipment. For storage and manipulation, the medium is wound on reels; in use, it is gradually fed from a supply reel to a take-up reel.[1] One or both reels can be encapsulated in a cartridge for easier handling.

Reel-to-reel (as opposed to cartridge) tape drives are designed to allow random access to single records on the medium. Their mechanisms decouple the tape movement from the reel movement (within limits) so that the tape can be started and stopped quickly.

Cartridge drives are usually streaming devices. The tape moves in unison with the reels in such a device, and starting or stopping the tape can take a relatively long time. Even if such a drive allows access to arbitrary records,[2] it is extremely inefficient to do so (it also causes excessive wear on both the mechanism and medium). Therefore, software which accesses a "streamer" usually takes care never to allow the tape to stop; this requires a steady supply of records to be written, respectively a reading rate which is larger than that of the drive. Most streaming devices have large record buffers to facilitate this usage.

The SCSI standard describes a unified interface to all kinds of tape drives, independent of the actual method of recording. It covers a variety of drive mechanisms and recording media, such as nine-track parallel half-inch reel-to-reel drives, quarter-inch cartridge drives with serpentine track layout, helical-scan DDS (DAT) cartridges or DLT (digital linear tape). The SCSItape driver can use all of these; it is however designed primarily for handling streaming devices. In particular, it doesn't support file seeking operations.

^ Records and Tape Marks
Data is written to a tape as a sequence of records, which may have different lengths depending on the drive mechanism, medium format, or the software used to write the tape. Some drives can only handle records of one or a small number of fixed lengths, some can handle records of any length. The latter can usually switch record length from one write operation to the next one; this is called variable-block mode, as opposed to fixed-block mode.

To allow the separation of different files on the tape, the drive can also write special markers which can be distinguished from data records when reading. The most basic marker type is the end-of-file mark, or simply filemark. By convention, a filemark signals the end of the file being written or read; two filemarks may signal the end of recorded data.[3] Some (but not all) drives also support a second kind of mark, the setmark; this can be used to group related files into sets.

^ Tape Movement and Control
Even though streaming devices don't support random access to single records, they usually allow some limited positioning operations, such as rewinding, moving across a given number of records or tape marks, or positioning the tape at the end of recorded data for appending to it. The SCSItape driver supports this kind of usage, but specific drive types (notably QIC drives) may not.

The tape control program, mt, allows the user to issue tape movement (and other) commands from the command-line or from a shell script.


[1] The single exception to this rule that I know of is the Sinclair ZX Microdrive, which used an endless tape wound on a single reel inside the Microdrive cartridge.

[2] Not every drive allows this; in particular, QIC (quarter inch cartridge) drives only allow rewriting from the start of the medium or appending to the recorded data, but not writing from an intermediate position.

[3] This convention is not universal; in particular, it's normally not used with QIC devices because of their limited capability to overwrite data.


Copyright © 1998 Jens Kilian. This file may be distributed under the conditions of the GNU General Public License.
$Id: Tapes.html,v 1.5 1998/09/19 16:31:26 jjk Exp $