AFS

 view release on metacpan or  search on metacpan

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

  my $stat = $vos->status('serv1', '/vicepa');
  print "Status is: $stat\n";

  $ok = $vos->rename('oldvol', 'newvol');

  $ok = $vos->setquota('volume', 6500, 1);

  $volid = $vos->zap('serv1', '/vicepa', 'volume');

  my ($tBack, $tFail) = $vos->backupsys('home', 'serv', '/vicepc');
  ($tBack, $tFail) = $vos->backupsys(['home', 'data'], 'serv', '/vicepc');

  my @parts = $vos->listpart('serv1');

  my $vols = $vos->listvol('serv1', '/vicepa');

  my $partinfo = $vos->partinfo('volume');

=head1 DESCRIPTION

This class is used to communicate with the B<AFS Volume Server>, which
runs on every AFS server machine.  The Volume Server allows
administrative tasks and probes to be performed on the set of AFS
volumes residing on the machine on which it is running.  This class
provides methods to create, move, delete, replicate, back up and
examine AFS volumes.  It has also methods to provide information about
AFS partitions.

Before you can submit any tasks to a Volume Server you must establish
a connection to it.  This is done by the constructor method I<new>
which returns a VOS object.  A VOS object is essentially a handle to
talk to the Volume Server in a given cell.  Such a VOS object is
required before any of the other VOS 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<$vos = AFS::VOS-E<gt>new([VERBOSE [, TIMEOUT [, NOAUTH [, LOCALAUTH [, CELL [, ENCRYPT]]]]]);>

Creates a new object of the class AFS::VOS.  An AFS::VOS object is
essentially a handle to talk to the Volume Server.  Internally an
AFS::VOS object is a pointer to a ubik_client structure, although this
may change and the value returned from AFS::VOS::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 VOS 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
VOS server.

=item B<DESTRUCTOR>

=item S< >

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

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


=item B<INSTANCE METHODS>

=item S< >

=item B<$ok = $vos-E<gt>backup(VOLUME);>

Clones the indicated read/write volume to create a backup version,
placing it at the same site as the read/write version. VOLUME
specifies either the complete name or volume ID number of the
read/write source volume.
It calls the AFS system library function I<UV_BackupVolume>.

=item B<($SUCCESS, $FAILED) = $vos-E<gt>backupsys([PREFIX [, SERVER [, PARTITION [, EXCLUDE [, XPREFIX [, DRYRUN]]]]]]);>

=item B<($SUCCESS, $FAILED) = $vos-E<gt>backupsys([\@PREFIX [, SERVER [, PARTITION [, EXCLUDE [, \@XPREFIX [, DRYRUN]]]]]]);>

Clones each indicated read/write volume to create a backup version,
placing each clone at the same site as its read/write source version.
To clone a various numbers of volumes, combine the arguments as indicated:

 * For every volume listed in the VLDB, omit all of the arguments.

 * To clone only volumes that reside on one file server machine,
   specify the SERVER argument,

 * To clone only volumes that reside on one partition, combine the
   SERVER and the PARTITION arguments. The PARTITION argument can
   also be used alone to clone volumes that reside on the indicated
   partition on every file server machine.

 * In PREFIX a character string or regular expression is specified.
   A volume whose name includes the string is placed on the set of
   volumes to be cloned.

 * In XPREFIX a character string or regular expression is specified.
   A volume whose name includes the string is removed from the set of
   volumes to be cloned.

If EXCLUDE (default 0) is set to 1 it reverses the meaning of the
PREFIX or XPREFIX argument.  It returns two array references
containing a list of SUCCESSfully backed up site name and a list of
site name which are FAILED to backup. If DRYRUN (default 0) is set to
1 then SUCCESS contains a list of the volumes to be cloned, without
actually cloning them.



( run in 0.952 second using v1.01-cache-2.11-cpan-5c0b1e786e0 )