AFS

 view release on metacpan or  search on metacpan

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

#------------------------------------------------------------------------------
# RCS-Id: "@(#)$RCS-Id: pod/v2/afsperlfs.pod 2e2ca60 Tue Apr 15 13:04:20 2014 +0200 Norbert E Gruener$"
#
# © 2001-2014 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::FS> - Module to communicate with an B<AFS File Server>

=head1 SYNOPSIS

  use AFS::FS qw(
                 getquota
                 isafs lsmount mkmount rmmount
                 setquota whereis
                );

  my $quota = getquota('.');
  my $ok = setquota('.', $quota);

  $ok = isafs('.');

  my $vol = lsmount('/afs/mpa/home/nog');
  print "Vol = $vol \n";

  $ok = mkmount('./tmp', 'home.nog');
  print "ok mkmount = $ok\n";

  $ok = rmmount('./tmp');
  print "ok rmmount = $ok\n";

  my @hosts = whereis('/afs/mpa/home', 1);
  foreach my $host (@hosts) {
    print " $host\n";
  }

=head1 DESCRIPTION

This module provides several functions to communicate with an B<AFS file
server>.  It is used to check the status of a file server machine.  It
has functions to administer mount points and quotas.  On request it
returns the server(s) that house a given file or directory.  Any
function required must by explicitly listed by the C<use> statement to be
exported into the calling package.

Some of these functions have the optional argument FOLLOW.  FOLLOW
determines which file should be used should PATH be a symbolic link.  If
FOLLOW be set to 1, then the symbolic link is followed to its target.
If FOLLOW is set to 0, then the function applies to the symbolic link
itself.  If not specified FOLLOW defaults to 1.

=head1 COMPATIBILITY

B<This release does NOT support any features and interfaces
from version 1.>

=head1 EXPORTS

=head2 Standard Exports

none

=head2 Optional Exports

The following functions will be exported into your namespace if you
specifically ask that they be imported.

=over 4

=cut

# =item B<($cell, $volume, $vnode, $unique ) = getfid($path [,$follow=1]);>  ???

# ???
# Get the internal augmented file identifier for $PATH.
# See also "struct VenusFID".
# ???

=item B<$quota = getquota(PATH [,FOLLOW]);>

Displays quota information for the volume containing PATH.

=item B<$ok = isafs(PATH [,FOLLOW]);>

Returns 1 if PATH is in AFS.

=item B<$volume = lsmount(PATH [,FOLLOW]);>

Returns the volume name for which PATH is a mount point.  The last
element in PATH must be an actual name, not a shorthand notation such
as one or two periods (. or ..).  If PATH is not a mount point or is
not in AFS it returns undef and an error code is set.

=item B<$ok = mkmount(PATH, VOLUME [, RW [, CELL]]);>

Creates a given mount point PATH for the VOLUME. If RW (default 0) is
set to 1 it creates a read/write mount point otherwise a regular mount
point.  If CELL (default NULL) is set, the cell indicator appears in the
mount point.

=item B<$ok = rmmount(PATH);>

Removes a given mount point PATH. If it was not successful it returns 0
and an error code is set.

=item B<$ok = setquota(PATH, QUOTA [,FOLLOW]);>

Sets the QUOTA (maximum possible size) of the read/write volume that
contains PATH.

=item B<@hosts = whereis(PATH [,IP [,FOLLOW]]);>

Returns the name of each file server machine housing PATH.  If IP
(default 0) is set to 1 then IP addresses will be returned instead of

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.536 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )