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