

tape                      Device Driver                      tape




Magnetic tape devices


This section gives a general explanation of COHERENT's use of in-
dustry-standard half-inch,  nine-track magnetic tape.  Exceptions
or additional information may be found in sections of this manual
describing particular devices.

A  tape volume  contains files,  each consisting  of one  or more
records and terminated by  a tape mark.  Two tape marks terminate
the  last file.   Tape  records may  vary in  length, but  cannot
exceed 2^16 bytes (2^15 is more practical).

Like  other block-oriented  devices, tape  units may  be accessed
through the  system's cooked interface or  through the raw inter-
face.  On a cooked device, seeking to any byte offset and reading
in any number  of bytes is possible.  It is  not possible to read
beyond the tape mark at the end of the current file.  All records
in the file  must be 512 bytes long, except  the last.  Write re-
quests must be made in  increments of 512 bytes, except the last.
A cooked tape may be mounted like a disk, but only as a read-only
file system.

A raw device bypasses the buffer cache, so I/O occurs directly to
or from the user's  buffer.  One write request generates one tape
record,  and one  read request returns  exactly one  record.  The
number of bytes read may be less than expected.  If the tape mark
is read,  a count of  zero is returned, but  the system positions
the tape  at the start of  the next tape file.   Seeking on a raw
device is ignored, and mounting is not allowed.

A unit cannot be opened if  it is off-line or already in use.  If
the write ring is absent,  the unit cannot be opened for writing.
Closing the  device has varying  effects, depending on  the minor
device opened  and whether the  device was opened  for reading or
writing.  In the case of reading, the tape is rewound; if the no-
rewind option was specified,  the tape advances to the next file.
In the case of writing, two tape marks are written at the current
position and  the tape  is rewound;  if the no-rewind  option was
specified, two tape marks  are written and the tape is positioned
between them.   When you close a device that  had been opened for
writing,  the tape  volume  ends at  the  current position;  data
beyond this point are undefined.

The following  device options exist, selected  by prefixes to the
device name:

hh     Read or  write  data at  high density.   The exact  density
     depends on the drive model,  but 1600 BPI (high) and 800 BPI
     (low) are typical.

nn    Do not rewind on close.




COHERENT Lexicon                                           Page 1




tape                      Device Driver                      tape



rr    The device is raw.

Hard errors may occur during tape operation.  They include detec-
tion of the  end-of-tape (EOT) reflector, reading an unexpectedly
long record, or seeking a cooked tape into a tape mark.  After an
error, no  further operations may be performed  on the unit until
the program closes the  device and the operator rewinds the tape.
Soft parity errors may arise  due to dirt, bad tape or misaligned
heads.  On  writes, the driver attempts to  place the record fur-
ther along  the tape.   On reads,  the driver simply  rescans the
record.  After several  failures, the driver announces a hard er-
ror.

Most utilities  use generic device names, which  are links to the
actual device files appropriate for the site.

***** Files *****

/ddeevv/mmtt -- Generic cooked tape device
/ddeevv/rrmmtt -- Generic raw tape device

***** See Also *****

device drivers

***** Diagnostics *****

Drivers may report errors to the console.

***** Notes *****

Not every edition of COHERENT supports magnetic tape.

























COHERENT Lexicon                                           Page 2


