AFS

 view release on metacpan or  search on metacpan

pod/v2/afsperlvldb.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# RCS-Id: "@(#)$RCS-Id: pod/v2/afsperlvldb.pod 2e2ca60 Tue Apr 15 13:04:20 2014 +0200 Norbert E Gruener$"
#
# © 2005-2014 Norbert E. Gruener <nog@MPA-Garching.MPG.de>
# © 2003-2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#             Norbert E. Gruener <nog@MPA-Garching.MPG.de>
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#------------------------------------------------------------------------------

=head1 NAME

B<AFS::VLDB> - Class to communicate with the B<AFS Volume Location Server>

=head1 SYNOPSIS

  use AFS::VLDB;

  my $vldb = AFS::VLDB->new(1, 120, 1);
  $vol->DESTROY;

  $vldb = AFS::VLDB->new;
  my $ok = $vldb->addsite('server2', 'vicepa', 'volume');
  $ok = $vldb->remsite('server1', '/vicepa', 'volume');

  $ok = $vos->changeloc('volume', 'server2', '/vicepb');

  $ok = $vldb->removeaddr('192.168.18.25');

  my ($succ, $fail) = $vldb->delentry(['volume', 'volume.projects']);
  ($succ, $fail) = $vldb->delentry('volume');
  ($succ, $fail) = $vldb->delgroups('home', 'server', '/vicepa', 1);

  my @addrlist = $vldb->listaddrs('', '', 0, 1);

  my $vldblist = $vldb->listvldb('server1', '/vicepa');
  my $vldblist = $vldb->listvldbentry('root.afs');

  $ok = $vldb->lock('volume');
  $ok = $vldb->unlock('volume');
  $ok = $vldb->unlockvldb('server1', '/vicepa');

  $ok = $vldb->syncserv('server1', '/vicepa');
  $ok = $vldb->syncvldb('server1', '/vicepa');
  $ok = $vldb->syncvldbentry('volume');

=head1 DESCRIPTION

This class is used to communicate with the B<AFS Volume Location
Server> in order to maintain and to administer the Volume Location
Database (VLDB) maintained by the Volume Location Server.  The VLDB is
used to allow AFS application programs to discover the location of any
volume within its cell, along with select information about the nature
and state of that volume.  This class provides methods to lookup for
volumes or to lock/unlock them in the DB.  It is used to remove and to
list DB entries, and to synchronize the VLDB against the AFS
partitions.

Before you can access any VLDB records you must establish a connection
to the Volume Location Server.  This is done by the constructor method
I<new> which returns a VLDB object.  A VLDB object is essentially a
handle to talk to the Volume Location Server in a given cell.  Such a
VLDB object is required before any of the other VLDB instance methods
can be called.

=head1 COMPATIBILITY

There was no version 1 implementation and hence there are no version
conflicts :-)

=head1 METHODS

=over 4

=item B<CONSTRUCTOR>

=item S< >

=item B<$vldb = AFS::VLDB-E<gt>new([VERBOSE [, TIMEOUT [, NOAUTH [, LOCALAUTH [, CELL [, ENCRYPT]]]]]);>

Creates a new object of the class AFS::VLDB.  An AFS::VLDB object is
essentially a handle to talk to the Volume Location Server.
Internally an AFS::VLDB object is a pointer to a ubik_client
structure, although this may change and the value returned from
AFS::VLDB::new should always be treaded as an opaque handle.

Set VERBOSE (default 0) to 1 to produce on the standard output stream
a detailed trace of the method's execution.  TIMEOUT is the time of
inactivity in seconds before the connection to the VLDB server is
declared dead (default 90 seconds).  Set LOCALAUTH (default 0) to 1
only when issuing a command on a server machine.  If NOAUTH is 1
(default 0) it establishes an unauthenticated connection to the
server, in which the servers treat the issuer as an unprivileged user.
CELL (default NULL) specifies the cell in which to run the
command. Set ENCRYPT to 1 (default 0) to encrypt the connection to the
VLDB server.

=item B<DESTRUCTOR>

=item S< >

=item B<$vldb-E<gt>DESTROY;>

Destroys the ubik connection to the Volume Location Server and frees the
ubik_client structure.


=item B<INSTANCE METHODS>

=item S< >

=item B<$ok = $vldb-E<gt>addsite(SERVER, PARTITION, VOLUME [, ROVOL, VALID]);>



( run in 2.759 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )