AFS

 view release on metacpan or  search on metacpan

LICENCES/COPYING  view on Meta::CPAN

POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	Appendix: How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) 19yy  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

examples/v2/bos/salvage  view on Meta::CPAN

die "not yet tested ... \n";

print "bos->salvage()...\n";

# these are all possible non MR-AFS parameters:
my ($partition, $volume) = ('/vicepa', 'u.vanilla');
my $all                  = 0;
my $outName              = ''; # salvage log output file
my $showlog              = 0;
my ($parallel, $tmpDir)  = ('', '');
my $orphans              = 'ignore'; # ignore | remove | attach
my $localauth            = 0;


$ok = $bos->salvage($partition, $volume);
print "Error Code: $AFS::CODE\n" if ($AFS::CODE);
print "Something went wrong\n" unless $ok;

exit;


examples/v2/vos/listvol  view on Meta::CPAN

    my $partlist = shift;

    foreach my $part (sort keys %$partlist) {
        print "Partition $part:\n";
        foreach my $vol (sort keys %{$partlist->{$part}}) {
            if ($vol !~ /total/) {
                if ($vol =~ /volume_busy/)  {
                    print "\t**** Volume $partlist->{$part}->{$vol}->{volid} is busy **** \n";
                }
                elsif ($vol =~ /volume_notok/) {
                    print "\t**** Could not attach volume $partlist->{$part}->{$vol}->{volid} **** \n";
                }
                else {
                    print "\t$vol:\n";
                }
                foreach my $key (sort keys %{$partlist->{$part}->{$vol}}) {
                    if ($key =~ /(Reads|Writes|>1wk|1day-1wk|1hr-1day|10min-1hr|1-10min|0-60sec)/) {
                        print "\t\tKey $key:\n";
                        foreach (sort keys %{$partlist->{$part}->{$vol}->{$key}}) {
                            print "\t\t\tKey: $_, Value: $partlist->{$part}->{$vol}->{$key}->{$_}\n";
                        }

examples/v2/vos/listvol  view on Meta::CPAN

    my $partlist = shift;

    foreach my $part (sort keys %$partlist) {
        print "$part:\n";
        foreach my $vol (sort keys %{$partlist->{$part}}) {
            if ($vol !~ /total/) {
                if ($vol =~ /volume_busy/)  {
                    print "\t**** Volume $partlist->{$part}->{$vol}->{'volid'} is busy **** \n";
                }
                elsif ($vol =~ /volume_notok/) {
                    print "\t**** Could not attach volume $partlist->{$part}->{$vol}->{'volid'} **** \n";
                }
                else {
                    print "\t$vol:\n";
                }
                foreach my $key (sort keys %{$partlist->{$part}->{$vol}}) {
                    if ($key =~ /(updateDate|creationDate)/) {
                        printf "\t\t%-12s: %s\n", $key, ctime($partlist->{$part}->{$vol}->{$key});
                    }
                    else {
                        printf "\t\t%-12s: %s\n", $key, $partlist->{$part}->{$vol}->{$key};

examples/v2/vos/listvol  view on Meta::CPAN

        print "List of volumes on server $server Partition $part: \n";
        foreach my $vol (sort keys %{$partlist->{$part}}) {
            if    ($vol =~ /totalOK/)      { next; }
            elsif ($vol =~ /totalBusy/)    { next; }
            elsif ($vol =~ /totalNotOK/)   { next; }
            elsif ($vol =~ /volume_busy/)  {
                print "**** Volume $partlist->{$part}->{$vol}->{'volid'} is busy **** \n";
                next;
            }
            elsif ($vol =~ /volume_notok/) {
                print "**** Could not attach volume $partlist->{$part}->{$vol}->{'volid'} **** \n";
                next;
            }
            else { $totvol++; printf "%-30s ", $vol; }
            print "  $partlist->{$part}->{$vol}->{'volid'}";
            print "  $partlist->{$part}->{$vol}->{'type'}";
            printf "  %10s K", $partlist->{$part}->{$vol}->{'size'};
            print "  $partlist->{$part}->{$vol}->{'inUse'}";
            print "\n";
#             foreach (keys %{$partlist->{$part}->{$vol}}) {
#                 print "\t\tKey: $_, Value: $partlist->{$part}->{$vol}->{$_}\n";

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

Reports on what the Volume Server on a certain file SERVER machine is
doing at the moment the method is performed.
It calls the AFS system library function I<UV_VolserStatus>.

=item B<$volid = $vos-E<gt>zap(SERVER, PARTITION, ID [, FORCE [, BACKUP]]);>

Removes the specified volume ID number of the volume from the site
defined by the SERVER and PARTITION arguments, without attempting to
change the corresponding Volume Location Database (VLDB) entry.  Set
FORCE (default 0) to 1 to remove the volume even though it cannot be
attached (brought online). Use this flag only after the failure of
previous attempts to remove the volume. Set BACKUP (default 0) to 1 to
remove the backup version of the read/write volume.  It returns the
volume id number of the removed volume.
It calls the AFS system library function I<UV_VolumeZap>.

=back

=head1 AUTHORS

The code and documentation for this class were contributed by Stanford

src/AFS.xs  view on Meta::CPAN

      case -1:
          sprintf(buffer, "Possible communication failure\n");
          break;
      case VSALVAGE:
          sprintf(buffer, "Volume needs to be salvaged\n");
          break;
      case VNOVNODE:
          sprintf(buffer, "Bad vnode number quoted\n");
          break;
      case VNOVOL:
          sprintf(buffer, "Volume not attached, does not exist, or not on line\n");
          break;
      case VVOLEXISTS:
          sprintf(buffer, "Volume already exists\n");
          break;
      case VNOSERVICE:
          sprintf(buffer, "Volume is not in service\n");
          break;
      case VOFFLINE:
          sprintf(buffer, "Volume is off line\n");
          break;

src/AFS.xs  view on Meta::CPAN

      case VL_PERM:
          sprintf(buffer, "VLDB: no permission access for call\n");
          break;
      case VOLSERREAD_DUMPERROR:
          sprintf(buffer, "VOLSER:  Problems encountered in reading the dump file !\n");
          break;
      case VOLSERDUMPERROR:
          sprintf(buffer, "VOLSER: Problems encountered in doing the dump !\n");
          break;
      case VOLSERATTACH_ERROR:
          sprintf(buffer, "VOLSER: Could not attach the volume\n");
          break;
      case VOLSERDETACH_ERROR:
          sprintf(buffer, "VOLSER: Could not detach the volume\n");
          break;
      case VOLSERILLEGAL_PARTITION:
          sprintf(buffer, "VOLSER: encountered illegal partition number\n");
          break;
      case VOLSERBAD_ACCESS:
          sprintf(buffer, "VOLSER: permission denied, not a super user\n");
          break;



( run in 0.656 second using v1.01-cache-2.11-cpan-88abd93f124 )