Document revision date: 30 March 2001

## OpenVMS I/O User's Reference Manual

Previous | Contents | Index

## Chapter 3
Magnetic Tape Drivers

This chapter describes the use of magnetic tape drivers, drives, and controllers.

## 3.1 Magnetic Tape Controllers and Drives

The sections that follow describe magnetic tape controllers and drives. However, note that not all supported devices are described here. Refer to the Software Product Description for the OpenVMS Operating System for Alpha and VAX for the definitive list of supported devices.

### 3.1.1 TM03 Magnetic Tape Controller (VAX Only)

On VAX systems, the TM03 magnetic tape controller supports up to eight TE16, TU45, or TU77 tape drives. These dual-density (800 or 1600 bit/inch) drives differ in speed: the TE16, TU45, and TU77 read and write data at 45, 75, and 125 inches per second, respectively. Each drive can hold one 2400-foot, 9-track reel with a capacity of approximately 40 million characters. The TM03 controller is connected to the MASSBUS through a MASSBUS adapter.

### 3.1.2 TS11 Magnetic Tape Controller (VAX Only)

On VAX systems, the TS11 magnetic tape controller connects to the UNIBUS through a UNIBUS adapter and supports one TS04 tape drive. The TS11/TS04 is a single-density tape system that supports 1600-bit/inch, phase-encoded recording.

The TSU05 and the TSV05 magnetic tape drives are used with UNIBUS and Q-bus systems, respectively.

### 3.1.3 TM78 and TM79 Magnetic Tape Controllers (VAX Only)

On VAX systems, the TM78 and TM79 magnetic tape controllers support up to four TU78 tape drives. These high-performance, dual-density drives (1600 or 6250 bit/inch) operate at 125 inches per second (ips) using a 2400-foot reel of tape with a capacity of approximately 146 million characters when recorded in the GCR (6250 bit/inch) mode. The TM78 and TM79 controllers are connected to the MASSBUS through a MASSBUS adapter.

### 3.1.4 TU80 Magnetic Tape Subsystem (VAX Only)

On VAX systems, the TU80 is a single-density, dual-speed (25 or 100 ips) magnetic tape subsystem that uses streaming tape technology (see Section 3.2.7). It supports one drive per subsystem. The TU80 connects to the UNIBUS through a UNIBUS adapter and completely emulates the TS11 magnetic tape controller.

### 3.1.5 TA81 Magnetic Tape Subsystem

On VAX and Alpha systems, the TA81 is a high-performance, dual-density (1600 or 6250 bit/inch), dual-speed (25 or 75 ips) magnetic tape subsystem that uses streaming tape technology (see Section 3.2.7). It attaches to an HSC50 controller, and is managed with the TMSCP control protocol for tape mass storage.

### 3.1.6 TU81 Magnetic Tape Subsystem (VAX Only)

On VAX systems, the TU81 is a high-performance, dual-density (1600 or 6250 bit/inch), dual-speed (25 or 75 in/s) magnetic tape subsystem that uses streaming tape technology (see Section 3.2.7). It connects to the UNIBUS through a UNIBUS adapter, and is managed with the TMSCP control protocol for tape mass storage.

### 3.1.7 TU81-Plus Magnetic Tape Subsystem (VAX Only)

On VAX systems, the TU81-Plus is an enhanced version of the TU81 streaming tape subsystem. It is a 9-track, dual-speed, dual-density, ANSI-standard, half-inch magnetic tape subsystem. In addition, it has a 256-kilobyte (KB) cache buffer that temporarily stores commands and data moving to and from the tape unit. The buffer increases the amount of time the tape drive is able to stream, thereby increasing performance. The TU81-Plus connects to all VAXBI, UNIBUS, and Q-bus systems using the KLESI-B, KLESI-U, and KLESI-Q adapters.

### 3.1.8 TA90 Magnetic Tape Subsystem

On VAX and Alpha systems, the TA90 is a 5- by 4-inch, 200-MB cartridge tape, fully read- and write-compatible with the IBM 3480 format. The TA90 includes a master controller and a dual transport unit. As many as three additional dual transport slave units can be connected to a single TA90 master controller for a total of eight drives. The controller connects to the HSC 5X-DA high-speed channel card in the HSC.

TA90 tape drives can be equipped with optional stack loaders for unattended backup operations. Each TA90 master has two dual-port STI connections to the HSC. Such dual pathing allows each control unit to service two HSC controllers which significantly increases tape drive availability. The TA90 subsystem includes a 2-MB cache that allows the controller to prefetch upcoming commands and store them while completing current data transfers. This behavior helps optimize performance. The TA90 is a TMSCP device.

### 3.1.9 RV20 Write-Once Optical Drive (VAX Only)

On VAX systems, the RV20, a 2 GB, double-sided, write-once optical (WORM) disk drive, is accessed sequentially similar to a tape. A 100-bit error correction code (ECC) protects user data. The controller performs bad block replacement. Three RV20 slaves can be daisy-chained to the subsystem controller in the RV20 master for a total of four drives.

RV02 cartridges can be used on any Compaq RV20 optical subsystem.

The average access time is 212.5 ms with an average seek rate of 150 ms. The maximum data transfer rate is 262 KB per second (formatted and sustained) with a burst rate of 1.33 MB per second.

### 3.1.10 TK50 Cartridge Tape System (VAX Only)

On VAX systems, the TK50 is a 95-MB, 5.25-inch cartridge tape system that uses streaming tape technology (see Section 3.2.7). The TK50 records data serially on 22 tracks using serpentine recording, rather than on separate (parallel) tracks. Data written to tape is automatically read as it is written. A cyclic redundancy check (CRC) is performed and the controller is notified immediately if an error occurs on the tape.

The TQK50 is a dual-height Q-bus controller for the TK50 tape drive. The TUK50 is a UNIBUS controller for the same drive. The TZK50 is a SCSI controller for the TK50 tape. Both the TQK50 and the TUK50 are TMSCP devices.

Section 3.1.13 describes compatibility among the TK50, TK70, and TZ30 magnetic cartridge tape systems.

### 3.1.11 TK70 Cartridge Tape System (VAX Only)

On VAX systems, the TK70 is a 295-MB, 5.25-inch, streaming cartridge tape system. (See Section 3.2.7 for information about streaming tape technology.) The TK70 tape drive records data serially on 48 tracks using serpentine recording, rather than separate (parallel) tracks. Data written to the tape is automatically read as it is written. A CRC check is performed and the controller is notified immediately if an error occurs on the tape.

The TQK70 is a dual-height, Q-bus controller for the TK70 magnetic tape drive. The TK70 subsystem includes a 38-KB cache to optimize performance. The TBK70 is a VAXBI-bus controller for the same drive. Section 3.1.13 describes compatibility between the TK50 and TK70 magnetic cartridge tape systems.

### 3.1.12 TZ30 Cartridge Tape System

On VAX and Alpha systems, the TZ30 is a 95-MB, 5.25-inch, half-height cartridge streaming tape drive with an embedded SCSI controller. See Section 3.2.7 for information about streaming tape technology. The TZ30 uses TK50 cartridge tapes. It records data serially on 22 tracks using serpentine recording, rather than separate parallel tracks. Section 3.1.13 describes compatibility between the TK50, TK70, and TZ30 magnetic cartridge tape systems.

### 3.1.13 Read and Write Compatibility Between Cartridge Tape Systems

When you insert a cartridge tape into the TZ30, TK50, and TK70 tape drives, the hardware initializes the media to a device-specific recording density automatically.

Depending on the type of cartridge and the type of drive on which it is formatted (inserted and initialized), full read and write access to tape cartridges may not be permitted.

Formatting a Blank TK50 Cartridge Tape

A blank, unformatted TK50 cartridge can be formatted on the TK50, TK70, and TZ30 cartridge systems. For example, a TK70 tape drive has full read and write access to a TK50 cartridge formatted on a TK70 drive. Once the cartridge tape is formatted on a particular tape drive, the tape drive has full read and write access to the cartridge tape.

Formatting a Previously Initialized TK50 Cartridge Tape

If a TK50 cartridge tape is formatted on a TZ30 or TK50 cartridge tape drive, the TZ30 and TK50 drives initialize the TK50 cartridge to TK50 density. The following table summarizes the types of access available:

| TK50
--- | ---
Controller | Read | Write
TZ30 1 | Yes | Yes
TQK50 | Yes | Yes
TQK70 | Yes | No

1Has an internal controller.

The TK70 tape drive can read data on a TK50 cartridge formatted on a TK50 or TZ30 tape drive.

Formatting a TK50 or TK52 Cartridge Tape on a TK70 Tape Drive

If a TK50 or TK52 cartridge tape is formatted on a TK70 tape drive, the TK70 cartridge tape drive initializes the TK50 or TK52 cartridge tape to TK70 density. The following table summarizes the types of access available:

| TK50 | TK52
--- | --- | ---
Controller | Read | Write | Read | Write
TZ30 1 | No | No | No | No
TQK50 | No | No | No | No
TQK70 | Yes | Yes | Yes | Yes

1Has an internal controller.

The TK50 and TZ30 tape drives cannot read or write data on a TK50 cartridge tape formatted on a TK70 drive.

## 3.2 Driver Features

The magnetic tape drivers provide the following features:

- Multiple master adapters and slave formatters
- Different types of devices on a single MASSBUS adapter; for example, an RP05 disk and a TM03 tape formatter
- Reverse read function (except for the TZ30 and TK50 on TUK50 and TQK50 controllers)
- Reverse data check function (except for the TZ30, TS11, and TK50 on TUK50 and TQK50 controllers)
- Data checks on a per-request, per-file, or per-volume basis (except for the TS11)
- Full recovery from power failure for online drives with volumes mounted, including repositioning by the driver (except on VAXstation 2000 and MicroVAX 2000 systems)
- Extensive error recovery algorithms; for example, non-return-to-zero-inverted (NRZI) error correction
- Logging of device errors in a file that may be displayed by field service or customer personnel
- Online diagnostic support for drive-level diagnostics

The following sections describe master and slave controllers, and data check and error recovery capabilities in greater detail.

### 3.2.1 Dual-Path HSC Tape Drives

A dual-path HSC tape drive is a drive that connects to two HSCs, both of which have the same nonzero tape allocation class. The operating system recognizes the dual-pathed capability of such a tape drive under the following circumstances: (1) the operating system has access to both HSCs and (2) select buttons for both ports are depressed on the tape drive.

If one port fails, the operating system switches access to the operational port automatically, provided that the allocation class information has been defined correctly.

### 3.2.2 Dynamic Failover and Mount Verification

Dynamic failover occurs on dual-pathed tape drives if mount verification is unable to recover on the current path and an alternate path is available. The failover occurs automatically and transparently and then mount verification proceeds.

A device enters mount verification when an I/O request fails because the device has become inoperative. This might occur in the following instances:

- The device is accidentally placed off line.
- The active port of an HSC-connected drive fails.
- A hardware error occurs.
- The device is set to write protected during a write operation.

When the device comes back on line, either through automatic failover or operator intervention, the operating system validates the volume, restores the tape to the position when the I/O failure occurred, and retries the failed request.

### 3.2.3 Tape Caching

The RV20, TA90, TK70, and TU81-Plus contain write-back volatile caches. The host enables write-back volatile caches explicitly, either on a per-unit basis or on a per-command basis. To enable caching on a per-unit basis, enter the DCL MOUNT command specifying the qualifier /CACHE=TAPE_DATA.

The Backup utility enables caching on a per-command basis. The user can implement caching on a per-command basis at the QIO level by using the IO$M_NOWAIT function modifiers on commands where it is legal (see Table 3-4). In the unlikely event that cached data is lost, the system returns a fatal error and the device accepts no further I/O requests. Use the IO$M_FLUSH function code to ensure that all write-back-cached data is written out to the specified tape unit. The IO$_PACKACK, IO$_UNLOAD, IO$_REWINDOFF, and IO$_AVAILABLE function codes also flush the cache.

### 3.2.4 Master Adapters and Slave Formatters

The operating system supports the use of many master adapters of the same type on a system. For example, more than one MASSBUS adapter (MBA) can be used on the same system. A master adapter is a device controller capable of performing and synchronizing data transfers between memory and one or more slave formatters.

The operating system also supports the use of multiple slave formatters per master adapter on a system. For example, more than one TM03 or TM78 magnetic tape formatter per MBA can be used on a system. A slave formatter accepts data and commands from a master adapter and directs the operation of one or more slave drives. The TM03 and the TM78 are slave formatters. The TE16, TU45, TU77, and TU78 magnetic tape drives are slave drives.

### 3.2.5 Data Check

After successful completion of an I/O operation, a data check is made to compare the data in memory with that on the tape. After a write or read (forward) operation, the tape drive spaces backward and then performs a write-check data operation. After a read operation in the reverse direction, the tape drive spaces forward and then performs a write-check data reverse operation. With the exception of TS04 and TU80 drives, magnetic tape drivers support data checks at the following three levels:

- Per request---You can specify the data-check function modifier (IO$M_DATACHECK) on a read logical block, write logical block, read virtual block, write virtual block, read physical block, or write physical block I/O function.
- Per volume---You can specify the characteristics "data check all reads" and "data check all writes" when the volume is mounted. The OpenVMS DCL Dictionary describes volume mounting and dismounting. The OpenVMS System Services Reference Manual describes the Mount Volume ($MOUNT) and Dismount Volume ($DISMOU) system services.
- Per file---You can specify the file attributes "data check on read or data check on write. File access attributes are specified when the file is accessed. Chapter 1 of this manual and the OpenVMS Record Management Services Reference Manual both describe file access.

Data check is distinguished from a BACKUP/VERIFY operation, which writes an entire save set, rewinds, and then compares the tape to the original tape.

See Section 3.1.10 for information on TK50 data check.

Note Read and write operations with data check can result in very slow performance on streaming tape drives.

### 3.2.6 Error Recovery

Error recovery is aimed at performing all possible operations that enable an I/O operation to complete successfully. Magnetic tape error recovery operations fall into the following two categories:

- Handling special conditions, such as power failure and interrupt timeout
- Retrying nonfatal controller or drive errors

The error recovery algorithm uses a combination of these types of error recovery operations to complete an I/O operation.

Power failure recovery consists of repositioning the reel to the position held at the start of the I/O operation in progress at the time of the power failure, and then reexecuting this operation. This repositioning might or might not require operator intervention to reload the drives. When such operator intervention is required, "device not ready" messages are sent to the operator console to solicit reloading of mounted drives. Power failure recovery is not supported on VAXstation 2000 and MicroVAX 2000 systems.

Device timeout is treated as a fatal error, with a loss of tape position. A tape on which a timeout has occurred must be dismounted and rewound before the drive position can be established.

If a nonfatal controller/drive error occurs, the driver (or the controller, depending on the type of drive) attempts to reexecute the I/O operation up to 16 times before returning a fatal error. The driver repositions the tape before each retry.

The inhibit retry function modifier (IO$M_INHRETRY) inhibits all normal (nonspecial conditions) error recovery. If an error occurs, and the request includes that modifier, the operation is terminated immediately and the driver returns a failure status. IO$M_INHRETRY has no effect on power failure and timeout recovery.

The driver can write up to 16 extended interrecord gaps during the error recovery for a write operation. For the TE16, TU45, and TU77 magnetic tape drives, writing these gaps can be suppressed by specifying the inhibit extended interrecord gap function modifier (IO$M_INHEXTGAP). This modifier is ignored for the other magnetic tape drives.

### 3.2.7 Streaming Tape Systems

Streaming tape systems, such as the TK50, TK70, TU80, TU81, TU81-Plus, TA81, and TZ30, use the supply and takeup reel mechanisms to control tape speed and tension directly, which eliminates the need for more complex and costly tension and drive components. Streaming tapes have a very simple tape path, much like an audio reel-to-reel recorder.

Note Read and write operations with data check can result in very slow performance on streaming tape drives.

Because the motors driving the reels are low-powered and because there is no tape buffering, streaming tape drives are not capable of starting and stopping in the interrecord gaps like conventional tape drives. When a streaming tape does have to stop, the following events occur:

1. The tape slowly coasts forward to a stop.
2. It backs up over a section previously processed.
3. It halts to await the next command.
4. It accelerates so that, when the original interrecord gap is encountered, the tape is moving at full speed.

These steps, allowing the tape to reposition, require approximately one-half second to complete on TU8x tapes and about 3 seconds on TK50 tapes. If the operating system is not capable of writing to, or reading from, a streaming tape drive at a rate that will keep the drive in constant motion (streaming) the drive repositions itself when it runs out of commands to execute. That produces a situation known as thrashing, in which the relatively long reposition times exceed the time spent processing data and the result is lower-than-expected data throughput.

Thrashing is entirely dependent on how fast the system can process data relative to the tape drive speed while streaming. Consequently, the greatest efficiency is obtained when you provide sufficient buffering to ensure continuous tape motion. Some streaming tape drives such as the TU80, TU81, TU81-Plus, and TA81 are dual-speed devices that automatically adjust the tape speed to maximize data throughput and minimize thrashing.

The TK50 writes up to seven filler records to keep the tape in motion. These records are ignored when the data is read.

## 3.3 Magnetic Tape Driver Device Information

You can obtain information on all magnetic tape device characteristics by using the Get Device/Volume Information ($GETDVI) system service. (Refer to the OpenVMS System Services Reference Manual.)

$GETDVI returns magnetic tape characteristics when you specify the item codes DVI$_DEVCHAR, DVI$_DEVCHAR2, DVI$_DEVDEPEND, and DVI$_DEVDEPEND2. Tables 3_1, 3_2, and 3-3 list these characteristics. The $DEVDEF macro defines the device-independent characteristics, the $MTDEF macro defines the device-dependent characteristics, and the $MT2DEF macro defines the extended device characteristics. The extended device characteristics apply only to the TU81-Plus tape drive.

Table 3-1 Magnetic Tape Device-Independent Characteristics
Characteristic1 | Meaning
--- | ---
Dynamic Bits (Conditionally Set)
DEV$M_AVL | Device is on line and available.
DEV$M_FOR | Volume is foreign.
DEV$M_MNT | Volume is mounted.
DEV$M_RCK | Perform data check on all read operations.
DEV$M_WCK | Perform data check on all write operations.
Static Bits (Always Set)
DEV$M_FOD | Device is file-oriented.
DEV$M_IDV | Device is capable of input.
DEV$M_ODV | Device is capable of output.
DEV$M_SQD | Device is capable of sequential access.
DEV$M_WBC 2 | Device is capable of write-back caching.

1Defined by the $DEVDEF macro.
2This bit is located in DVI$_DEVCHAR2.

Table 3-2 Device-Dependent Information for Tape Devices
Characteristic1 | Meaning
--- | ---
MT$M_LOST | If set, the current tape position is unknown.
MT$M_HWL | If set, the selected drive is hardware write-locked.
MT$M_EOT | If set, an end-of-tape (EOT) condition was encountered by the last operation to move the tape in the forward direction.
MT$M_EOF | If set, a tape mark was encountered by the last operation to move the tape.
MT$M_BOT | If set, a beginning-of-tape (BOT) marker was encountered by the last operation to move the tape in the reverse direction.
MT$M_PARITY | If set, all data transfers are performed with even parity. If clear (normal case), all data transfers are performed with odd parity. Only non-return-to-zero-inverted recording at 800 bits/inch can have even parity.
MT$V_DENSITY MT$S_DENSITY | Specifies the density at which all data transfer operations are performed. Possible density values are as follows:
MT$K_GCR_6250 | Group-coded recording, 6250 bits/inch
MT$K_PE_1600 | Phase-encoded recording, 1600 bits/inch
MT$K_NRZI_800 | Non-return-to-zero-inverted recording, 800 bits/inch
MT$K_BLK_833 | Cartridge block mode recording 2
MT$V_FORMAT MT$S_FORMAT | Specifies the format in which all data transfers are performed. A possible format value is as follows:
MT$K_NORMAL11 | Normal PDP-11 format. Data bytes are recorded sequentially on tape with each byte occupying exactly one frame.
MT$_FASTSKIP_USED | If set, the most recent IO$_SKIPFILE function was performed using the optimized SCSI space-by-file-marks algorithm. (See Section 3.4.4 for more information about the IO$M_ALLOWFAST modifier to the IO$_SKIPFILE function.)

1Defined by the $MTDEF macro.
2Only for the TK50 and TZ30 tape drives.

Table 3-3 Extended Device Characteristics for Tape Devices
Characteristic1 | Meaning
--- | ---
MT2$V_WBC_ENABLE | If set, write-back caching is enabled for this unit.
MT2$V_RDC_DISABLE | If set, read caching is disabled for this unit.

1Defined by the $MT2DEF macro. Only for the TU81-Plus. Initial device status will show both of these bits cleared; write-back caching will be disabled, read caching will be enabled.

DVI$_DEVTYPE and DVI$_DEVCLASS return the device type and class names, which are defined by the $DCDEF macro. DVI$_DEVBUFSIZ returns the buffer size. The buffer size is the default to be used for tape transfers (normally 2048 bytes). The device class for magnetic tapes is $DCTAPE, and the device type is determined by the magnetic tape model. For example, the device type for the TA78 is DT$_TA78; for the TA81 it is DT$_TA81.

Previous | Next | Contents | Index

| privacy and legal statement |
6136PRO_010.HTML