Table of ContentsLibraryView in Frames

How to control tape drives

You can control tape drives using the mt command. You can use the command to move and position the tape.

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 Description
-f and -t Indicate 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 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.
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 nrst devices for all tape status and movement operations. Using other rewind types can produce unwanted results.
Attention: When you use the urst device with the mt command, the tape drives it is used with must be stackers and there must be sufficient tapes in the stacker sequence. Otherwise, the tape drives involved will terminate the command sequence or overwrite the same tape multiple times.