1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" $Id: rmt.8.in,v 1.10 2003/03/30 15:40:40 stelian Exp $
30 .TH RMT 8 "version __VERSION__ of __DATE__" BSD "System management commands"
32 rmt \- remote magtape protocol module
37 is a program used by the remote
42 programs in manipulating a magnetic tape drive through an interprocess
43 communication connection.
45 is normally started up with an
53 program accepts requests specific to the manipulation of magnetic tapes,
54 performs the commands, then responds with a status indication. All responses
57 and in one of the following two forms.
59 Successful commands have responses of:
68 representation of a decimal number.
70 Unsuccessful commands are responded to with:
72 .B E\fIerror-number\fR\en\fIerror-message\fR\en
77 is one of the possible error numbers described in
81 is the corresponding error string as printed from a call to
84 The protocol is comprised of the following commands, which are sent as
85 indicated - no spaces are supplied between the command and its arguments, or
86 between its arguments, and \en indicates that a newline should be supplied:
88 .B O\fIdevice\fR\en\fImode\fR\en
94 is a full pathname and
98 representation of a decimal number suitable for passing to
100 If a device had already been opened, it is closed before a new open is
104 Close the currently open device. The
106 specified is ignored.
108 .B L\fIwhence\fR\en\fIoffset\fR\en
111 operation using the specified parameters. The response value is that returned
117 Write data onto the open device.
121 bytes from the connection, aborting if a premature end-of-file is encountered.
122 The response value is that returned from the
129 bytes of data from the open device. If
131 exceeds the size of the data buffer (10 kilobytes), it is truncated to the
134 then performs the requested
137 .B A\fIcount-read\fR\en
138 if the read was successful; otherwise an error in the standard format is
139 returned. If the read was successful, the data read is then sent.
141 .B I\fIoperation\fR\en\fIcount\fR\en
145 command using the specified parameters. The parameters are interpreted as the
147 representations of the decimal values to place in the
151 fields of the structure used in the
153 call. The return value is the
155 parameter when the operation is successful.
159 command, a client will specify that he is using the VERSION 1 protocol.
161 For a VERSION 0 client, the
163 parameter is the platform
165 value (could be different if the client and the
167 server are on two different platforms). For a VERSION 1 client, the
169 parameter is standardized as below:
177 end-of-file records).
182 command (forward space over
189 command (backward space over
196 command (forward space
203 command (backward space
215 command (rewind and put the drive offline).
220 command (no operation, set status only).
223 .B i\fIoperation\fR\en\fIcount\fR\en
227 command using the specified parameters. The parameters are interpreted as the
229 representations of the decimal values to place in the
233 fields of the structure used in the
235 call. The return value is the
237 parameter when the operation is successful. The possible operations are:
243 command (switch cache on).
248 command (switch cache off).
253 command (retension the tape).
258 command (erase the entire tape).
263 command (position to end of media).
268 command (backward space count files to BOF).
272 Return the status of the open device, as obtained with a
275 call. If the operation was successful, an \*(lqack\*(rq is sent with the size
276 of the status buffer, then the status buffer is sent (in binary, which is
277 non-portable between different platforms).
280 This is a replacement for the previous
282 command, portable across different platforms. If the open device is a magnetic
283 tape, return members of the magnetic tape status structure, as obtained with a
285 ioctl call. If the open device is not a magnetic tape, an error is returned. If
288 operation was successful, the numerical value of the structure member is
289 returned in decimal. The following sub commands are supported:
293 return the content of the structure member
295 which contains the type of the magnetic tape device.
298 return the content of the structure member
300 which contains the "drive status register".
303 return the content of the structure member
305 which contains the "error register". This structure member must be retrieved
306 first because it is cleared after each
311 return the content of the structure member
313 which contains the residual count of the last I/O.
316 return the content of the structure member
318 which contains the file number of the current tape position.
321 return the content of the structure member
323 which contains the block number of the current tape position.
326 return the content of the structure member
328 which contains MTF_ flags from the driver.
331 return the content of the structure member
333 which contains the optimum blocking factor.
336 Any other command causes
340 All responses are of the form described above.
344 .I /usr/include/sys/mtio.h,
348 People should be discouraged from using this for a remote file access protocol.
352 backup suit was ported to Linux's Second Extended File System by Remy Card
353 <card@Linux.EU.Org>. He maintained the initial versions of
355 (up and including 0.4b4, released in january 1997).
357 Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.
361 backup suit is available from <http://dump.sourceforge.net>
365 command appeared in 4.2BSD.