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.8 2002/04/15 11:57:29 stelian Exp $
39 .Nd remote magtape protocol module
44 is a program used by the remote
49 programs in manipulating a magnetic tape drive through an interprocess
50 communication connection.
52 is normally started up with an
60 program accepts requests specific to the manipulation of magnetic tapes,
61 performs the commands, then responds with a status indication.
64 and in one of the following two forms.
66 Successful commands have responses of:
67 .Bd -filled -offset indent
69 .Sy A Ar number No \en
77 representation of a decimal number.
79 Unsuccessful commands are responded to with:
80 .Bd -filled -offset indent
82 .Xo Sy E Ar error-number
83 .No \en Ar error-message
91 is one of the possible error numbers described in
95 is the corresponding error string as printed from a call to
98 The protocol is comprised of the
99 following commands, which are sent as indicated - no spaces are supplied
100 between the command and its arguments, or between its arguments, and
102 indicates that a newline should be supplied:
105 .It Xo Sy \&O Ar device
106 .No \en Ar mode No \en
114 is a full pathname and
118 representation of a decimal number suitable for passing to
120 If a device had already been opened, it is closed before a
121 new open is performed.
123 .It Xo Sy C Ar device No \en
126 Close the currently open device. The
128 specified is ignored.
137 operation using the specified parameters.
138 The response value is that returned from the
142 .It Sy W Ar count No \en
144 Write data onto the open device.
148 bytes from the connection, aborting if a premature end-of-file is encountered.
149 The response value is that returned from the
153 .It Sy R Ar count No \en
157 bytes of data from the open device.
160 exceeds the size of the data buffer (10 kilobytes), it is
161 truncated to the data buffer size.
163 then performs the requested
167 .Sy A Ar count-read No \en
169 if the read was successful; otherwise an error in the standard format
170 is returned. If the read was successful, the data read is then sent.
172 .It Xo Sy I Ar operation
173 .No \en Ar count No \en
179 command using the specified parameters. The parameters are interpreted as the
181 representations of the decimal values to place in the
185 fields of the structure used in the
187 call. The return value is the
189 parameter when the operation is successful.
193 command, a client will specify that he is using the VERSION 1 protocol.
195 For a VERSION 0 client, the
197 parameter is the platform
199 value (could be different if the client and the
201 server are on two different platforms). For a VERSION 1 client,
204 parameter is standardized as below:
207 Issue a MTWEOF command (write
209 end-of-file records).
211 Issue a MTFSF command (forward space over
215 Issue a MTBSF command (backward space over
219 Issue a MTFSR command (forward space
223 Issue a MTBSR command (backward space
227 Issue a MTREW command (rewind).
229 Issue a MTOFFL command (rewind and put the drive offline).
231 Issue a MTNOP command (no operation, set status only).
234 .It Xo Sy i Ar operation
235 .No \en Ar count No \en
241 command using the specified parameters.
242 The parameters are interpreted as the
244 representations of the decimal values to place in the
248 fields of the structure used in the
250 call. The return value is the
252 parameter when the operation is successful.
253 The possible operations are:
256 Issue a MTCACHE command (switch cache on).
258 Issue a MTNOCACHE command (switch cache off).
260 Issue a MTRETEN command (retension the tape).
262 Issue a MTERASE command (erase the entire tape).
264 Issue a MTEOM command (position to end of media).
266 Issue a MTNBSF command (backward space count files to BOF).
272 Return the status of the open device, as
276 call. If the operation was successful,
277 an ``ack'' is sent with the size of the
278 status buffer, then the status buffer is
279 sent (in binary, which is non-portable between different platforms).
281 .It Xo Sy s Ar sub-command
284 This is a replacement for the previous S command, portable across different
285 platforms. If the open device is a magnetic tape, return members of the
286 magnetic tape status structure, as obtained with a
288 ioctl call. If the open device is not a magnetic tape, an error is returned.
291 operation was successful, the numerical value of the structure member is
292 returned in decimal. The following sub commands are supported:
295 return the content of the structure member
297 which contains the type of the magnetic tape device.
299 return the content of the structure member
301 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
310 return the content of the structure member
312 which contains the residual count of the last I/O.
314 return the content of the structure member
316 which contains the file number of the current tape position.
318 return the content of the structure member
320 which contains the block number of the current tape position.
322 return the content of the structure member
324 which contains MTF_ flags from the driver.
326 return the content of the structure member
328 which contains the optimum blocking factor.
333 Any other command causes
337 All responses are of the form described above.
341 .Xr /usr/include/sys/mtio.h ,
345 People should be discouraged from using this for a remote
346 file access protocol.
350 backup suit was ported to Linux's Second Extended File System
351 by Remy Card <card@Linux.EU.Org>. He maintained the initial versions
352 of dump (up and including 0.4b4, released in january 1997).
354 Starting with 0.4b5, the new maintainer is Stelian Pop
356 <stelian@popies.net>.
360 backup suit is available from
362 http://dump.sourceforge.net