This chapter explains how to configure the RMT (Remote Magnetic Tape) server, and how to use RMTALLOC (the RMT client) with tape drives and CD-ROM drives.
The MultiNet remote magnetic tape server (RMT) uses the BSD RMT protocol to allow UNIX and PC users to access tape drives on OpenVMS systems. Most systems derived from BSD 4.2 and 4.3 support the rdump and rrestore commands for accessing tape drives served by RMT.
To enable and configure the MultiNet RMT server:
1. Make sure RSHELL works from the UNIX Operating system user root to the OpenVMS user ROOT. If no OpenVMS user ROOT exists, the RMT server uses the OpenVMS user SYSTEM.
Note! For ROOT and SYSTEM, the system-wide MULTINET:HOSTS.EQUIV file is ignored and an explicit entry in SYS$LOGIN:.RHOSTS is required to grant access.
2. Make sure the ROOT/SYSTEM LOGIN.COM and the system-wide SYLOGIN.COM do not print anything when you issue remote RSHELL (under OpenVMS) or rsh (under the UNIX Operating System or on PCs) commands. Anything written to SYS$OUTPUT from these command procedures interferes with the RMT protocol.
The following example shows commands that prevent output from being displayed by SYSTEM/ROOT LOGIN.COM and SYLOGIN.COM.
$ VERIFY = 'F$VERIFY(0) ! Turn off verify without echoing
$ IF F$MODE() .EQS. "OTHER" THEN EXIT ! If a
DETACHED process (RSHELL) . .
. $
IF VERIFY THEN SET VERIFY ! If a batch job, may want to turn
! verify back on.
You can specify either UNIX- or OpenVMS-style magtape device names or an OpenVMS file name for writing to a disk file.
When you specify UNIX-style names, options are encoded in the unit number (minor device number). The correspondence between the options and their associated unit numbers is as follows:
Device |
Options |
||||
mt0 through mt3 |
/NOMOUNT |
/STREAM |
/DENS=800 |
/REWIND |
/NOUNLOAD |
mt4 through mt7 |
/NOMOUNT |
/STREAM |
/DENS=800 |
/NOREWIND |
/NOUNLOAD |
mt8 through mt11 |
/NOMOUNT |
/STREAM |
/DENS=160 |
/REWIND |
/NOUNLOAD |
mt12 through mt15 |
/NOMOUNT |
/STREAM |
/DENS=160 |
/NOREWIND |
/NOUNLOAD |
mt16 through mt19 |
/NOMOUNT |
/STREAM |
/DENS=625 |
/REWIND |
/NOUNLOAD |
mt20 through mt23 |
/NOMOUNT |
/STREAM |
/DENS=625 |
/NOREWIND |
/NOUNLOAD |
rmt0 through rmt3 |
/NOMOUNT |
/NOSTREAM |
/DENS=800 |
/REWIND |
/NOUNLOAD |
rmt4 through rmt7 |
/NOMOUNT |
/NOSTREAM |
/DENS=800 |
/NOREWIND |
/NOUNLOAD |
rmt8 through rmt11 |
/NOMOUNT |
/NOSTREAM |
/DENS=16 |
/REWIND |
/NOUNLOAD |
rmt12 through rmt15 |
/NOMOUNT |
/NOSTREAM |
/DENS=16 |
/NOREWIND |
/NOUNLOAD |
rmt16 through rmt19 |
/NOMOUNT |
/NOSTREAM |
/DENS=62 |
/REWIND |
/NOUNLOAD |
rmt20 through rmt23 |
/NOMOUNT |
/NOSTREAM |
/DENS=62 |
/NOREWIND |
/NOUNLOAD |
The OpenVMS tape drive name is chosen automatically as the first tape drive, or you can set it using the NET-CONFIG SET DEFAULT-RMT-TAPE-DEVICE command.
When you specify OpenVMS-style names, the options are encoded in qualifiers; the exact format is: vms_node_name:volume_name[/qualifiers[...]]
For example:
# rdump 0f abc.com:/dev/rmt8 /usr
or:
# rdump 0f abc.com:mua0:/nomount/nostream /dens=1600/nounload /USR
or:
# rdump 0f abc.com:mua0:xxx/nostream /dens=1600/nounload \
/comment="Please mount volume XXX on drive mua0" /usr
The table below lists the qualifiers available for OpenVMS tape drive names.
Qualifiers |
Description |
/BLOCKSIZE=size |
Block size at which to write the tape. Default: 65534 bytes. |
/DENSITY=density |
Specifies the density at which to write a tape. Default: current density. |
/[NO]REWIND |
Specifies whether to rewind the drive on close; ignored unless /NOMOUNT is specified. Default: /REWIND. |
/[NO]UNLOAD |
Specifies whether to unload the drive on close. Default: /UNLOAD. |
/COMMENT="string" |
Comment to display in the remote OPCOM message, either appended to or replacing the default text, depending on the resulting string length being less than the 78-character maximum. This message is the only opportunity to send a tape-specific message to the remote operator. (MOUNT/COMMENT strings are not passed to a remote system.) Because RMTALLOC will not complete until a tape has been loaded and the drive is online, use COMMENT to make sure the operator is aware of your request. |
/[NO]MOUNT |
Mounts the tape drive using the OpenVMS MOUNT service.
/NOMOUNT accesses the tape drive without mounting it. This qualifier is used for UNIX utilities which expect the tape drive to hold its current position (not rewind) if they close it. By not mounting it, the tape drive does not rewind when dismounted. Default: /MOUNT. |
/[NO]STREAMING |
Accesses the tape drive as a sequential device (a UNIX character device). /NOSTREAMING accesses the tape drive as a raw device (a UNIX block device). Default: /STREAMING. |
The RMT client MULTINET RMTALLOC is used for accessing tape or CD-ROM drives on remote hosts over TCP (using RSHELL). If restrictions apply where RSHELL does not work, or if RSHELL outputs spurious login messages or greetings, RMTALLOC does not work. RMTALLOC depends on an RMT server to function properly. RMTALLOC creates a pseudo device that appears as an OpenVMS physical device to the OpenVMS BACKUP, COPY, and other utilities. The pseudo device is named RMTx:, x is the unit number. The actual tape or CD-ROM drive can be on another MultiNet OpenVMS system or on any host running the RMT server, such as those running the BSD or SunOS UNIX operating system.
For CD-ROM, RMTALLOC treats the drive as a file system, which speeds file access.
There are some limits to the types of tape devices you can access on other operating systems and the amount of control available. Because UNIX tapes and tape drivers cannot write variable-length blocks and do not allow skipping forward over records between read operations, they cannot be used with OpenVMS BACKUP or COPY commands.
The following list describes known limitations of common UNIX devices and software:
· UNIX QIC tape drives cannot be used.
· SunOS RMT servers require you to use /UNIX_SERVER=BROKEN so you can back up one single-volume BACKUP saveset. Use BACKUP/REWIND to copy to or from tape.
· ULTRIX RMT servers require you to use /UNIX_SERVER=ULTRIX to obtain full OpenVMS tape functionality.
· SGI's IRX RMT server (as of 4.0.5) does not interoperate with OpenVMS tape operations.
· IBM RS6000/AIX requires a special translation on the IBM side because IBM uses incompatible RMT commands.
To use RMTALLOC:
1. Make sure the media is in the drive and the drive is
online. If you verify this, use the
/SEMANTICS=(COMMENT=comment)
qualifier to inform the remote VMS operator of a pending device mount.
2. Allocate the drive with RMTALLOC.
3. Mount the tape or CD-ROM drive. Use the same MOUNT command you would for a VMS device.
4. Read from or write to the tape, or read the information from the CD-ROM.
5. Dismount the tape or CD-ROM drive.
6. Deallocate the tape or CD-ROM drive.
7. Remove the media from the drive.
In its simplest form, you can specify RMTALLOC as follows:
$ MULTINET RMTALLOC hostname::devicename
For example, for a tape device, enter:
$ RMTALLOC SFO.EXAMPLE.COM::MUA0: MYTAPE
For a CD-ROM drive, enter:
$ RMTALLOC /CD CONTROL::DISK$CD: MYCD /USER=SYSTEM
These examples are explained further in the following sections.
The following example shows how to allocate a tape drive and write to tape using the OpenVMS TAR utility:
$ RMTALLOC BOS.EXAMPLE.COM::MUA0: MYTAPE
%RMT-I-ALLOC, _MYSYS$RMT1: allocated (BOS.EXAMPLE.COM::MUA0:)
$ MOUNT /FOREIGN /RECORD_SIZE=512 /BLOCK_SIZE=10240 MYTAPE
%MOUNT-I-MOUNTED, MYTAPE mounted on _MYSYS$RMT1:
$ TAR /ARCHIVE=MYTAPE WRITE AFILE.TXT
%TAR-S-WRITTEN, written USERS:[ME]AFILE.TXT;1 (13495 bytes)
%TAR-S-TOTWRITE, total of 1 file written
$ DISMOUNT _MYSYS$RMT1:
$ DEALLOCATE _MYSYS$RMT1:
In this example, the host BOS.EXAMPLE.COM contains the tape drive. The two colons separating the host name follow the style of DECnet device specifications; RMTALLOC accepts either single or double colon separators. MYTAPE is the tape logical name associated with the pseudo device. In the MOUNT statement, the /FOREIGN qualifier specifies that the device is not file structured.
In the first example, a CD-ROM on an OpenVMS host is accessed from another OpenVMS host:
$ RMTALLOC/CD/NOWRITE CONTROL::DISK$CD: MYCD
/USERNAME=SYSTEM
%RMT-I-ALLOC, _MYSYS$RCD3: allocated (BOS.EXAMPLE.COM::DISK$CD:)
$ MOUNT/OVERRIDE=ID MYCD:
%MOUNT-I-WRITELOCK, volume is write locked
%MOUNT-I-MOUNTED, VMS055LST1 mounted on _MYSYS$RCD3:
Read from the CD-ROM drive, then dismount and deallocate the drive:
$ DISMOUNT MYCD:
$ DEALLOCATE MYCD:
In this example:
· The RMTALLOC statement includes the /CD qualifier to indicate the device is a CD-ROM drive.
· The /NOWRITE qualifier is the default whenever you specify /CD; omitting it indicates the device is read-only.
· CONTROL: is the host on which the CD-ROM is located.
· DISK$CD: is the drive name.
· MYCD is the device name.
· The /USER=SYSTEM qualifier ensures the SYSTEM account is accessed on the remote host. (If the remote host is an OpenVMS system, the account used must have LOG_IO privilege.)
· The /MOUNT command uses the /OVERRIDE=ID qualifier to inhibit MOUNT protection checks of the volume identifier in the CD-ROM label.
· The DISMOUNT and DEALLOCATE commands are used after information is read from the CD-ROM.
In the next example, a CD-ROM drive on a UNIX host is accessed:
$ RMTALLOC/CD/NOWRITE
UNIXBOX::"/dev/rsr1" MYCD /USERNAME=root
%RMT-I-ALLOC, _MYSYS$RCD3: allocated (UNIXBOX.EXAMPLE.COM::/dev/rsr0)
$ MOUNT/OVERRIDE=ID MYCD:
%MOUNT-I-WRITELOCK, volume is write locked
%MOUNT-I-MOUNTED, VMS055LST2 mounted on _MYSYS$RCD3:
Read from the CD-ROM drive, then dismount and deallocate the drive:
$ DISMOUNT MYCD:
$ DEALLOCATE MYCD:
In this example, the RMTALLOC statement contains the name of the UNIX host (UNIXBOX) that has the CD-ROM drive. The device name is specified in UNIX style. If the device name is not specified, the default is the /dev/rsr0 device.
The user name is set to the root login, which is a UNIX login similar to the OpenVMS SYSTEM login. The MOUNT, DISMOUNT, and DEALLOCATE commands are the same whether the CD-ROM is on another OpenVMS system or a UNIX host.
RMTALLOC qualifiers, apart from those already discussed (/CD, /NOWRITE, and /USERNAME), provide the following additional features:
· VMS-to-VMS negotiation
· Remote operator interaction
· Remote login control
· Message suppression
· Write protection
When accessing a drive on an OpenVMS host, if both systems are running MultiNet, RMT uses an improved protocol to transfer OpenVMS device attributes and I/O completion status values between your system and the remote host. Because this negotiation is compatible with UNIX Operating System implementations of RMT (including BSD and SunOS), it is enabled by default. You may disable it with the RMTALLOC /NOVMS_ATTRIBUTES qualifier if compatibility problems arise.
Use the /NOLOG qualifier to suppress system status messages. Use this option in DCL command procedures to prevent the messages from displaying. /LOG is the default.
Use the /PASSWORD qualifier to specify a password for the remote host when you do not have a .RHOSTS file. This qualifier poses a security risk because the password is transmitted over the network as plain text. When you use /PASSWORD, the REXEC server (instead of the RSHELL server) is called on the remote host. The password is in the format used by the system you are contacting.
Similarly, use the /USERNAME qualifier to specify the login name to access on the remote system. On a UNIX system, the specified login must exist in the /etc/passwd file.
Use the /TRUNCATE_USERNAME qualifier to truncate an OpenVMS user name to a maximum of eight characters for use with some UNIX systems.
Use the /SEMANTICS qualifier only with tape drive access to interact with the operator of the remote system or to specify tape drive information to the remote system.
Use the optional BLOCKSIZE and DENSITY values to specify information used by the remote system to read the tape. All other values send messages to the operator via the OPCOM message facility. Without specifying any values, the following information is displayed when RMTALLOC is called:
%%%%%%%%%%% OPCOM date time %%%%%%%%%%%
FROM NODE nodename AT date time
REQUEST nn, FROM USER username ON nodename
Please mount device _nodename$devicename:
RMT tape service request from nodename.domain
The COMMENT value is specified as a string enclosed in double-quotes; the information is displayed in the remote OPCOM message, either appended to or replacing the default text depending on whether the resulting length is less than the 78-character maximum. Supplying the COMMENT value is the only way you can send a tape-specific message to the remote operator. The OPCOM message from the DCL MOUNT/COMMENT command is not passed to the remote RMT server; this message is only sent to OPCOM for a local operation. The default RMTALLOC command mounts the remote tape foreign, causing an OPCOM message to be generated if the tape drive is offline.
Note! The RMTALLLOC /SEMANTICS=NOMOUNT command does not work correctly with multivolume BACKUP savesets.
Use the /WRITE qualifier to make sure that write protection is respected; /NOWRITE is the default for CD-ROM drives.
By default, RMTALLOC mounts a remote tape drive for read-write access. If the remote tape drive is physically protected from write access, you must use /NOWRITE to indicate you want read-only access to the tape drive. Otherwise, the remote UNIX RMT server usually returns an error indicating "Permission Denied."