Norbert Gruener > AFS-2.4.0 > AFS::FS

Download:
AFS-2.4.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 2.4.688   Source   Latest Release: AFS-2.6.1

NAME ^

AFS::FS - Module to communicate with an AFS File Server

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";
  }

NOTE: The following lines are 'version 1' style: all names are exported by default. This style is deprecated !!!

  use AFS;              # import all AFS names
  use AFS @AFS::CM;     # import just the cache manager names

DESCRIPTION ^

This module provides several functions to communicate with an 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 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.

COMPATIBILITY ^

In version 2 all functions are exported only on request. The old behavior from version 1 (export by default) is still available for compatibility, but is deprecated.

EXPORTS ^

Standard Exports

none

Optional Exports

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

$quota = getquota(PATH [,FOLLOW]);

Displays quota information for the volume containing PATH.

$ok = isafs(PATH [,FOLLOW]);

Returns 1 if PATH is in AFS.

$volume = lsmount(PATH [,FOLLOW]);

Returns the volume name for which PATH is a mount point. If PATH is not a mount point or is not in AFS it returns undef and an error code is set.

$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.

$ok = rmmount(PATH);

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

$ok = setquota(PATH, QUOTA [,FOLLOW]);

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

@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 hostnames.

CURRENT AUTHOR ^

Norbert E. Gruener  <nog@MPA-Garching.MPG.de>. 

AUTHOR EMERITUS ^

Roland Schemers  <schemers@slapshot.stanford.edu>. 

COPYRIGHT AND DISCLAIMER ^

 © 2001-2005 Norbert E. Gruener <nog@MPA-Garching.MPG.de>.
 All rights reserved.

 © 1994 Board of Trustees, Leland Stanford Jr. University.
 All rights reserved.

 Most of the explanations in this document are taken from the original
 AFS documentation.

 AFS-3 Programmer's Reference:
 File Server/Cache Manager Interface
 Edward R. Zayas
 © 1991 Transarc Corporation.
 All rights reserved.

 IBM AFS Administration Reference
 © IBM Corporation 2000.
 All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The original module is covered by the following copyright:

Copyright (c) 1994 Board of Trustees, Leland Stanford Jr. University

Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution and use acknowledge that the software was developed by Stanford University. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

DOCUMENT VERSION ^

Revision $Rev: 687 $