AMASS, DataMgr, EMASS, FileServ, and VolServ are either trademarks or registered
trademarks of ADIC, Advanced Digital Information Corporation. DAS is a trademark of
Grau, an ADIC subsidiary. All other product names and identifications are trademarks or
registered trademarks of their respective manufacturers.
ADIC
10949 East Peakview Ave.
Englewood, CO 80111 USA
Phone: 303-792-9700
FAX: 303-792-2465
U.S. Government Rights Restricted
Use, duplication, or disclosure of either the software or documentation is subject to
restrictions set forth by the U.S. Government in FAR 52.227-19(c)(2) and subparagraph
(c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.2277013 and/or in similar or following clauses in the FAR, DoD, or NASA FAR Supplement.
Technical Assistance
ADIC Technical Assistance Center:
•In the USA and Canada, call 1-800-827-3822.
•Outside the USA and Canada, call 303-874-0188 or toll-free 00800-9999-3822.
•Send e-mail to: support@adic.com.
Documentation
Although the material contained herein has been carefully reviewed, ADIC does not
warrant it to be free of errors or omissions. We reserve the right to make corrections,
updates, revisions, or changes to the information contained herein.
•Send e-mail to: techdocs@adic.com
READER COMMENT FORM
ADIC includes this Form in an effort to provide the best possible documentation to our
customers. Please take a few moments to mail or FAX your response to:
ADIC
Software Documentation
10949 East Peakview Ave.
Englewood, CO 80111
FAX: 303-792-2465
E-mail: techdocs@adic.com
QuestionCircle One
Information was complete.AgreeDisagree
Information was easy to find.AgreeDisagree
Information was easy to follow.AgreeDisagree
Is there anything you especially like or dislike about the organization, presentation,
or writing in this manual?_______________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
Book TitleDocument Number
Customer NameTelephone
E-mail Address
Company Name
Address
City, State, Zip
This book describes the VolServ application programming
interface (API). The API consists of functions, iterators,
symbolic names, type definitions, and data structures.
Using the API provides the programmer with the ability to
directly manipulate VolServ file system metadata and media.
This book is written for programmers who are creating or
modifying an application that requires tight control over data in
the file system managed by VolServ
This book contains the following chapters:
Chapter 1: Getting Started — Describes API types and
naming conventions, dispatch routines and global
parameters,.and error handling.
Chapter 2:Functions — Alphabetical list of API function
calls.
Appendix A: Valid Status Fields — A matrix shows which
status fields are valid for each command.
Appendix B: Error Codes.
Appendix C: Mount Example.
601355 Rev APrefaceP-3
API Guide
Conventions
The conventions used throughout the VolServ technical books
are listed below:
ConventionExample
Screen text, file names, program names, and
commands are in Courier font.
The root prompt is shown as a number
symbol.
What you should type in is shown in Courier bold font.
Site-specific variables are in a Times italics
font.
A backward slash ( \ ) denotes the input is
continued onto the next line; the printed page
is just not wide enough to accommodate the
line.
Pressing <Return> after each command is
assumed.
Request to add a new volume:
Volume group will be “20”
Volume position will be “A123”.
# su root
vsarchiveqry
tar -xvf tapedevicename
#
remsh nodename -n dd if=/dev \
/tapedevicename/bs=20b | tar xvfb \
- 20
(You should type the entire command without
the backward slash.)
A menu name with an arrow refers to a
sequence of menus.
P-4Preface601355 Rev A
Config-->MediaType-->Redefine
API Guide
Preface
Books
The books described below are part of the technical
documentation set, and are shipped on CD along with the
VolServ software:
Overview
Provides an ov erview of VolServ. Contains a
glossary.
Installing VolServ
Describes server requirements, installation
instructions, troubleshooting procedures,
and configuration parameters.
Using the VolServ GUI
Describes how to perform system
administrative tasks using th e graphical user
interface.
API Guide
Provides a list of API functions.
Administrative Tasks
Describes how to perform system
administrative tasks using VolServ
commands.
Command Reference
Contains a list of VolServ commands
Error Messages
Provides corrective action f or system log
errors.
Quick Reference Card
Summarizes commands.
Online Books
The documentation CD contains VolServ book files and
Adobe® Acrobat® Reader. The Reader allows you to view and
navigate the online documentation files yet preserves the page
design and graphics from the printed books.
601355 Rev APrefaceP-5
API Guide
Related
Publications
Related PublicationsDescription
“Release Notes”For each version of VolServ, the “Release Notes” contain:
“Product Alerts”Informs customers of technical problems and solutions.
“Product Bulletins”Conveys technical information—not problems—to
The publications described in the table below are created and
distributed on an as-needed basis.
• Summary of enhancements.
• Describes:
- Fixed problems.
- Known problems.
- Installation and configuration issues.
•Lists:
- Operating system patches.
- System requirements.
customers.
Contact
Publications
Department
Secured Web
Site
To make corrections or to comment on VolServ publications,
please contact Software Technical Publications at our e-mail
address: techdocs@adic.com.
To receive access to the secured site on our home page containing technical product information (Release Notes, Product
Alerts, Product Bulletins, FAQs), visit http://partners.adic.com/
and follow the password request procedure. In return, ADIC
will send you instructions and a password.
Naming conventions.
Global parameters.
Error handling.
API functions.2
Valid staus fields.A
Error codes.B
Mount example .C
Refer To
Chapter
1
1-2Getting Started601355 Rev A
API Guide
API Directory
Structure
All files necessary for client interface to the VolServ software
are contained in the volserv/vsapi directory by default.
However, the installer may choose a different location during
execution of the installation script, except that the vsapi
directory is always appended to the specified location. Refer to
Installing VolServ for more information.
Client software may use the API to interface to VolServ
software. Clients are responsible for creating and linking their
own applications to the appropriate API header and library files.
The default API directory structure is shown in follo wing f igure
and defined in the table below.
/volserv/vsapi
/lib/include/man
/util
Getting Started
DirectoryContents
includeContains six header files used by API library.
libContains the API library.
manContains man pages for all VolServ API library
functions.
601355 Rev AGetting Started1-3
API Guide
DirectoryContents
utilContains various utilities used to clean up
configuration problems, save copies of
VolServ software logs, change the number
sequence of label pattern generation, or to
perform maintenance.
1-4Getting Started601355 Rev A
API Guide
Application
Program
Interface
Extensible
The VolServ Application Programmer’s Interface (API) allows
a programmer to interface with VolServ. The VolServ API is a
set of ‘C’ library routines, written for a UNIX system, that the
client software uses to communicate with VolServ.
Getting Started
The VolServ API allows the user to send commands, receive
command statuses, and receive VolServ MediaClass
notifications.
The VolServ API interface uses the VolServ Remote Procedure
Call (RPC) interface to communicate with VolServ. All features
available in the VolServ RPC interface are supported in the
VolServ API.
The VolServ API is extensible. Any change in the VolServ RPC
interface is handled by the API. Thus, the client program does
not have to be updated to maintain compatibility when the
VolServ RPC interface is modified. The client program is
updated only to use new VolServ features.
Consistent
Portable
Flexible
601355 Rev AGetting Started1-5
The VolServ API is consistent. All commands and their related
functions have the same interface and operate similarly.
The VolServ API is designed to be highly portable to other
platforms. (If the client program is ported to a platform
supported by the VolServ API, the client program does not need
to be concerned with VolServ connectivity.)
The VolServ API is flexible. A client program can send a
command to VolServ and either
API Guide
•Wait for final status before continuing processing
(synchronous processing).
•Or, continue processing after VolServ has received the
command. The client software receives the command’s
status at a later time (asynchronous processing).
A client program can also mix these operation modes.
1-6Getting Started601355 Rev A
API Guide
Client
Interface
Summary
The figure below illustrates th e communication paths supported
by VolServ:
Clients using
Commands in
Client scripts
Client Software
using API
Client Software
using
RPC/XDR protocol
Command
Line
Interface
API
RPC
RPC
RPC
VolServ
The following outline shows the flow of information through
these communication paths.
•Clients using the Command Line Interface and Client
Scripts.
Getting Started
-The client-to-client script issues a request from the
command line.
-The CLI software performs first-lev el v alidation on the
request and forwards the request to the API software.
-The API software serializes the request into XDR
format and transmits the request to VolServ using the
RPC/XDR protocol.
-VolServ returns data and/or status to the API software
using the RPC/XDR protocol.
601355 Rev AGetting Started1-7
API Guide
-The API software deserializes the data and/or status
from the XDR formats and forwards the information to
the CLI software.
-The CLI software formats the data and/or status and
forwards this information to the client that issued the
request.
-The client/client script processes the data and/or status
returned by the CLI software.
•Client software using the API.
-The client software issues a request to the API
software by calling an API function/routine.
-The API software serializes the request into XDR
format and transmits the request to VolServ using the
RPC/XDR protocol.
-VolServ returns data and/or status to the API software
using the RPC/XDR protocol.
-The API software deserializes the data and/or status
from the XDR formats and forwards the information to
the client software.
-The client software processes the data and/or status
returned by the API software.
•Client software using the RPC/XDR protocol.
-The client software serializes the request into XDR
format and transmits the request to VolServ using the
RPC/XDR protocol.
-VolServ returns data and/or status to the client
software using the RPC/XDR protocol.
-The client software deserializes the information from
the XDR format and processes the returned
information.
1-8Getting Started601355 Rev A
API Guide
Unsolicited
Communication
VolServ can generate unsolicited communication after specific
client and operator commands. This unsolicited communication
is referred to in some VolServ documentation as “Callbacks” or
“Notifications.”
Getting Started
Unsolicited communication from VolServ can be directed to
either:
•A preselected RPC address.
•Or, to an internet address associated with an enterprise. The
RPC address or enterprise assigned for unsolicited
communication is assignable at the MediaClass level. Refer
to the Command Reference book for detailed information
about defining unsolicited communication parameters for a
MediaClass group.
This address is used as the receiver for unsolicited messages
that VolServ transmits. These messages are transmitted at
the completion of VolServ processing that had an impact on
any medium associated with the particular MediaClass
group.
Running the following commands: VSCMD_Import,
VSCMD_Export, VSCMD_CheckIn, VSCMD_CheckOut,
VSCMD_Mount, VSCMD_Dismount,
VSCMD_Reclassify can generate unsolicited communication
from VolServ. This unsolicited communication is returned to
the client issuing the command only if that client is specified in
the processing parameters as the destination for all unsolicited
communication for the MediaClass group.
601355 Rev AGetting Started1-9
and
API Guide
VolServ API
Integration
To integrate the VolServ API in a client application, the client
includes the header file vs_client.h in the source modules
that reference the VolServ API types and functions. The client
then links the program with the VolServ API library
libvsapi.a with the -lvsapi option for the cc or ld
commands.
The following five header files are delivered with the VolServ
API:
Header FilesDescription
vs_client.hIncludes the VolServ API header files needed
by the client.
vs_defs.hIncludes the VolServ API definitions needed
for the parameter lists.
vs_types.hIncludes the VolServ API types and
enumerations.
vs_globals.hIncludes the VolServ API global variables that
are accessible to the client.
vs_proto.h Includes the prototypes for all VolServ API
functions.
Before any command can be sent by the client program, the
VolServ API must by initialized with a call to
VS_Initialize. The routine VS_Initialize creates and
initializes the APIs required variables and creates a
communication link with VolServ. Before the client program
terminates, it calls the
VS_Terminate routine to allow the
VolServ API to clean up its processing.
For example:
/* get volserv host name from the user */
printf ( “Enter the name of the VolServ host
computer ==> “ );
scanf ( “%s”, vshost );
/* initialize the VolServ API. */
/* returns TRUE if successful, */
/* FALSE if fails. */
if ( VS_Initialize ( vshost, 0, 30 ) )
{
/* send and create commands */
.............
/* allow VolServ API to */
/* terminate properly */
VS_Terminate();
}
else
{
printf ( “Error initializing VolServ
API” );
}
}
Getting Started
601355 Rev AGetting Started1-11
API Guide
API Types
Objects
API objects and handles are described below.
The VolServ API uses an object-oriented metaphor for tracking
VolServ items. Each object contains several fields that describe
the object, routines that create and destroy the object, and
routines that access the data contained within the object.
The following objects mirror items found in VolServ: archive,
archive media class, archive type capacity, component, drive,
drive pool, enterprise group, enterprise connection, media,
MediaClass group, media type, mount selection expression,
mount selection criteria, mount selection criteria group, and
request. These objects usually store information relating only to
their VolServ counterparts.
Note
The following objects are specific to the VolServ API:
command, error, notify, status, and table. These objects
contain information about the associated command and its
statuses.
Handles
A handle is a pointer to a VolServ API object. An object is
created by an initialization routine that returns a handle that
points to the newly allocated object. After a handle is created, it
is passed as a parameter to the routines that access the handle’s
data.
1-12Getting Started601355 Rev A
Loading...
+ 1162 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.