AFS

 view release on metacpan or  search on metacpan

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

specifies the file server machine and PARTITION specifies the
partition name where the volumes where sitting.  If you specify an
empty string for either PREFIX, SERVER, or PARTITION it is considered
as a wild card option for this argument.  If you set NOEXECUTE to 1
(default 0) then the volume name is just printed but NOT deleted.  It
returns the number of successfully deleted volumes and the number of
failed volumes.  It calls the AFS system library function
I<VL_DeleteEntry>.

B<Cautions>

Do not use this method to remove a volume in normal circumstances; it
does not remove a volume from the file server machine, and so is
likely to make the VLDB inconsistent with state of the volumes on
server machines. Use the AFS::VOS remove method to remove both the
volume and its VLDB entry.

=item B<@addrlist = $vldb-E<gt>listaddrs([HOST [, UUID [, NORESOLVE [, PRINTUUID]]]]);>

Returns all server entries from the VLDB.  An entry is created as the
File Server initializes and registers the contents of its local
C<sysid> file in the VLDB.  The return value is an array of hashes.
If you specify HOST or UUID only the entry for this HOST or UUID is
returned.  If you set NORESOLVE (default 0) to 1, only the IP address
is returned.  If you set PRINTUUID (default 0) to 1, the UUID (AFS'
internal host representation) for each server is also returned.

It calls the AFS system library function I<VL_GetAddrs> or
I<VL_GetAddrsU>.

B<Important Hint>

In version 2.4.1 the hash key names for "NAME" and "IP" have changed.
The new names are now "NAME-x" and "IP-x" where "x" is {1,2,3,...}.

You can find an example how to print the entire content of
returned array of hashes in the C<examples/v2/vldb> directory.

=item B<$vldblist = $vldb-E<gt>listvldb([SERVER [, PARTITION [, LOCK]]]);>

Returns information from the Volume Location Database (VLDB) entry for
each volume specified.  The return value is a reference to a hash
table containing the values from the C structure C<nvldbentry>.  The
actual information returned depends on the combination of arguments
supplied when the method is applied. Combine the arguments as
indicated:

 * Every entry in the VLDB: provide no arguments.

 * Every VLDB entry that mentions a certain file server
   machine as the site for a volume: specify the SERVER argument.

 * Every VLDB entry that mentions a certain partition on any
   file server machine as the site for a volume: specify the
   PARTITION argument.

 * Every VLDB entry that mentions a certain partition on a
   certain file server machine as the site for a volume:
   combine the SERVER and PARTITION arguments.

If you set LOCK (default 0) to 1 it returns only locked VLDB
entries. This flag can be combined with the SERVER argument, the
PARTITION argument, or both.

It calls the AFS system library function I<VolumeInfoCmd>.

You can find an example how to print the entire content of the
returned hash reference in the C<examples/v2/vldb> directory.

=item B<$vldblist = $vldb-E<gt>listvldbentry(VOLUME);>

Returns information from the Volume Location Database (VLDB) entry for
the specified VOLUME (volume name or volume ID number).  The return
value is a reference to a hash table containing the values from the C
structure C<nvldbentry>.

It calls the AFS system library function I<VolumeInfoCmd>.

You can find an example how to print the entire content of the
returned hash reference in the C<examples/v2/vldb> directory.

=item B<$ok = $vldb-E<gt>lock(VOLUME);>

Locks the VLDB entry for VOLUME (volume name or volume ID number),
blocking any operation that requires a write to that entry. The lock
applies to all of the volume versions associated with the entry, not
just the one specified.  It calls the AFS system library function
I<VL_SetLock>.

=item B<$ok = $vldb-E<gt>removeaddr(IP);>

Removes from the VLDB the server entry that includes the address
specified by the IP argument.  It calls the AFS system library
function I<VL_ChangeAddr>.

=item B<$ok = $vldb-E<gt>remsite(SERVER, PARTITION, VOLUME);>

Removes the read-only replication site specified by the SERVER and
PARTITION arguments from the Volume Location Database (VLDB) entry for
the indicated read/write VOLUME.

This method is useful for removing read-only sites that were
mistakenly created with the I<addsite> method, before the volume was
actually released. If a read-only copy already exists at the site, it
is not affected. However, if this read-only site was the last site
housing any version of the volume, then the entire VLDB entry is
removed, even if a copy of the read-only version still actually exists
at the site.It calls the AFS system library function I<UV_RemoveSite>.

=item B<$ok = $vldb-E<gt>syncserv(SERVER [, PARTITION]);>

Verifies that each volume mentioned in a VLDB entry actually exists at
the site indicated in the entry. It checks all VLDB entries that
mention a read/write, read-only, or backup site either on any
partition on the file server machine specified by the SERVER argument,
or on the one partition specified by the SERVER and PARTITION
arguments.
It calls the AFS system library function I<UV_SyncServer>.

=item B<$ok = $vldb-E<gt>syncvldb(SERVER [, PARTITION]);>



( run in 0.576 second using v1.01-cache-2.11-cpan-99c4e6809bf )