mt

magnetic tape control 

Command


SYNOPSIS

mt [-f tapename] command [count]


DESCRIPTION

mt issues commands to an SCSI magnetic tape drive.

If you do not specify tapename, mt attempts to use the contents of the TAPE environment variable as a tape device name. If you do not specify tapename or define the TAPE environment variable, mt uses a default device name of /dev/mt (the first tape drive found, in buffered mode, with automatic rewind after a tape operation).

By default, mt performs the requested operation once; by specifying count, mt can perform multiple operations.

Commands

Following is a list of the commands which mt accepts. You must specify only as many characters of a command as necessary to uniquely identify it. The commands in this section accept input from count.

asf 

absolute space to count file number. This is equivalent to a rewind followed by a fsf count.

bsf 

back space over count EOF characters. The tape is positioned on the beginning-of-tape side of the EOF character.

bsr 

back space count records.

device 

scan the system for SCSI host adapters, and lists the devices. count specifies the type of the device to list:

0	Disk drive
1	Tape drive
2	Printer
3	Processor
4	WORM
5	CD-ROM
6	Scanner
7	Optical
8	Medium changer
9	Communications
99	All devices

The default is 1 (list all tape drives).

eof 

write count EOF characters at the current position on the tape.

format 

format the tape. Note that not all tape devices support this command.

fsf 

forward space over count EOF characters. The tape is positioned on the first block of the file.

fsr 

forward space count records.

nbs 

back space count files. The tape is positioned on the first block of the file. This is equivalent to count+1 bsf's followed by one fsf.

weof 

write count EOF characters at the current position on the tape.

For the following commands, count is ignored:

eom 

space to the end of recorded media on the tape. eom is useful for appending files onto previously written tapes.

erase 

erase the entire tape.

offline 

rewind the tape and, if appropriate, take the drive unit off-line by unloading the tape.

retension 

rewind the cartridge tape completely, then wind it forward to the end of the reel and back to beginning-of-tape to smooth out tape tension.

rewind 

rewind the tape.

rewoffl 

rewind the tape and, if appropriate, take the drive unit off-line by unloading the tape.

status 

print status information about the tape unit.

tension 

rewind the cartridge tape completely, then wind it forward to the end of the reel and back to beginning-of-tape to smooth out tape tension.

You can abbreviate commands as long as they remain unique. Thus, the command mt rewi is valid, but mt rew is ambiguous and not valid.


EXAMPLES

The following command rewinds the first tape drive and smooths out the tape tension:

mt -f /dev/mt retension

ENVIRONMENT VARIABLES

TK_ASPI_SUPPORT_OFF 

If set, MKS Toolkit utilities do not use ASPI support if it is present and do not display warning messages if it is not.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

An error occurred or mt was unable to open the specified tape drive.

2 

Command was unrecognized.


FILES

/dev/*mt* Tape devices (see tape).


NOTES

Not all devices support all options. Some options are hardware dependent.

mt functions with tape drives connected to a SCSI controller which supports the Advanced SCSI Programming Interface (ASPI), as defined by the Adaptec (TM) Corporation, such as the Adaptec (TM) 1542B SCSI adapter. MKS does not supply the ASPI driver, since the implementation of an ASPI driver is hardware dependent.

Under 8.1/2012R2/10/2016/2019/11/2022, you must obtain the ASPI drivers for your SCSI adapter from the manufacturer. At the time of printing, ASPI drivers for 8.1/2012R2/10/2016/2019/11/2022 were available from Adaptec's ftp site:

ftp://ftp.adaptec.com/pub/BBS/winnt/aspi32.exe

If no ASPI driver is available, mt uses the native 8.1/2012R2/10/2016/2019/11/2022 tape interface rather than ASPI. As such, it cannot set the tape density.

See tape for a description of the valid SCSI tape device names.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
cpio, dd, pax, tar

File Formats:
tape

MKS Toolkit Backup and Tape Handling Solutions Guide


PTC MKS Toolkit 10.4 Documentation Build 39.