SAM-Remote

 

by Mary Ann Lynch and Theron Dekok, University of Calgary

 

SAM-Remote allows files on a local client host to be archived on media in a library on a remote server host. The server host is configured with a file that authenticates clients and specifies a list of VSNs each client may use. The client host’s mcf file is configured with the name of a file that specifies that server name and with pseudo-tape devices. These stand in for the tape library catalog and its drives and allow the client host to construct a tape library catalog of all VSNs that the server host allows it to use. A tape library catalog on the client is built by data transfers from sam-serverd on the server to sam-clientd on the client and is visible in the output of samcmd v. These transfers are initiated by the server when changes are made to the tape library catalog, when the client reboots, or when the server’s configuration file is changed. These transfers are initiated over port 7105 using tcp. Archive data transfers on the client are initiated by sam-arcopy and received by sam-rtfd; sam-rftd daemons also handle remote online disk archiving transfers. Transfers of archive copies also occur via tcp connections to port 7105.

 

Setup of SAM-Remote is straightforward. The master library daemon sam-amld must be stopped and restarted on both client and server after configuration files are updated. This can be done with the commands:

 

# samd stop

# samd config

# samd start

 

If you improperly configure SAM-Remote on a host, you must completely unconfigure it, kill and restart the daemons, and then configure it again completely.

 

Server configuration files

 

The mcf file

 

The server mcf file must contain two SAM-Remote entries: a declaration for an actual tape library directly accessible by the server host, and a declaration that establishes the host as a SAM-Remote server. This latter declaration specifies a file in the directory /etc/opt/SUNWsamfs (in this case rmt200) as the Equipment Identifier, and is of Equipment Type ss. All other entries in the declaration are standard. Any Equipment Ordinal may be used. It does not have to match the Equipment Ordinal on the client. The Family Set Name is the name given to a virtual device, the remote tape library. It may be any suitable string but should be the same on client and server.

 

#Equipment              Eq    Eq    Family      Device       Addl

#Identifier             Ord   Type  Set         State       Params

################################################################## 

#

# Declare QFS file system. At least one SAM-FS or QFS file system must

# be configured on the SAM-Remote server host.

qfs1                    10    ms    qfs1

/dev/dsk/c1t1d0s0       11    md    qfs1

/dev/dsk/c1t1d0s1       12    md    qfs1

 

# SL500 Tape Library declaration. This is the declaration that is used by

# the local host and will also be used by the remote host.

#

/dev/samst/c3t0u0       100   sn    SL500       -    

/dev/rmt/0cbn           101   li    SL500       -

/dev/rmt/1cbn           102   li    SL500       -

#

# The following line configures this host as a SAM-Remote server. The Family Set

# Name of the remote server is remoteserv. This is not the host name of the

# server itself. It is an otherwise unused name that specifies a virtual tape

# library device. It is used on both server and client to refer to the ability

# of the server to provide archiving to remote clients.

# The Equipment Ordinal does not have to match the Equipment

# Ordinal used for SAM-Remote on the client. The file rmt200 contains entries

# that will authenticate clients and configure the VSNs they are allowed to use.

# This file may have any name.

 

/etc/opt/SUNWsamfs/rmt200     50    ss    remoteserv  -

 

The file /etc/opt/SUNWsamfs/rmt200

 

The /etc/opt/SUNWsamfs/rmt200 file (or other name designated in the mcf file) on the server authenticates the client and specifies the tapes in the tape library that can be used by the client. Once the client starts SAM-Remote, its sam-clientd daemon requests the list of VSNs, which it uses to build a tape library catalog. The daemon sam-serverd on the server transfers the list of available VSNs to the client. The file should be located in /etc/opt/SUNWsamfs. The name of the file (here, rmt200) is up to the administrator.

 

The format of this file varies from that in other SAM files: here spacing is important. The name of each client to be supported on the server must begin in the first character of a line. That line can contain no other entry than the name (or IP address) of the client. Configuration lines following each client’s name must all be indented with a tab or other whitespace.

 

The keyword “media” comes after the name of the client and after any configuration parameters desired. Following that keyword is the Equipment Ordinal of the tape library on the server, followed by the equipment type identifier of the drives in the library, followed by the list of VSNs that may be used by the client. Extended regular expressions (including “.*” although it is not a good idea) may be used to specify more than one VSN. You MUST use regular expressions if you want to assign more than one VSN to a client.  Separating VSNs with commas will not work. Despite what the documentation says, you do not have to put parentheses around the list of VSNs even if they include obvious regular expressions.

 

The rules for client archiving are governed by the client archiver.cmd file, not by the server archiver.cmd file. If you allow multiple clients or a client and a server to write to the same VSNs you can therefore end up with conflicts. In particular, if archive set copies on the server are governed by the “-reserve set” parameter, only one archive set copy will write to any VSN in that server’s tape library. But if there is a similar directive in the client archiver.cmd file, that directive will not cause the client avoid using the VSNs used by the server’s archive set copies. It is important, therefore, to specify non-overlapping sets of VSNs for the client and server if you wish to reserve VSNs for use by only one archive set copy.

 

# The following lines are placed in the server’s remote configuration file. They # authenticate a client called “steamboat” and allow it to use the VSNs 000003

# and 000004, of type equipment type li.

#

# The name of the client begins in the first space of the line

# The keywords “media” and “endmedia” and the VSN specifications are indented.

# These configuration properties are required.

 

steamboat

      media

      100   li    000003|000004

      endmedia

 

This example authenticates the client whose IP address resolves to the name “steamboat” in the server’s /etc/inet/hosts file. Such authentication provides no significant security, and is used only to control client use of the server. That client can use the tape library whose Equipment Ordinal is 100. It may use only the VSNs 000003 and 000004 in the VSN Association section of its archiver.cmd file. Normally those VSNs would not be used in the server’s archiver.cmd file, so that there is complete separation of client and server files on VSNs.

 

Client configuration files

 

The mcf file

 

This example of an mcf file specifies a remote tape library for use by the client host. The Family Set for the tape library includes a device name that actually points to a configuration file containing the name (or IP address) of the server. The equipment type of this device is always “sc.” The tape drives are designated /dev/samrd/rd0, /dev/samrd/rd1, /dev/samrd/rd2 etc. These are virtual devices of equipment type “rd” that map to the first, second, third etc. instances of tape drives on the remote tape library. You can declare one or more tape drives in the mcf file, depending on how many there are in the tape library, and how many you want the client to be able to use. If the library has ten drives but the client’s mcf file specifies only one, the client’s archiving will be able to use only one drive. Since the number of drives used by a particular archive set can be configured elsewhere, it does not usually make sense to specify fewer than all available drives.

 

The remainder of the tape library declaration is like that for any other tape library. The library and drives must be assigned a Family Set Name and Equipment Ordinals like any other mass storage device. This Family Set Name must be the same as that used in the mcf file for the remote server. You can assign a location for the tape library catalog or use the default location in /var/opt/SUNWsamfs/catalog. Once SAM-Remote is set up, the catalog for the VSNs allocated to remote archiving on the server will be visible in the output of samcmd v on the client.

 

#Equipment              Eq    Eq    Family      Device       Addl

#Identifier             Ord   Type  Set         State       Params

##################################################################

# Declare QFS file system.

qfs1                    10    ms    qfs1

/dev/dsk/c1t1d0s0       11    md    qfs1

/dev/dsk/c1t1d0s1       12    md    qfs1

#

# SAM-Remote client declaration

#

/etc/opt/SUNWsamfs/rmt200 200 sc remoteserv - /var/opt/SUNWsamfs//catalog/tcat

/dev/samrd/rd0            201 rd remoteserv -

/dev/samrd/rd1            202 rd remoteserv -  

#

 

The file /etc/opt/SUNWsamfs/rmt200

 

This file contains only one entry: the name (or IP address) of the SAM-Remote server. The name of the file itself is up to the administrator, and is declared in the Equipment Name field of the mcf file. In this file the same name has been used for the SAM-remote file on the client and server, but this is done only to correlate the files. Any names are acceptable.

 

The archiver.cmd file

 

An archiver.cmd file for a client host running SAM-Remote. The VSN specified for archive set all.1 is on the remote server host. There is nothing in this file to indicate that archiving will be done remotely.

 

#Global Parameters

interval = 20s

archivemeta = off

# File system directives

fs = qfs1

logfile = /var/opt/SUNWsamfs/samfs1-log

all .

        1       10s

#VSN Associations

vsns

all.1           li      000003     

endvsns

 

 

Hosted by www.Geocities.ws

1