CASPUR Tape Dispatcher
Operation
When the server process starts, it parses the configuration file and is
immediately ready to serve the requests from client hosts (only hosts mentioned in the
"DRIVE" statements are served; requests from other hosts are silently ignored).
Server controls
all available drives simultaneously. For each requested drive, it keeps
a "session" with a client which grants this client exclusive rights for
the device.
This session remains active until the client process
interrupts it, or if the client process dies. During the session, client may
mount one or more different tapes on the reserved device.
There are 2 ways to establish a session, let us consider them in detail:
- A
session is established by requesting a tape with a certain VID for a
service with a certain nickname (on a specified drive, or on a first
unused matching drive).
In this case the server:
- Checks whether the request has come from an authorized host.
- Checks whether the tape VID is present in the central configuration file.
- Checks whether the VID "belongs" to the nicknamed service ("usedtapes" file).
- Checks whether the caller host is mentioned in the central configuration
file as having at least one drive of the right type attached (capable to mount the
requested VID), or has access to the explicitly specified drive.
- Puts the session request into the queue.
- Assigns a first available (or explicitly specified) drive of the needed type to the client and
mounts there the requested VID, thus establishing a session.
- Within the session, serves any subsequent mount/unmount requests. For each mount,
client receives an aknowledgement,
complete with the name of physical device and VID mounted on it.
- Marks the resourse as "free", upon completion (or crash) of the client session.
- A session is established by requesting a brand-new tape of a certain type for a service with a certain nickname (on a specified drive, or on a first unused matching drive).
The server in this case has to "generate" the VID (in all other aspects, it operates exactly
as in case 1). That is how it is done:
- The central configuration file is searched for a first not-used tape of the
matching type.
- This tape is then marked as used by a service with the specified nickname in
the "usedtapes" file.
- Thus obtained new VID is then used to create the session.
At any moment, server may be forced to re-read its configuration file by sending a
HUP signal to the server process.
All requests to server and server operations, both failed and successful, are logged.
|