Silicon Graphics, Inc.
OpenVault
Administrative Interface
Command Line Interface Design

$Id: admin_intf.html,v 1.18 1997/09/24 16:51:19 tut Exp $

Overview/high level goals

This module provides a user interface which allows OpenVault administrators and operators to control and administer the OpenVault system. Main functions are:

The administrative interface to OpenVault has two major components. These are the User Interface (UI) and the Administrative Application Interface (AAPI). The initial UI will be provided through commands that are issued from standard UNIX shells. This will allow the OpenVault system to be monitored and controlled from a simple ASCII terminal and also allow procedural scripts (shell scripts) to be used to automate repetitive functions. The AAPI defines the language and functions that will be provided by the core OpenVault server to accept and respond to the information and control requests of users through the UI. The UI application programs will call the AAPI functions to service user requests. The AAPI is intended to be an internal interface only.

This interface is intended to serve as a layer for an administrative GUI to be developed later. Alternatively, the administrative GUI may call AAPI functions directly.

Decisions/assumptions/limitations

A simple interface is needed as soon as possible, but the requirements of this interface will likely change as the product develops. Code optimizations are not important as this is both human interface code and device control code -- the largest delays will come from waiting for input from a human being or the physical movement of a library or drive. The code will thus be written as simply as possible with the goal of allowing extremely simple modification and addition of new commands. Standard Unix command line formats and man pages will be used.

Administrative functions will be separated into those required for routine operations (operator functions) and those for higher level control (administrator functions). The administrator will be a "super user" client with authorization to perform all operations on all clients.

Functional specification

Functions to be provided in admin User Interface (UI):

Operator functions:

Status functions:
Data entry functions:
Operating functions:

Administrator functions:

Output:

The output of the UI commands will be columnar in format to allow clear viewing of data and simple extraction of data by shell scripts. Error outputs will be preceded by ov_system codes to enable automatic detection and issuance of operator alerts.

Other functions:

Diagnostics and maintenance of libraries and drives will not be performed under OpenVault control as these functions are likely too device specific to be performed by a generic controlling system. Operators will command the device to off-line status before performing these functions. If these functions require on-line operations, then the operator will need to log-on to the host computer for the device and perform the operations directly on that machine. When these operations are completed, the operator will command the devices back on-line with the above OpenVault commands.

Note that initial startup and shutdown of LCPs and DCP's is normally controlled by init daemons on the host computer for each device.


Detailed Function Specifications

  • ov_stat

    usage: ov_stat [-S <server_name>] [-acdfhlnpqsu] [-L <library name>] [-D <drive name>]

    ov_stat shows the status of the ov_server and associated components. When arguments are not supplied, ov_stat shows the up/down status of the default server specified in the environment variable OVSERVER.

    ov_stat arguments add either additional status items to the output or add detail to the output.

    The ov_stat command has the following options:

    Examples:

    ov_stat (no arguments)

    ov_stat -S bitbucket -L Odetics_1 -L Exa_3 -s -q ov_stat -a

    Environment variables:

    OVSERVER default host name of system running OpenVault system

  • ov_lscarts

    usage: ov_lscarts [-S <server_name >] [-A <app name >] [-L <library name>] [-D <drive name>] [-acefhHilopPrstuv] [-T <attribute name>] [-C <cartID>] [<PCLs>]

    ov_lscarts shows info on cartridges known to an OpenVault server. When arguments are not supplied, ov_lscarts shows summary info on all carts known to the default server specified in the environment variable OVSERVER.

    ov_lscarts arguments allow the selection of additional items to be displayed or add detail to the output.

    Carts are listed by PCL by default, but optionally can be listed by cartID. Carts are also specified by PCL by default, but optionally may be specified by cartID. Additional information can be requested through specifying the appropriate option.

    Options not implemented in Alpha 1 release:

    Examples:

    ov_lscarts (no arguments)

    ov_lscarts -S bitbucket -l -A networker ov_lscarts -f

  • ov_lsvols

    usage: ov_lsvols [-S <server_name>] [-ahiln1] [-A <app name>] [<volIDs>]

    ov_lsvols shows info on volumes known to an OpenVault server. When arguments are not supplied, ov_lsvols shows summary info on all volumes known to the default server specified in the environment variable OVSERVER.

    ov_lsvols arguments allow the selection of additional items to be displayed or add detail to the output.

    volumes are always listed by the application's volume ID. Additional information can be requested through specifying the desired option.

    Examples:

    ov_lsvols (no arguments)

    ov_lsvols -S bitbucket -l -A networker ov_lsvols -l Vol_001 Vol-abcd

  • ov_report

    usage: ov_report [-S <server_name>] [-L <library name>] [-D <drive name>] [-acehow] [-t <seconds>] [-l <count>] [-m <minutes>]

    ov_report displays current OpenVault system messages by scanning the OpenVault message log table and selecting pertinent information to display. When arguments are not supplied, ov_report lists current warning, error and operator intervention messages on the default server specified in the environment variable OVSERVER.

  • ov_cart

    usage: ov_cart [-S <server_name>] [-n] [-h] <PCL> (<attr name> <attr value>) [(<attr name> <attr value>) ...] [-d <attr name> ...]

    allows entry and modification of info on carts such that they will be recognized when inserted into a library with correct form factor, media type, etc. This function must be used for each cart before the cart can be used by an OpenVault client.

  • ov_part

    usage: ov_part [-S <server_name>] [-n] [-h] (-n <cartID> -p <partition name> -s <side> ) | ( <cartID> -p <partition name> [ -s <side>] ) [ -z <size>] [-a (TRUE|FALSE) ] [-b <bit format>]

    allows entry and modification of info on partitions to allow allocation of volumes on a piece of media. Allows setting of partition allocatable bit so that a partition can be allocated or reallocated (after being deallocated by the owner application).

  • ov_vol

    usage: ov_vol [-S <server_name>] [-n] [-h] <app_name>. <volume_name> (<attr name> <attr value>) [(<attr name> <attr value>) ...] [-d <attr name> ...]

    allows entry and modification of info on volumes to allow apps to operate on volume attributes. This function must be used for each volume before it may be used by an OpenVault client.

  • ov_eject

    usage: ov_eject [-S <server_name>] [-h] ( -l <library name> -s <slot> ) | ( <PCL> | [-C <cartIDs>] )

    allows eject of one or more carts from a library. Carts may be specified by PCL, cartID or by location through specifying library, bay (if there is more than one bay) and slot. Catalog entries for carts are marked for eject. If the library is capable of automatically performing an eject, the cart is ejected. If not, an operator message is generated indicating the cartridge to be removed and the operator must interact with the appropriate LCP to physically remove the cartridge.

  • ov_inject

    usage: ov_inject [-S <server_name>] [-ch] (-n <count>) <library name>

    signals a library to open its inject port to accept an insert of a cartridge or magazine. The library name is required. Injects can be requested for only one library per invocation of this command.

  • ov_devctrl

    usage: ov_devctrl [-S <server_name>] -dev <device name> - [ (activate|deactivate <hostname>) | enable|disable | reset | (scan [ -r <start slot> <end slot>]) ] [-h]

    ov_devctrl allows the operator to control devices. Libraries and drives may be enabled/disabled or reset. Libraries can be signaled to inventory their contents in full or in part in order to resynchronize the state of a library with the OpenVault server. The library status and contents of slot map are polled and and used to update the catalog on the OpenVault server.

    Slot maps can become unsynchronized (i.e., the information that the library has on which PCLs are in which slots and/or occupied status of each slot does not match the OpenVault server's view of that information) through system error or if carts are removed/inserted from a library manually without initiating an automatic rescan. An inventory with ov_devctrl will always cause a copy of the library's slot map to be uploaded to the server. A physical rescan of the contents of the library may be performed by the library, but some libraries will not accept a command to physically rescan their contents. In these cases, the libraries current view of its contents will be uploaded.

  • ov_mount

    usage: ov_mount [-S <server_name>] [-h] [ -d <drive name> ] ( -C <cartID> | <PCL> )

    ov_mount allows the operator to mount a cartridge in a drive so that the operator may examine it. A device name is returned which can be used to access the cartridge with external programs. The operator can specify the cartridge by either PCL or cartID. The operator can specify a particular drive on which the cart should be mounted. An error is generated if the specified drive and cartridge have incompatible formats. If no drive is specified, then any drive with compatible format to the cart may be used and its device name will be returned. The drive will be owned by root and permissions will be set to 600. After the drive is mounted, a subshell will be started. The drive may be accessed from that subshell.

  • ov_unmount

    usage: ov_unmount [-S <server_name>] [-fh] [ -d <drive name> ] ( -C <cartID> | <PCL> )

    ov_unmount allows the operator to unmount a cartridge which is loaded in a drive. This command would normally be used to unmount a cart which was loaded with the ov_mount command, but it may also be used to unmount a cart loaded by an OpenVault app which has died.

    The operator can specify the cartridge by either PCL or cartID. In addition, the operator can specify a particular drive which should be unmounted. This should be used when the cartID or PCL of a cart loaded in a drive is not known.

  • ov_move

    usage: ov_move [-S <server_name>] [-h] (<PCL> | -C <cartID> | -L <library name> <origin slot ID> ) <destination slot ID>

    ov_move allows the operator to move cartridges within a library for purposes such as organizing carts by app, changing proximity to a drive, or packing carts into an ejectable magazine. Carts to be moved may be specified by PCL, cartID, or library with slot name. Destination addresses are specified by slot name. Carts may only be moved within a library.

  • ov_cancel

    usage: ov_cancel [-S <server_name>] [-r <string>] [-h] [ <task ID> ]

    ov_cancel allows the operator to reject task requests queued by an OpenVault server. Cancels are sent to the default server specified in the environment variable OVSERVER. If the task request is still pending when this command is issued, the request is removed from the OpenVault server's task queue, and an explanatory message is sent to the requesting task if one is provided by the operator. If a task ID is not specified, ov_cancel displays a list of outstanding task requests plus a short usage message.

  • ov_clean

    usage: ov_clean [-S <server_name>] [-hin] [-d <drive name;%gt;] [ -C <cartID> | <PCL> ]

    ov_clean allows the operator to clean a drive in a library in the OpenVault system. The drive is specified by supplying the the OpenVault-system name for the drive. The specific cleaning cart to be used may be specified by PCL or cartID. If a cart specification is not provided, then the OpenVault system will attempt to find and use an appropriate cleaning cartridge.

    If no arguments are provided a list of drives will be output with any information on the cleaning state of the drive (e.g., date last cleaned, number of read/write errors).

  • ov_purge

    usage: ov_purge [-S <server_name >] [-hn] [<PCLs>] [-C <cartIDs>]

    ov_purge removes the catalog record for a specific cart on the default OpenVault server. All information about the cartridge is lost, including side and partition data. If volumes exist on a cartridge, an error is reported and the catalog entry for the cartridge is NOT deleted. All volumes on a cartridge must be deallocated before a cartridge can be purged. Caution: This function should only be used when a cart is destroyed or otherwise expected to never be seen again by the OpenVault system.

    Carts are specified by PCL by default, but optionally can be specified by cartID.

  • ov_auth

    usage: ov_auth [-S <server_name >] [-hr] [ -a <app-names> ] [ -H <hostnames> ] [ -k <auth-key> ]

    ov_auth allows the administrator to specify authorization keys for OpenVault client applications or library and drive control programs (LCPs and DCPs). When no authorization keys are specified, ov_auth lists the keys for the applications or hosts specified in the command line arguments

  • ov_config

    usage: ov_config [-S <server_name >] [-hn] [ -d <debug level> ] [ -D <debug file name> ] [ -l <log file level> ] [ -L <log file name> ]

    ov_config allows the administrator to set various configuration options on the OpenVault server.

  • ov_group

    usage: ov_group [-S <server_name >] [-acdhlr] [ <group name list> ] [ -A <application list> | ANY ] [-p <cart group priority> ] [ -q <cart group app priority> ]

    ov_group allows the administrator to create and delete groups, and to control which applications may have access to the media in each group. When no arguments are provided, the default action is to list the current groups and the apps that may use each of them.

  • ov_drivegroup

    usage: ov_drivegroup [-S <server_name >] [-acdhlnr] [ <drive group name list> ] [ -A <application list> | ANY ] [ -t <drive group unload time> ] [ -p <drive group app priority> ] [ -q <drive group app unload time> ]

    ov_drivegroup allows the administrator to create and delete drive groups, and to control which applications may have access to the drives in each group. When no arguments are provided, the default action is to list the current drive groups and the apps that may use each of them.


    Administrative Application Interface (AAPI) to the OpenVault server

    The CAPI interface definition provides many of the capabilities that are needed to accomplish administrative functions of the OpenVault system. Some additional functionality is required however. These functions are listed below.

    Implementation (includes error detection & recovery)

    The initial interface will simply scan an input line for keywords and options, parse the line into commands for library calls, format and execute the library call, and return the results in simple formatted output to standard out. One or more levels of debugging output will be provided to allow observation and test of the interface routines.

    Each command will be processed as follows:

    Command lines containing unrecognized keywords or arguments will be rejected with error messages to standard error. Checks for excessive input length or invalid input will also generate errors.

    Interfaces (internal/external)

    The user interface (UI) and Administrative Application Interface (AAPI) are described briefly above. The UI is the external interface and is to the administrator and operator. The internal interface as the AAPI which communicates with the OpenVault server. The initial interface will be via command lines and text output. Later implementation will be GUI based, with a web-based interface being most likely.

    Open issues

    Editing of the catalog by the administrator may be required to fix catalog errors or other problems. Specific tools for such operations have not yet been defined. Direct editing of catalog files using text editors will be possible as the catalog will be stored in ASCII format. This is both powerful and dangerous however as catalog consistency is not assured. More advanced tools are necessary but probably will not be available in the first release.

    More info is required in library config files than is specified in the boot document. Libraries with variable internal configuration need info on which slots / form factors as this info may not be available by query to the library.

    User mounts, i.e. code to allow individual users to function as clients so that they may perform library functions (e.g. mount / dismount media) are not performed by the Open Vault admin interface. These are allowed through utilities such as the User Mount Shell (umsh).

    If the administrator attempts to delete an application that has tapes assigned to it, does the library function generate an error or should the administrative interface generate an error? The intent is that some portion of the system will report an error. All media for an application must be deallocated before the application is deleted.

    The LCP/DCP/OpenVault document specifies that there will be individual config files for each of these elements. Will a single interface access each of these files, or will there be individual programs to manage each file?

    Note on manual reversion for libraries:

    It is a requirement for the system that if a robotic mechanism fails, then the media contained in that robot be available for manual mount by a human operator. Current plans include a mechanism to automatically configure a manual LCP based on the LCP for the library that failed; the slot map with contents and drive configuration will be transferred to a manual LCP. The manual LCP will issue messages to an operator console requesting movement of carts which would normally be performed by the robotic mechanism. This will allow uninterrupted access to critical data during periods of robotic mechanism downtime. Conversely, a similar mechanism will be provided to transfer data and control back to the robotic LCP when it is returned to service.

    Unknown cart locations: when a cartridge is ejected from a library its location becomes "unknown" until it is inserted into another library. It is desirable that if an application requests a cartridge with such an unknown location that the request NOT immediately fail as the operator might be able to take action to service the request. One way this might work is that upon receiving the mount request from an application, the server would note that the cart location is unknown, and then issue an alert to the OpenVault operator asking for intervention. If the cartridge is readily available to the operator, it can be inserted into a library (including a "manual library") which would allow the request to be satisfied. If the cartridge or operator was not available, the request could time-out, which would send an an appropriate error message back to the application, or the operator could specifically reject the request. The final details of this function have yet to be finalized.

    Some robots have holders that can be reconfigured to accept carts with different form factors. The syntax and semantics of an ov_config option to deal with this is not yet defined.

    Identifying a tape by its headers is a non-trivial task. Loss of a physical label on a cart and/or operator error could result in an app overwriting a tape from another app. Some risk could be reduced if apps shared a common tape header format. If each app can determine that a tape that was loaded for it does not belong to it and which app it belongs to, then we could provide greater assurance that a tape will not be inadvertently overwritten. We should consider proposing such a format so that conforming apps can share a library with greater confidence.

    Security issue: The operator needs to be able to change certain cart attributes, but this also provides the power to really screw things up. If a cart mount is rejected because of a bad hash, the operator may legitimately need to reassign the hash as the cart may have been modified off-site. On the other hand, it could signify that the wrong cart has been provided to the app, such as if the robot read a PCL incorrectly or a person switched the barcodes (either inadvertently or deliberately). Perhaps the attributes that the operator may change should be examines and restricted, but it appears that a certain amount of training and trust will be required.

    Testing

    Initial tests will utilize scripts containing representative OpenVault commands. Stub library routines will be written to output the data that is sent to them to check for correct format of library calls. Dummy data will be sent back to the interface routines to verify correct output format of returned data.

    Once library routines are available, test scripts will be written to call the administrative routines to verify correct handling of all critical administrative functions and as many non-critical functions as possible. These will include correct configuration of libraries, handling of media, handling of clients (applications), and output of status information.