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. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" $Id: rmt.8.in,v 1.9 2002/07/24 14:12:01 stelian Exp $
34 .TH RMT 8 "version __VERSION__ of __DATE__" BSD "System management commands"
36 rmt \- remote magtape protocol module
41 is a program used by the remote
46 programs in manipulating a magnetic tape drive through an interprocess
47 communication connection.
49 is normally started up with an
57 program accepts requests specific to the manipulation of magnetic tapes,
58 performs the commands, then responds with a status indication. All responses
61 and in one of the following two forms.
63 Successful commands have responses of:
72 representation of a decimal number.
74 Unsuccessful commands are responded to with:
76 .B E\fIerror-number\fR\en\fIerror-message\fR\en
81 is one of the possible error numbers described in
85 is the corresponding error string as printed from a call to
88 The protocol is comprised of the following commands, which are sent as
89 indicated - no spaces are supplied between the command and its arguments, or
90 between its arguments, and \en indicates that a newline should be supplied:
92 .B O\fIdevice\fR\en\fImode\fR\en
98 is a full pathname and
102 representation of a decimal number suitable for passing to
104 If a device had already been opened, it is closed before a new open is
108 Close the currently open device. The
110 specified is ignored.
112 .B L\fIwhence\fR\en\fIoffset\fR\en
115 operation using the specified parameters. The response value is that returned
121 Write data onto the open device.
125 bytes from the connection, aborting if a premature end-of-file is encountered.
126 The response value is that returned from the
133 bytes of data from the open device. If
135 exceeds the size of the data buffer (10 kilobytes), it is truncated to the
138 then performs the requested
141 .B A\fIcount-read\fR\en
142 if the read was successful; otherwise an error in the standard format is
143 returned. If the read was successful, the data read is then sent.
145 .B I\fIoperation\fR\en\fIcount\fR\en
149 command using the specified parameters. The parameters are interpreted as the
151 representations of the decimal values to place in the
155 fields of the structure used in the
157 call. The return value is the
159 parameter when the operation is successful.
163 command, a client will specify that he is using the VERSION 1 protocol.
165 For a VERSION 0 client, the
167 parameter is the platform
169 value (could be different if the client and the
171 server are on two different platforms). For a VERSION 1 client, the
173 parameter is standardized as below:
181 end-of-file records).
186 command (forward space over
193 command (backward space over
200 command (forward space
207 command (backward space
219 command (rewind and put the drive offline).
224 command (no operation, set status only).
227 .B i\fIoperation\fR\en\fIcount\fR\en
231 command using the specified parameters. The parameters are interpreted as the
233 representations of the decimal values to place in the
237 fields of the structure used in the
239 call. The return value is the
241 parameter when the operation is successful. The possible operations are:
247 command (switch cache on).
252 command (switch cache off).
257 command (retension the tape).
262 command (erase the entire tape).
267 command (position to end of media).
272 command (backward space count files to BOF).
276 Return the status of the open device, as obtained with a
279 call. If the operation was successful, an \*(lqack\*(rq is sent with the size
280 of the status buffer, then the status buffer is sent (in binary, which is
281 non-portable between different platforms).
284 This is a replacement for the previous
286 command, portable across different platforms. If the open device is a magnetic
287 tape, return members of the magnetic tape status structure, as obtained with a
289 ioctl call. If the open device is not a magnetic tape, an error is returned. If
292 operation was successful, the numerical value of the structure member is
293 returned in decimal. The following sub commands are supported:
297 return the content of the structure member
299 which contains the type of the magnetic tape device.
302 return the content of the structure member
304 which contains the "drive status register".
307 return the content of the structure member
309 which contains the "error register". This structure member must be retrieved
310 first because it is cleared after each
315 return the content of the structure member
317 which contains the residual count of the last I/O.
320 return the content of the structure member
322 which contains the file number of the current tape position.
325 return the content of the structure member
327 which contains the block number of the current tape position.
330 return the content of the structure member
332 which contains MTF_ flags from the driver.
335 return the content of the structure member
337 which contains the optimum blocking factor.
340 Any other command causes
344 All responses are of the form described above.
348 .I /usr/include/sys/mtio.h,
352 People should be discouraged from using this for a remote file access protocol.
356 backup suit was ported to Linux's Second Extended File System by Remy Card
357 <card@Linux.EU.Org>. He maintained the initial versions of
359 (up and including 0.4b4, released in january 1997).
361 Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.
365 backup suit is available from <http://dump.sourceforge.net>
369 command appeared in 4.2BSD.