1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
|
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH MT 1 "Jun 21, 2007"
.SH NAME
mt \- magnetic tape control
.SH SYNOPSIS
.LP
.nf
\fBmt\fR [\fB-f\fR \fItapename\fR] \fIcommand\fR... [\fIcount\fR]
.fi
.SH DESCRIPTION
.LP
The \fBmt\fR utility sends commands to a magnetic tape drive. If \fB-f\fR
\fItapename\fR is not specified, the environment variable \fBTAPE\fR is used.
If \fBTAPE\fR does not exist, \fBmt\fR uses the device \fB/dev/rmt/0n\fR.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-f\fR \fItapename\fR\fR
.ad
.RS 15n
Specifies the raw tape device.
.RE
.SH OPERANDS
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIcount\fR\fR
.ad
.RS 11n
The number of times that the requested operation is to be performed. By
default, \fBmt\fR performs \fIcommand\fR once. Multiple operations of
\fIcommand\fR can be performed by specifying \fIcount\fR.
.RE
.sp
.ne 2
.na
\fB\fIcommand\fR\fR
.ad
.RS 11n
The following available commands that can be sent to a magnetic tape drive are
supported. Only as many characters as are required to uniquely identify a
\fIcommand\fR need be specified.
.sp
.ne 2
.na
\fB\fBasf\fR\fR
.ad
.RS 10n
Specifies absolute space to \fIcount\fR file number. This is equivalent to a
\fBrewind\fR followed by a \fBfsf\fR \fIcount\fR.
.RE
.sp
.ne 2
.na
\fB\fBbsf\fR\fR
.ad
.RS 10n
Back spaces over \fIcount\fR EOF marks. The tape is positioned on the
beginning-of-tape side of the EOF mark.
.RE
.sp
.ne 2
.na
\fB\fBbsr\fR\fR
.ad
.RS 10n
Back spaces \fIcount\fR records.
.RE
.sp
.ne 2
.na
\fB\fBbssf\fR\fR
.ad
.RS 10n
Back spaces over the requested number of sequential file marks. Sequential file
marks are where the file marks are one right after the other with no other
blocks of any kind between the file marks. The number argument specifies how
many sequential file marks to which to space. For example, \fBbssf 4\fR
searches backwards to the first place where there are 4 sequential file marks
and positions to the BOP side of the 4th file mark.
.sp
This command is not supported by all drives.
.RE
.sp
.ne 2
.na
\fB\fBeof\fR\fR
.ad
.br
.na
\fB\fBweof\fR\fR
.ad
.RS 10n
Writes \fIcount\fR EOF marks at the current position on the tape.
.RE
.sp
.ne 2
.na
\fB\fBfsf\fR\fR
.ad
.RS 10n
Forward spaces over \fIcount\fR EOF marks. The tape is positioned on the first
block of the file.
.RE
.sp
.ne 2
.na
\fB\fBfsr\fR\fR
.ad
.RS 10n
Forward spaces \fIcount\fR records.
.RE
.sp
.ne 2
.na
\fB\fBfssf\fR\fR
.ad
.RS 10n
Forward spaces the over requested number of sequential file marks. Sequential
file marks are where the file marks are one right after the other with no other
blocks of any kind between the file marks. The number argument specifies how
many sequential file marks to which to space. For example, \fBfssf 4\fR
searches forwards to the first place where there are 4 sequential file marks
and positions after the 4th file mark.
.sp
This command is not supported by all drives.
.RE
.sp
.ne 2
.na
\fB\fBload\fR\fR
.ad
.RS 10n
Requests drive load and thread current media. Not supported by all drives.
.RE
.sp
.ne 2
.na
\fB\fBlock\fR\fR
.ad
.RS 10n
Prevents media removal.
.RE
.sp
.ne 2
.na
\fB\fBnbsf\fR\fR
.ad
.RS 10n
Back spaces \fIcount\fR files. The tape is positioned on the first block of the
file. This is equivalent to \fIcount+1\fR \fBbsf\fRs followed by one \fBfsf\fR.
.RE
.sp
.ne 2
.na
\fB\fBseek\fR\fR
.ad
.RS 10n
Positions to requested logical tape position.
.RE
.sp
.ne 2
.na
\fB\fBtell\fR\fR
.ad
.RS 10n
Gets and prints current logical tape position.
.RE
.sp
.ne 2
.na
\fB\fBunlock\fR\fR
.ad
.RS 10n
Allows media removal.
.RE
If \fIcount\fR is specified with any of the following commands, the \fIcount\fR
is ignored and the command is performed only once.
.sp
.ne 2
.na
\fB\fBconfig\fR\fR
.ad
.RS 16n
Reads the drives current configuration from the driver and displays it in
\fBst.conf\fR format. See \fBst\fR(4D) for definition of fields and there
meanings.
.RE
.sp
.ne 2
.na
\fB\fBeom\fR\fR
.ad
.RS 16n
Spaces to the end of recorded media on the tape. This is useful for appending
files onto previously written tapes.
.RE
.sp
.ne 2
.na
\fB\fBerase\fR\fR
.ad
.RS 16n
Erases the entire tape.
.sp
Some tape drives have option settings where only portions of the tape can be
erased. Be sure to select the correct setting to erase the whole tape. Erasing
a tape can take a long time depending on the device and/or tape. Refer to the
device specific manual for time details.
.RE
.sp
.ne 2
.na
\fB\fBforcereserve\fR\fR
.ad
.RS 16n
Attempts to break a SCSI II reserve issued by another initiator. When this
command completes, the drive is not reserved for the current initiator, but is
available for use. This command can be only be executed by those with
super-user privileges.
.RE
.sp
.ne 2
.na
\fB\fBoffline\fR\fR
.ad
.br
.na
\fB\fBrewoffl\fR\fR
.ad
.RS 16n
Rewinds the tape and, if appropriate, takes the drive unit off-line by
unloading the tape.
.RE
.sp
.ne 2
.na
\fB\fBrelease\fR\fR
.ad
.RS 16n
Re-establishes the default behavior of releasing at close.
.RE
.sp
.ne 2
.na
\fB\fBreserve\fR\fR
.ad
.RS 16n
Allows the tape drive to remain reserved after closing the device. The drive
must then be explicitly released.
.RE
.sp
.ne 2
.na
\fB\fBretension\fR\fR
.ad
.RS 16n
Rewinds the cartridge tape completely, then winds it forward to the end of the
reel and back to beginning-of-tape to smooth out tape tension.
.RE
.sp
.ne 2
.na
\fB\fBrewind\fR\fR
.ad
.RS 16n
Rewinds the tape.
.RE
.sp
.ne 2
.na
\fB\fBstatus\fR\fR
.ad
.RS 16n
Prints status information about the tape unit.
.sp
Status information can include the sense key reported by the drive, the
residual and retries for the last operation, the current tape position reported
in file number, and the number of blocks from the beginning of that file. It
might also report that WORM media is loaded in that drive.
.RE
.RE
.SH EXIT STATUS
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
All operations were successful.
.RE
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
Command was unrecognized or \fBmt\fR was unable to open the specified tape
drive.
.RE
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
An operation failed.
.RE
.SH FILES
.ne 2
.na
\fB\fB/dev/rmt/*\fR\fR
.ad
.RS 14n
magnetic tape interface
.RE
.SH SEE ALSO
.LP
.BR tar (1),
.BR tcopy (1),
.BR ar.h (3HEAD),
.BR st (4D),
.BR mtio (4I),
.BR attributes (7)
.SH BUGS
.LP
Not all devices support all options. Some options are hardware-dependent. Refer
to the corresponding device manual page.
.sp
.LP
\fBmt\fR is architecture sensitive. Heterogeneous operation (that is, SPARC to
x86 or the reverse) is not supported.
|