{"id":3554,"date":"2022-12-20T17:09:00","date_gmt":"2022-12-20T20:09:00","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/rmt-man8\/"},"modified":"2022-12-20T17:09:00","modified_gmt":"2022-12-20T20:09:00","slug":"rmt-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/rmt-man8\/","title":{"rendered":"RMT (man8)"},"content":{"rendered":"<h1 align=\"center\">RMT<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#DIAGNOSTICS\">DIAGNOSTICS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#AVAILABILITY\">AVAILABILITY<\/a><br \/> <a href=\"#HISTORY\">HISTORY<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">rmt \u2212 remote magtape protocol module<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>rmt<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Rmt<\/b> is a program used by the remote <b>dump<\/b>(8), <b>restore<\/b>(8) or <b>tar<\/b>(1) programs in manipulating a magnetic tape drive through an interprocess communication connection. <b>Rmt<\/b> is normally started up with an <b>rexec<\/b>(3) or <b>rcmd<\/b>(3) call.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>rmt<\/b> program accepts requests specific to the manipulation of magnetic tapes, performs the commands, then responds with a status indication. All responses are in <b>ASCII<\/b> and in one of the following two forms.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Successful commands have responses of:<\/p>\n<p style=\"margin-left:22%;\"><b>A<\/b><i>number<\/i>n<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">where <i>number<\/i> is an <b>ASCII<\/b> representation of a decimal number.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Unsuccessful commands are responded to with:<\/p>\n<p style=\"margin-left:22%;\"><b>E<\/b><i>error-number<\/i>n<i>error-message<\/i>n<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">where <i>error-number<\/i> is one of the possible error numbers described in <b>intro<\/b>(2) and <i>error-message<\/i> is the corresponding error string as printed from a call to <b>perror<\/b>(3).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The protocol is comprised of the following commands, which are sent as indicated &#8211; no spaces are supplied between the command and its arguments, or between its arguments, and n indicates that a newline should be supplied: <b><br \/> O<\/b><i>device<\/i>n<i>mode<\/i>n<\/p>\n<p style=\"margin-left:22%;\">Open the specified <i>device<\/i> using the indicated <i>mode<\/i>. <i>Device<\/i> is a full pathname and <i>mode<\/i> is an <b>ASCII<\/b> representation of a decimal number suitable for passing to <b>open<\/b>(2). If a device had already been opened, it is closed before a new open is performed.<\/p>\n<p style=\"margin-left:11%;\"><b>C<\/b><i>device<\/i>n<\/p>\n<p style=\"margin-left:22%;\">Close the currently open device. The <i>device<\/i> specified is ignored.<\/p>\n<p style=\"margin-left:11%;\"><b>L<\/b><i>whence<\/i>n<i>offset<\/i>n<\/p>\n<p style=\"margin-left:22%;\">Perform an <b>lseek<\/b>(2) operation using the specified parameters. The response value is that returned from the <b>lseek<\/b> call.<\/p>\n<p style=\"margin-left:11%;\"><b>W<\/b><i>count<\/i>n<\/p>\n<p style=\"margin-left:22%;\">Write data onto the open device. <b>Rmt<\/b> reads <i>count<\/i> bytes from the connection, aborting if a premature end-of-file is encountered. The response value is that returned from the <b>write<\/b>(2) call.<\/p>\n<p style=\"margin-left:11%;\"><b>R<\/b><i>count<\/i>n<\/p>\n<p style=\"margin-left:22%;\">Read <i>count<\/i> bytes of data from the open device. If <i>count<\/i> exceeds the size of the data buffer (10 kilobytes), it is truncated to the data buffer size. <b>Rmt<\/b> then performs the requested <b>read<\/b>(2) and responds with <b>A<\/b><i>count-read<\/i>n if the read was successful; otherwise an error in the standard format is returned. If the read was successful, the data read is then sent.<\/p>\n<p style=\"margin-left:11%;\"><b>I<\/b><i>operation<\/i>n<i>count<\/i>n<\/p>\n<p style=\"margin-left:22%;\">Perform a <b>MTIOCOP ioctl<\/b>(2) command using the specified parameters. The parameters are interpreted as the <b>ASCII<\/b> representations of the decimal values to place in the <b>mt_op<\/b> and <b>mt_count<\/b> fields of the structure used in the <b>ioctl<\/b> call. The return value is the <i>count<\/i> parameter when the operation is successful.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">By issuing the <b>I-1n0n<\/b> command, a client will specify that he is using the VERSION 1 protocol.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">For a VERSION 0 client, the <i>operation<\/i> parameter is the platform <b>mt_op<\/b> value (could be different if the client and the <b>rmt<\/b> server are on two different platforms). For a VERSION 1 client, the <i>operation<\/i> parameter is standardized as below:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>0<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTWEOF<\/b> command (write <i>count<\/i> end-of-file records).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>1<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTFSF<\/b> command (forward space over <i>count<\/i> file marks).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>2<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTBSF<\/b> command (backward space over <i>count<\/i> file marks).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>3<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTFSR<\/b> command (forward space <i>count<\/i> inter-record gaps).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>4<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTBSR<\/b> command (backward space <i>count<\/i> inter-record gaps).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>5<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTREW<\/b> command (rewind).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>6<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTOFFL<\/b> command (rewind and put the drive offline).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>7<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTNOP<\/b> command (no operation, set status only).<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>i<\/b><i>operation<\/i>n<i>count<\/i>n<\/p>\n<p style=\"margin-left:22%;\">Perform an extended <b>MTIOCOP ioctl<\/b>(2) command using the specified parameters. The parameters are interpreted as the <b>ASCII<\/b> representations of the decimal values to place in the <b>mt_op<\/b> and <b>mt_count<\/b> fields of the structure used in the <b>ioctl<\/b> call. The return value is the <i>count<\/i> parameter when the operation is successful. The possible operations are:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>0<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTCACHE<\/b> command (switch cache on).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>1<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTNOCACHE<\/b> command (switch cache off).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>2<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTRETEN<\/b> command (retension the tape).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>3<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTERASE<\/b> command (erase the entire tape).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>4<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTEOM<\/b> command (position to end of media).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>5<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>Issue a <b>MTNBSF<\/b> command (backward space count files to BOF).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"12%\">\n<p><b>S<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Return the status of the open device, as obtained with a <b>MTIOCGET ioctl<\/b> call. If the operation was successful, an \u201cack\u201d is sent with the size of the status buffer, then the status buffer is sent (in binary, which is non-portable between different platforms).<\/p>\n<p style=\"margin-left:11%;\"><b>s<\/b><i>sub-command<\/i><\/p>\n<p style=\"margin-left:22%;\">This is a replacement for the previous <b>S<\/b> command, portable across different platforms. If the open device is a magnetic tape, return members of the magnetic tape status structure, as obtained with a <b>MTIOCGET<\/b> ioctl call. If the open device is not a magnetic tape, an error is returned. If the <b>MTIOCGET<\/b> operation was successful, the numerical value of the structure member is returned in decimal. The following sub commands are supported:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>T<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>return the content of the structure member <b>mt_type<\/b> which contains the type of the magnetic tape device.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>D<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>return the content of the structure member <b>mt_dsreg<\/b> which contains the &#8220;drive status register&#8221;.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>E<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>return the content of the structure member <b>mt_erreg<\/b> which contains the &#8220;error register&#8221;. This structure member must be retrieved first because it is cleared after each <b>MTIOCGET<\/b> ioctl call.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>R<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>return the content of the structure member <b>mt_resid<\/b> which contains the residual count of the last I\/O.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>F<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>return the content of the structure member <b>mt_fileno<\/b> which contains the file number of the current tape position.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>B<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>return the content of the structure member <b>mt_blkno<\/b> which contains the block number of the current tape position.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>f<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>return the content of the structure member <b>mt_flags<\/b> which contains MTF_ flags from the driver.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"1%\">\n<p><b>b<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"68%\">\n<p>return the content of the structure member <b>mt_bf<\/b> which contains the optimum blocking factor.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">Any other command causes <b>rmt<\/b> to exit.<\/p>\n<h2>DIAGNOSTICS <a name=\"DIAGNOSTICS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">All responses are of the form described above.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>rcmd<\/b>(3), <b>rexec<\/b>(3), <i>\/usr\/include\/sys\/mtio.h,<\/i> <b>rdump<\/b>(8), <b>rrestore<\/b>(8)<\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">People should be discouraged from using this for a remote file access protocol.<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>dump\/restore<\/b> backup suit was ported to Linux\u2019s Second Extended File System by Remy Card <card@Linux.EU.Org>. He maintained the initial versions of <b>dump<\/b> (up and including 0.4b4, released in january 1997).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.<\/p>\n<h2>AVAILABILITY <a name=\"AVAILABILITY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>dump\/restore<\/b> backup suit is available from <http:\/\/dump.sourceforge.net><\/p>\n<h2>HISTORY <a name=\"HISTORY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>rmt<\/b> command appeared in 4.2BSD.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  rmt \u2212 remote magtape protocol module <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,674],"class_list":["post-3554","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-rmt"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3554"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3554\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}