Table of ContentsView in Frames

Controlling tape drives

You can move and position the tape drives by using the mt command.

You can use the mt command to perform any of the following tasks:

  • Move a tape to the end of data to append a backup.
  • Skip forward over files to access a particular tape file.
  • Skip backward over files to access a particular tape file.
  • Append a backup to save the tape if you have small backups.
  • Rewind a tape to get to the beginning of the tape after using a no-rewind device.
  • Take a tape drive offline to service it.
  • Display status information to find out whether a tape drive is online, offline, in use, or not in use.

The syntax of the mt command is as follows:

mt {-f|-t} device command [count]
Variables and options Description
-f and -t Indicates that the next parameter is a device. These options are interchangeable.
device Is a tape device.
command Is a command that controls the tape drives.
count Specifies the number of times to execute a command that supports multiple operations.

The command option can be any one of the following:

Command Task
eom Position the tape to the end of the data or the end of the medium if the tape is full.
fsf Move the tape forward, skipping a specified number of files.
bsf Move the tape backward, skipping a specified number of files.
fsr Move the tape forward and position the tape on the end-of-tape side of the records.
bsr Move the tape backwards and position the tape on the beginning-of-tape side of the records.
rewind Rewind the tape.
offline Rewind the tape and unload the tape medium, if possible.
status Display information about a device and the drive associated with it.
Note: Use a no-rewind (nrst) device for all tape status and movement operations. Using other rewind types can produce unwanted results.
Attention: When you use an unload/reload (urst) device with the mt command, you must use tape libraries for the backup and there must be enough tapes in the tape library. Otherwise, the tape drives involved terminate the command sequence or overwrite the same tape multiple times.