2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH MT 1 "Jun 21, 2007"
8 mt \- magnetic tape control
12 \fBmt\fR [\fB-f\fR \fItapename\fR] \fIcommand\fR... [\fIcount\fR]
18 The \fBmt\fR utility sends commands to a magnetic tape drive. If \fB-f\fR
19 \fItapename\fR is not specified, the environment variable \fBTAPE\fR is used.
20 If \fBTAPE\fR does not exist, \fBmt\fR uses the device \fB/dev/rmt/0n\fR.
24 The following options are supported:
28 \fB\fB-f\fR \fItapename\fR\fR
31 Specifies the raw tape device.
37 The following operands are supported:
44 The number of times that the requested operation is to be performed. By
45 default, \fBmt\fR performs \fIcommand\fR once. Multiple operations of
46 \fIcommand\fR can be performed by specifying \fIcount\fR.
55 The following available commands that can be sent to a magnetic tape drive are
56 supported. Only as many characters as are required to uniquely identify a
57 \fIcommand\fR need be specified.
64 Specifies absolute space to \fIcount\fR file number. This is equivalent to a
65 \fBrewind\fR followed by a \fBfsf\fR \fIcount\fR.
74 Back spaces over \fIcount\fR EOF marks. The tape is positioned on the
75 beginning-of-tape side of the EOF mark.
84 Back spaces \fIcount\fR records.
93 Back spaces over the requested number of sequential file marks. Sequential file
94 marks are where the file marks are one right after the other with no other
95 blocks of any kind between the file marks. The number argument specifies how
96 many sequential file marks to which to space. For example, \fBbssf 4\fR
97 searches backwards to the first place where there are 4 sequential file marks
98 and positions to the BOP side of the 4th file mark.
100 This command is not supported by all drives.
113 Writes \fIcount\fR EOF marks at the current position on the tape.
122 Forward spaces over \fIcount\fR EOF marks. The tape is positioned on the first
132 Forward spaces \fIcount\fR records.
141 Forward spaces the over requested number of sequential file marks. Sequential
142 file marks are where the file marks are one right after the other with no other
143 blocks of any kind between the file marks. The number argument specifies how
144 many sequential file marks to which to space. For example, \fBfssf 4\fR
145 searches forwards to the first place where there are 4 sequential file marks
146 and positions after the 4th file mark.
148 This command is not supported by all drives.
157 Requests drive load and thread current media. Not supported by all drives.
166 Prevents media removal.
175 Back spaces \fIcount\fR files. The tape is positioned on the first block of the
176 file. This is equivalent to \fIcount+1\fR \fBbsf\fRs ollowed by one \fBfsf\fR.
185 Positions to requested logical tape position.
194 Gets and prints current logical tape position.
203 Allows media removal.
206 If \fIcount\fR is specified with any of the following commands, the \fIcount\fR
207 is ignored and the command is performed only once.
214 Reads the drives current configuration from the driver and displays it in
215 \fBst.conf\fR format. See \fBst\fR(7D) for definition of fields and there
225 Spaces to the end of recorded media on the tape. This is useful for appending
226 files onto previously written tapes.
235 Erases the entire tape.
237 Some tape drives have option settings where only portions of the tape can be
238 erased. Be sure to select the correct setting to erase the whole tape. Erasing
239 a tape can take a long time depending on the device and/or tape. Refer to the
240 device specific manual for time details.
246 \fB\fBforcereserve\fR\fR
249 Attempts to break a SCSI II reserve issued by another initiator. When this
250 command completes, the drive is not reserved for the current initiator, but is
251 available for use. This command can be only be executed by those with
252 super-user privileges.
265 Rewinds the tape and, if appropriate, takes the drive unit off-line by
275 Re-establishes the default behavior of releasing at close.
284 Allows the tape drive to remain reserved after closing the device. The drive
285 must then be explicitly released.
291 \fB\fBretension\fR\fR
294 Rewinds the cartridge tape completely, then winds it forward to the end of the
295 reel and back to beginning-of-tape to smooth out tape tension.
313 Prints status information about the tape unit.
315 Status information can include the sense key reported by the drive, the
316 residual and retries for the last operation, the current tape position reported
317 in file number, and the number of blocks from the beginning of that file. It
318 might also report that WORM media is loaded in that drive.
330 All operations were successful.
339 Command was unrecognized or \fBmt\fR was unable to open the specified tape
356 \fB\fB/dev/rmt/*\fR\fR
359 magnetic tape interface
365 \fBtar\fR(1), \fBtcopy\fR(1), \fBar.h\fR(3HEAD), \fBattributes\fR(5),
366 \fBmtio\fR(7I), \fBst\fR(7D)
370 Not all devices support all options. Some options are hardware-dependent. Refer
371 to the corresponding device manual page.
374 \fBmt\fR is architecture sensitive. Heterogeneous operation (that is, SPARC to
375 x86 or the reverse) is not supported.