view release on metacpan or search on metacpan
=head2 Test suite is disabled by default.
There is a well intentioned effort to automatically test all new
submissions to CPAN (see http://testers.cpan.org). Unfortunately, the
AFS-Command package can't be tested automatically, since it requires a
fair amount of configuration. You have to specify a cell name, some
fileserver names and partitions, etc.
By default, the tests will all be skipped if the configured cell name
in the CONFIG file has not been modified, thus allowing the automated
CPAN testing to continue, automatically, without the author getting a
bunch of bogus emails.
=head1 Bugs
=head2 Volume status value inconsistency
!!!!!!!! WARNING !!!!!!!!
This change is NOT backwards compatible with previous releases, so
verify that your code handles the new, consistent values correctly.
$vos->release
(
id => $id,
cell => $cell,
( $vos->supportsArgument('release','force') ?
( force => 1 ) :
( f => 1 )
),
);
OK, that's the authors twisted way of doing it, and it seems like
needless complexity. Both f and force are now supported as options,
using a simply alias mechanism to translate from one to the other,
based on what is supported by the vos binary.
The documentation hasn't been changed, since you can use 'force' in
all cases, and since that is the newer of the two, the docs will stay
as they are. The fact that your vos binary really wants 'f' is hidden
from you, and will stay that way.
=head1 Bugs
Changes.html view on Meta::CPAN
HREF="http://testers.cpan.org).">http://testers.cpan.org).</A>
Unfortunately, the AFS-Command package can't be tested automatically, since
it requires a fair amount of configuration. You have to specify a cell
name, some fileserver names and partitions, etc.
<P>
By default, the tests will all be skipped if the configured cell name in
the CONFIG file has not been modified, thus allowing the automated CPAN
testing to continue, automatically, without the author getting a bunch of
bogus emails.
<P>
<P>
<HR>
<H1><A NAME="Bugs">Bugs
</A></H1>
Changes.html view on Meta::CPAN
cell => $cell,
( $vos->supportsArgument('release','force') ?
( force => 1 ) :
( f => 1 )
),
);
</PRE>
<P>
OK, that's the authors twisted way of doing it, and it seems like needless
complexity. Both f and force are now supported as options, using a simply
alias mechanism to translate from one to the other, based on what is
supported by the vos binary.
<P>
The documentation hasn't been changed, since you can use 'force' in all
cases, and since that is the newer of the two, the docs will stay as they
are. The fact that your vos binary really wants 'f' is hidden from you, and
--- #YAML:1.0
name: AFS-Command
version: 1.99
abstract: ~
author:
- W. Phillip Moore <Phil.Moore@MorganStanley.com>
license: unknown
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
build_requires:
ExtUtils::MakeMaker: 0
requires: {}
no_index:
directory:
See the CONFIG file for more details. Its pretty verbosely
documented.
Any failure in the test suite is a cause for concern. For more
verbose output, run:
make test TEST_VERBOSE=1
If you can't determine the source of the problem(s), send the verbose
test output, along with the output from "perl -V", as well as the
versions of AFS in use at your site, to the author, and I'll do my
best to figure out why things are breaking, and if you're lucky,
actually fix it.
=head1 RELEASE NOTES
In addition to the README file (which in case you hadn't noticed,
you're reading right now), the history of changes is maintained in
Changes.html.
=head1 DOCUMENTATION
README.html view on Meta::CPAN
<P>
<PRE> make test TEST_VERBOSE=1
</PRE>
<P>
If you can't determine the source of the <CODE>problem(s),</CODE> send the
verbose test output, along with the output from ``perl -V'', as well as the
versions of AFS in use at your site, to the author, and I'll do my best to
figure out why things are breaking, and if you're lucky, actually fix it.
<P>
<P>
<HR>
<H1><A NAME="RELEASE_NOTES">RELEASE NOTES
</A></H1>
lib/AFS/Command.pod view on Meta::CPAN
"listvldb" take a list of key/value pairs that correspond to the
command line options for the "vos listvldb" command.
These classes implement the externally supported interface to the
entire API. If you use anything else, you're mucking with internals,
and you get what you deserver when your code implodes.
For details, see the module documentation for each of the above.
Also, the only reason there is no AFS::Command::KAS is that the
author's AFS infrastructure is an MIT Kerberos site, and since we
don't use the kas utility, there has never been a need for such a
module.
The author would welcome a contributed module to support KAS via the
same interface, but note that the AFS::KAS module exists as part of
the existing AFS module suite, although the API is very different.
=head2 AFS::Command::Base
This is the base class for the command suite, which implements the
shared constructor, and a couple of other useful class and object
methods.
=head2 AFS::Object
lib/AFS/Command/BOS.pod view on Meta::CPAN
my $bos = AFS::Command::BOS->new();
my $bos = AFS::Command::BOS->new
(
command => $path_to_your_bos_binary,
);
my $bos = AFS::Command::BOS->new
(
localauth => 1,
);
=head1 DESCRIPTION
This module implements an OO API wrapper around the AFS 'bos' command.
The supported methods depend on the version of the bos binary used,
and are determined automagically.
=head1 METHODS -- Inherited
lib/AFS/Command/BOS.pod view on Meta::CPAN
=head2 getdate
=over
=item Arguments
The bos help string is:
bos getdate: get dates for programs
Usage: bos getdate -server <machine name> -file <files to check>+ [-dir <destination dir>]
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->getdate
(
# Required arguments
server => $server,
file => $file, # OR [ $file1, $file2, ... ]
# Optional arguments
dir => $dir,
cell => $cell,
noauth => 1,
localauth => 1,
);
=item Return Values
This method returns an AFS::Object::BosServer object, which
contains one or more generic AFS::Object, one for each file
specified in the arguments.
my $result = $bos->getdate
(
lib/AFS/Command/BOS.pod view on Meta::CPAN
=head2 getlog
=over
=item Arguments
The bos help string is:
bos getlog: examine log file
Usage: bos getlog -server <machine name> -file <log file to examine>
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->getlog
(
# Required arguments
server => $server,
file => $file,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
# Enhanced arguments
redirect => $redirect,
);
The 'redirect' argument is the name of a file to "redirect" the log
file to. By default, 'bos getlog' dumps the contents of the requested
file to stdout, which is not what you normally want in an application.
The value of this argument is passed directly to IO::File->open().
If this argument is not specified, then the contents of the logfile
lib/AFS/Command/BOS.pod view on Meta::CPAN
=head2 getrestart
=over
=item Arguments
The bos help string is:
bos getrestart: get restart times
Usage: bos getrestart -server <machine name> [-cell <cell name>]
[-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->getrestart
(
# Required arguments
server => $server,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=item Return Values
This method returns an AFS::Object::BosServer object, which
contains two attributes.
my $result = $bos->getrestart
(
server => $server,
lib/AFS/Command/BOS.pod view on Meta::CPAN
=head2 listhosts
=over
=item Arguments
The bos help string is:
bos listhosts: get cell host list
Usage: bos listhosts -server <machine name> [-cell <cell name>]
[-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->listhosts
(
# Required arguments
server => $server,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=item Return Values
This method returns an AFS::Object::BosServer object, which
contains one attribute.
my $result = $bos->listhosts
(
server => $server,
lib/AFS/Command/BOS.pod view on Meta::CPAN
=head2 listkeys
=over
=item Arguments
The bos help string is:
bos listkeys: list keys
Usage: bos listkeys -server <machine name> [-showkey]
[-cell <cell name>] [-noauth] [-localauth]
Where: -showkey show the actual key rather than the checksum
The corresponding method invocation looks like:
my $result = $bos->listkeys
(
# Required arguments
server => $server,
# Optional arguments
showkey => 1,
cell => $cell,
noauth => 1,
localauth => 1,
);
=item Return Values
This method returns an AFS::Object::BosServer object, which
contains one or more AFS::Object objects, each of which
represents a single authentication key on the server.
my $result = $bos->listkeys
(
server => $server,
cell => $cell,
) || die $bos->errors();
print "Server $server in cell $cell has the following keys:\n";
foreach my $key ( $result->getKeys() ) {
my ($index,$cksum) = ($key->index(),$key->cksum());
print "\t$index => $cksum\n";
lib/AFS/Command/BOS.pod view on Meta::CPAN
=head2 listusers
=over
=item Arguments
The bos help string is:
bos listusers: list super-users
Usage: bos listusers -server <machine name> [-cell <cell name>]
[-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->listusers
(
# Required arguments
server => $server,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=item Return Values
This method returns an AFS::Object::BosServer object, which
contains one attribute.
my $result = $bos->listusers
(
server => $server,
lib/AFS/Command/BOS.pod view on Meta::CPAN
=head2 status
=over
=item Arguments
The bos help string is:
bos status: show server instance status
Usage: bos status -server <machine name> [-instance <server process name>+]
[-long] [-cell <cell name>] [-noauth] [-localauth]
Where: -long long status
The corresponding method invocation looks like:
my $result = $bos->status
(
# Required arguments
server => $server,
# Optional arguments
instance => $instance, # OR [ $inst1, $inst2, ... ],
cell => $cell,
long => 1,
noauth => 1,
localauth => 1,
);
=item Return Values
This method returns an AFS::Object::BosServer object, which
contains one optional attribute, and one or more
AFS::Object::Instance objects, each of which represents a
single instance of a bosserver managed process on the server.
my $result = $bos->status
lib/AFS/Command/BOS.pod view on Meta::CPAN
All of the following commands return a simple Boolean (true/false)
value, if they succeed or fail.
=head2 addhost
The bos help string is:
bos addhost: add host to cell dbase
Usage: bos addhost -server <machine name> -host <host name>+
[-clone] [-cell <cell name>] [-noauth] [-localauth]
Where: -clone vote doesn't count
The corresponding method invocation looks like:
my $result = $bos->addhost
(
# Required arguments
server => $server,
host => $host, # OR [ $host1, $host2, ... ]
# Optional arguments
clone => 1,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 addkey
The bos help string is:
bos addkey: add keys to key dbase (kvno 999 is bcrypt)
Usage: bos addkey -server <machine name> [-key <key>] -kvno <key version number>
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->addkey
(
# Required arguments
server => $server,
kvno => $kvno,
# Optional arguments
key => $key,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 adduser
The bos help string is:
bos adduser: add users to super-user list
Usage: bos adduser -server <machine name> -user <user names>+
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->adduser
(
# Required arguments
server => $server,
user => $user, # OR [ $user1, $user2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 blockscanner
The bos help string is:
bos blockscanner: block scanner daemon from making migration requests
Usage: bos blockscanner -server <machine name> [-cell <cell name>]
[-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->blockscanner
(
# Required arguments
server => $server,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 create
The bos help string is:
bos create: create a new server instance
Usage: bos create -server <machine name> -instance <server process name>
-type <server type> -cmd <command lines>+ [-notifier <Notifier program>]
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->create
(
# Required arguments
server => $server,
instance => $instance,
type => $type,
cmd => $cmd, # OR [ $cmd1, $cmd2, ... ]
# Optional arguments
notifier => $notifier,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 delete
The bos help string is:
bos delete: delete a server instance
Usage: bos delete -server <machine name> -instance <server process name>+
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->delete
(
# Required arguments
server => $server,
instance => $instance, # OR [ $inst1, $inst2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 exec
The bos help string is:
bos exec: execute shell command on server
Usage: bos exec -server <machine name> -cmd <command to execute>
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->exec
(
# Required arguments
server => $server,
cmd => $cmd,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 install
The bos help string is:
bos install: install program
Usage: bos install -server <machine name> -file <files to install>+
[-dir <destination dir>] [-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->install
(
# Required arguments
server => $server,
file => $file, # OR [ $file1, $file2, ... ]
# Optional arguments
dir => $dir,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 prune
The bos help string is:
bos prune: prune server files
Usage: bos prune -server <machine name> [-bak] [-old] [-core] [-all]
[-cell <cell name>] [-noauth] [-localauth]
Where: -bak delete .BAK files
-old delete .OLD files
-core delete core files
-all delete all junk files
The corresponding method invocation looks like:
my $result = $bos->prune
(
# Required arguments
server => $server,
# Optional arguments
bak => 1,
old => 1,
core => 1,
all => 1,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 removehost
The bos help string is:
bos removehost: remove host from cell dbase
Usage: bos removehost -server <machine name> -host <host name>+
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->removehost
(
# Required arguments
server => $server,
host => $host, # OR [ $host1, $host2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 removekey
The bos help string is:
bos removekey: remove keys from key dbase
Usage: bos removekey -server <machine name> -kvno <key version number>+
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->removekey
(
# Required arguments
server => $server,
kvno => $kvno, # OR [ $kvno1, $kvno2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 removeuser
The bos help string is:
bos removeuser: remove users from super-user list
Usage: bos removeuser -server <machine name> -user <user names>+
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->removeuser
(
# Required arguments
server => $server,
user => $user, # OR [ $user1, $user2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 restart
The bos help string is:
bos restart: restart processes
Usage: bos restart -server <machine name> [-instance <instances>+] [-bosserver]
[-all] [-cell <cell name>] [-noauth] [-localauth]
Where: -bosserver restart bosserver
-all restart all processes
The corresponding method invocation looks like:
my $result = $bos->restart
(
# Required arguments
server => $server,
# Optional arguments
instance => $instance, # OR [ $inst1, $inst2, ... ]
bosserver => 1,
all => 1,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 salvage
The bos help string is:
bos salvage: salvage partition or volumes
Usage: bos salvage -server <machine name> [-partition <salvage partition>]
[-volume <salvage volume number or volume name>]
[-file <salvage log output file>] [-all] [-showlog]
[-parallel <# of max parallel partition salvaging>]
[-tmpdir <directory to place tmp files>]
[-orphans <ignore | remove | attach>] [-debug] [-nowrite]
[-force] [-oktozap] [-rootfiles] [-salvagedirs] [-blockreads]
[-ListResidencies] [-SalvageRemote] [-SalvageArchival]
[-IgnoreCheck] [-ForceOnLine] [-UseRootDirACL]
[-TraceBadLinkCounts] [-DontAskFS] [-LogLevel <(MR-AFS) log level>]
[-rxdebug] [-cell <cell name>] [-noauth] [-localauth]
Where: -all salvage whole server
-showlog display salvage log
-debug (MR-AFS) Run in Debugging mode
-nowrite (MR-AFS) Run readonly/test mode
-force (MR-AFS) Force full salvaging
-oktozap (MR-AFS) Give permission to destroy bogus file residencies/volumes - debugging flag
-rootfiles (MR-AFS) Show files owned by root - debugging flag
-salvagedirs (MR-AFS) Force rebuild/salvage of all directories
-blockreads (MR-AFS) Read smaller blocks to handle IO/bad blocks
-ListResidencies (MR-AFS) Just list affected file residencies - debugging flag
lib/AFS/Command/BOS.pod view on Meta::CPAN
SalvageRemote => 1,
SalvageArchival => 1,
IgnoreCheck => 1,
ForceOnLine => 1,
UseRootDirACL => 1,
TraceBadLinkCounts => 1,
DontAskFS => 1,
LogLevel => $loglevel,
rxdebug => 1,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 setauth
The bos help string is:
bos setauth: set authentication required flag
Usage: bos setauth -server <machine name>
-authrequired <on or off: authentication required for admin requests>
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->setauth
(
# Required arguments
server => $server,
authrequired => $authrequired,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 setcellname
The bos help string is:
bos setcellname: set cell name
Usage: bos setcellname -server <machine name> -name <cell name>
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->setcellname
(
# Required arguments
server => $server,
name => $name,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 setrestart
The bos help string is:
bos setrestart: set restart times
Usage: bos setrestart -server <machine name> -time <time to restart server>
[-general] [-newbinary] [-cell <cell name>]
[-noauth] [-localauth]
Where: -general set general restart time
-newbinary set new binary restart time
The corresponding method invocation looks like:
my $result = $bos->setrestart
(
# Required arguments
server => $server,
time => $time,
# Optional arguments
general => 1,
newbinary => 1,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 shutdown
The bos help string is:
bos shutdown: shutdown all processes
Usage: bos shutdown -server <machine name> [-instance <instances>+]
[-wait] [-cell <cell name>] [-noauth] [-localauth]
Where: -wait wait for process to stop
The corresponding method invocation looks like:
my $result = $bos->shutdown
(
# Required arguments
server => $server,
# Optional arguments
instance => $instance, # OR [ $inst1, $inst2, ... ]
wait => 1,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 start
The bos help string is:
bos start: start running a server
Usage: bos start -server <machine name> -instance <server process name>+
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->start
(
# Required arguments
server => $server,
# Optional arguments
instance => $instance, # OR [ $inst1, $inst2, ... ]
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 startup
The bos help string is:
bos startup: start all processes
Usage: bos startup -server <machine name> [-instance <instances>+]
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->startup
(
# Required arguments
server => $server,
# Optional arguments
instance => $instance, # OR [ $inst1, $inst2, ... ]
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 stop
The bos help string is:
bos stop: halt a server instance
Usage: bos stop -server <machine name> -instance <server process name>+
[-wait] [-cell <cell name>] [-noauth] [-localauth]
Where: -wait wait for process to stop
The corresponding method invocation looks like:
my $result = $bos->stop
(
# Required arguments
server => $server,
instance => $instance, # OR [ $inst1, $inst2, ... ]
# Optional arguments
wait => 1,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 unblockscanner
The bos help string is:
bos unblockscanner: allow scanner daemon to make migration requests again
Usage: bos unblockscanner -server <machine name>
[-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->unblockscanner
(
# Required arguments
server => $server,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
);
=head2 uninstall
The bos help string is:
bos uninstall: uninstall program
Usage: bos uninstall -server <machine name> -file <files to uninstall>+
[-dir <destination dir>] [-cell <cell name>] [-noauth] [-localauth]
The corresponding method invocation looks like:
my $result = $bos->uninstall
(
# Required arguments
server => $server,
file => $file, # OR [ $file1, $file2, ... ]
# Optional arguments
dir => $dir,
cell => $cell,
noauth => 1,
localauth => 1,
);
=head1 SEE ALSO
AFS::Command(1), AFS::Object(1)
=cut
lib/AFS/Command/Base.pm view on Meta::CPAN
}
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my %args = @_;
my $self = {};
foreach my $key ( qw( localtime noauth localauth encrypt quiet timestamps ) ) {
$self->{$key}++ if $args{$key};
}
# AFS::Command::VOS -> vos
if ( $args{command} ) {
my @commands = (split /\s+/,$args{command});
push (@{$self->{command}},@commands);
} else {
@{$self->{command}} = lc((split(/::/,$class))[2]);
}
lib/AFS/Command/Base.pm view on Meta::CPAN
} else {
my @argv = ( @{$self->{command}}, $self->{operation} );
foreach my $key ( keys %args ) {
next unless $arguments->{aliases}->{$key};
$args{$arguments->{aliases}->{$key}} = delete $args{$key};
}
foreach my $key ( qw( noauth localauth encrypt ) ) {
next unless $self->{$key};
$args{$key}++ if exists $arguments->{required}->{$key};
$args{$key}++ if exists $arguments->{optional}->{$key};
}
unless ( $self->{quiet} ) {
$args{verbose}++ if exists $arguments->{optional}->{verbose};
}
foreach my $type ( qw( required optional ) ) {
lib/AFS/Command/Base.pod view on Meta::CPAN
then for example:
my $vos = AFS::Command::VOS->new
(
command => "/ms/dist/openafs/PROJ/core/1.2.9/bin/vos",
);
If the path given is invalid, then expect the API to implode on itself
when it can't be found, or it isn't an AFS vos command.
=item localauth, noauth, encrypt
All of these arguments correspond to command line arguments common
across the entire command line suite. Typically, if an application
uses this flag once, it will be using it for B<all> subsequent calls as
well. Therefore, the state of these flags can be set globally by
setting them when creating the command object.
my $vos = AFS::Command::VOS->new
(
localauth => 1,
encrypt => 1,
);
NOTE: The encrypt option is only available in more recent versions of
AFS, and may be unsupported by the underlying commands.
XXX: What should the default behavior be? Croak or carp? we can
figure out dynamically if the command supports it, and have the
constructor fail, or we can be lazy and let the first command fail.
lib/AFS/Command/PTS.pod view on Meta::CPAN
my $pts = AFS::Command::PTS->new();
my $pts = AFS::Command::PTS->new
(
command => $path_to_your_pts_binary,
);
my $pts = AFS::Command::PTS->new
(
noauth => 1,
force => 1,
);
=head1 DESCRIPTION
This module implements an OO API wrapper around the AFS 'pts' command.
The supported methods depend on the version of the pts binary used,
and are determined automagically.
=head1 METHODS -- Inherited
lib/AFS/Command/PTS.pod view on Meta::CPAN
=over
=item Arguments
The pts help string is:
pts creategroup: create a new group
Usage: pts creategroup -name <group name>+ [-owner <owner of the group>]
[-id <id (negated) for the group>+]
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->creategroup
(
# Required arguments
name => $name, # OR [ $name1, $name2, ... ]
# Optional arguments
owner => $owner,
id => $id, # OR [ $id1, $id2, ... ]
cell => $cell,
noauth => 1,
force => 1,
);
=item Return Values
This method returns an AFS::Object::PTServer object, which
contains one AFS::Object::Group for each group created.
my $result = $pts->creategroup
(
lib/AFS/Command/PTS.pod view on Meta::CPAN
=head2 createuser
=over
=item Arguments
The pts help string is:
pts createuser: create a new user
Usage: pts createuser -name <user name>+ [-id <user id>+]
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->createuser
(
# Required arguments
name => $name, # OR [ $name1, $name2, ... ]
# Optional arguments
owner => $owner,
id => $id, # OR [ $id1, $id2, ... ]
cell => $cell,
noauth => 1,
force => 1,
);
=item Return Values
This method returns an AFS::Object::PTServer object, which
contains one AFS::Object::User for each user created.
my $result = $pts->createuser
(
lib/AFS/Command/PTS.pod view on Meta::CPAN
=head2 examine
=over
=item Arguments
The pts help string is:
pts examine: examine an entry
Usage: pts examine -nameorid <user or group name or id>+
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->examine
(
# Required arguments
nameorid => $nameorid, # OR [ $nameorid1, $nameorid2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=item Return Values
This method returns an AFS::Object::PTServer object, which
contains one AFS::Object::User or AFS::Object::Group
object for each user/group examined.
my $result = $pts->examine
lib/AFS/Command/PTS.pod view on Meta::CPAN
=head2 listentries
=over
=item Arguments
The pts help string is:
pts listentries: list users/groups in the protection database
Usage: pts listentries [-users] [-groups] [-cell <cell name>]
[-noauth] [-force]
Where: -users list user entries
-groups list group entries
The corresponding method invocation looks like:
my $result = $pts->listentries
(
# Optional arguments
users => 1,
groups => 1,
cell => $cell,
noauth => 1,
force => 1,
);
=item Return Values
This method returns an AFS::Object::PTServer object, which
contains one AFS::Object::User or AFS::Object::Group
object for each user/group listed.
my $result = $pts->listentries
lib/AFS/Command/PTS.pod view on Meta::CPAN
=head2 listmax
=over
=item Arguments
The pts help string is:
pts listmax: list max id
Usage: pts listmax [-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->listmax
(
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=item Return Values
This method returns an AFS::Object::PTServer object, which
contains two attributes:
my $result = $pts->listmax
(
lib/AFS/Command/PTS.pod view on Meta::CPAN
=head2 listowned
=over
=item Arguments
The pts help string is:
pts listowned: list groups owned by an entry or zero id gets orphaned groups
Usage: pts listowned -nameorid <user or group name or id>+
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->listowned
(
# Required arguments
nameorid => $nameorid, # OR [ $nameorid1, $nameorid2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=item Return Values
This method returns an AFS::Object::PTServer object, which
contains one AFS::Object::User or AFS::Object::Group
object for each user/group specified.
my $result = $pts->listowned
lib/AFS/Command/PTS.pod view on Meta::CPAN
=head2 membership
=over
=item Arguments
The pts help string is:
pts membership: list membership of a user or group
Usage: pts membership -nameorid <user or group name or id>+
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->membership
(
# Required arguments
nameorid => $nameorid, # OR [ $nameorid1, $nameorid2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=item Return Values
This method returns an AFS::Object::PTServer object, which
contains one AFS::Object::User or AFS::Object::Group
object for each user/group specified.
my $result = $pts->membership
lib/AFS/Command/PTS.pod view on Meta::CPAN
All of the following commands return a simple Boolean (true/false)
value, if they succeed or fail.
=head2 adduser
The pts help string is:
pts adduser: add a user to a group
Usage: pts adduser -user <user name>+ -group <group name>+
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->adduser
(
# Required arguments
user => $user, # OR [ $user1, $user2, ... ]
group => $group, # OR [ $group1, $group2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=head2 chown
The pts help string is:
pts chown: change ownership of a group
Usage: pts chown -name <group name> -owner <new owner>
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->chown
(
# Required arguments
name => $name,
owner => $owner,
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=head2 delete
The pts help string is:
pts delete: delete a user or group from database
Usage: pts delete -nameorid <user or group name or id>+
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->delete
(
# Required arguments
nameorid => $nameorid, # OR [ $nameorid1, $nameorid2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=head2 removeuser
The pts help string is:
pts removeuser: remove a user from a group
Usage: pts removeuser -user <user name>+ -group <group name>+
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->removeuser
(
# Required arguments
user => $user, # OR [ $user1, $user2, ... ]
group => $group, # OR [ $group1, $group2, ... ]
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=head2 rename
The pts help string is:
pts rename: rename user or group
Usage: pts rename -oldname <old name> -newname <new name>
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->rename
(
# Required arguments
oldname => $oldname,
newname => $newname,
# Optional arguments
cell => $cell,
noauth => 1,
force => 1,
);
=head2 setfields
The pts help string is:
pts setfields: set fields for an entry
Usage: pts setfields -nameorid <user or group name or id>+ [-access <set privacy flags>]
[-groupquota <set limit on group creation>]
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->setfields
(
# Required arguments
nameorid => $nameorid, # OR [ $nameorid1, $nameorid2, ... ]
# Optional arguments
access => $access,
groupquota => $groupquota,
cell => $cell,
noauth => 1,
force => 1,
);
=head2 setmax
The pts help string is:
pts setmax: set max id
Usage: pts setmax [-group <group max>] [-user <user max>]
[-cell <cell name>] [-noauth] [-force]
The corresponding method invocation looks like:
my $result = $pts->setmax
(
# Optional arguments
user => $user,
group => $group,
cell => $cell,
noauth => 1,
force => 1,
);
=head1 SEE ALSO
AFS::Command(1), AFS::Object(1)
=cut
lib/AFS/Command/VOS.pm view on Meta::CPAN
$self->_Carp("Unrecognized output format:\n" . $_);
}
#
# Are we looking for extended data??
#
if ( $args{extended} ) {
my $raw = AFS::Object->new();
my $author = AFS::Object->new();
my $boundary = 0;
while ( defined($_ = $self->{handle}->getline()) ) {
chomp;
$boundary++ if /^\s+\|-+\|\s*$/;
last if /^\s*$/ && $boundary == 4;
lib/AFS/Command/VOS.pm view on Meta::CPAN
my $int = "";
$class = 'reads' if /^Reads/;
$class = 'writes' if /^Writes/;
if ( $class ) {
my $same = AFS::Object->new
(
total => $column[0],
auth => $column[1],
);
my $diff = AFS::Object->new
(
total => $column[2],
auth => $column[3],
);
my $stats = AFS::Object->new
(
same => $same,
diff => $diff,
);
$raw->_setAttribute( $class => $stats );
lib/AFS/Command/VOS.pm view on Meta::CPAN
same => $column[2],
diff => $column[3],
);
my $stats = AFS::Object->new
(
file => $file,
dir => $dir,
);
$author->_setAttribute( $int => $stats );
}
}
$header->_setAttribute
(
raw => $raw,
author => $author,
);
}
$result->_addVolumeHeader($header);
next;
}
lib/AFS/Command/VOS.pod view on Meta::CPAN
my $vos = AFS::Command::VOS->new();
my $vos = AFS::Command::VOS->new
(
command => $path_to_your_vos_binary,
);
my $vos = AFS::Command::VOS->new
(
localauth => 1,
encrypt => 1,
);
=head1 DESCRIPTION
This module implements an OO API wrapper around the AFS 'vos' command.
The supported methods depend on the version of the vos binary used,
and are determined automagically.
=head1 METHODS -- Inherited
lib/AFS/Command/VOS.pod view on Meta::CPAN
support several special arguments that are extensions implemented in
this API only.
=head2 dump
The vos help string is:
vos dump: dump a volume
Usage: vos dump -id <volume name or ID> [-time <dump from time>] [-file <dump file>]
[-server <server>] [-partition <partition>] [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->dump
(
# Required arguments
id => $id,
file => $file, # SPECIAL CASE!!! (see below)
# Optional arguments
time => $time,
server => $server,
partition => $partition,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
# Enhanced arguments
gzip => $gzip,
bzip2 => $bzip2,
filterout => [ @command ], # OR [ [ @cmd1 ], [ @cmd2 ], ... ]
);
The first thing to notice is that 'file' is optional to the vos dump
command itself, but required in this API. The second thing to notice
lib/AFS/Command/VOS.pod view on Meta::CPAN
=item filterout
This is an advanced feature, and one that allows the volume dump to be
filtered through any arbitrary number of commands before it is
compressed (optionally) and written to the filesystem. The value of
this argument is either an ARRAY reference to a list of command line
arguments, suitable for passing to exec(), or an ARRAY or such ARRAYS,
when more than one filter command is being used.
For example, the author has a requirement to pass all volume dumps
through a simple filter called 'newversion', which reads a volume
dump, changes the directory version numbers to the current utime
value, and writes the volume dump to stdout. Trust me, you really
don't want to know why.
my $result = $vos->dump
(
...
filterout => [ 'newversion' ],
...
lib/AFS/Command/VOS.pod view on Meta::CPAN
=head2 restore
The vos help string is:
vos restore: restore a volume
Usage: vos restore -server <machine name> -partition <partition name>
-name <name of volume to be restored> [-file <dump file>]
[-id <volume ID>] [-overwrite <abort | full | incremental>]
[-offline] [-readonly]
[-creation <dump | keep | new>] [-lastupdate <dump | keep | new>]
[-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
Where: -offline leave restored volume offline
-readonly make restored volume read-only
The corresponding method invocation looks like:
my $result = $vos->restore
(
# Required arguments
server => $server,
partition => $partition,
name => $name,
file => $file, # SPECIAL CASE!!! (see below)
# Optional arguments
id => $id,
overwrite => 'abort' | 'full' | 'incremental',
offline => 1,
readonly => 1,
creation => 'dump' | 'keep' | 'new',
lastupdate => 'dump' | 'keep' | 'new',
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
# Enhanced arguments
gunzip => 1,
bunzip2 => 1,
filterin => [ @command ], # OR [ [ @cmd1 ], [ @cmd2 ], ... ]
);
NOTE: The 'creation' and 'lastupdate' options are available only in a
very recent patch to the vos command, which should be available in the
lib/AFS/Command/VOS.pod view on Meta::CPAN
=item filterin
This is an advanced feature, and one that allows the volume dump to be
filtered through any arbitrary number of commands after it is
uncompressed (optionally) and read by vos restore. The value of this
argument is either an ARRAY reference to a list of command line
arguments, suitable for passing to exec(), or an ARRAY or such ARRAYS,
when more than one filter command is being used.
Lacking a better example, let's assume the author's 'newversion'
utility is being applied to the restore process, rather than the dump.
my $result = $vos->restore
(
...
filterin => [ 'newversion' ],
...
);
If there were command line arguments for this command, then they must
lib/AFS/Command/VOS.pod view on Meta::CPAN
=head2 examine
=over
=item Arguments
The vos help string is:
vos examine: everything about the volume
Usage: vos examine -id <volume name or ID> [-extended] [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
Where: -extended list extended volume fields
The corresponding method invocation looks like:
my $result = $vos->examine
(
# Required arguments
id => $id,
# Optional arguments
cell => $cell,
extended => 1,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=item Return Values
This method returns an AFS::Object::Volume object, which in
turn contains one or more AFS::Object::VolumeHeader objects,
as well as an AFS::Object::VLDBEntry, which contains one or
more AFS::Object::VLDBSite objects.
lib/AFS/Command/VOS.pod view on Meta::CPAN
rwrite Numeric Volume ID for the RW volume
ronly Numeric Volume ID for the RO volume
backup Numeric Volume ID for the BK volume
rclone Numeric Volume ID for the RClone volume, if present
Note that the 'rclone' attribute is only present if the volume was
actively being cloned while being examined. This is true when a 'vos
release' command is actively updating the RO volumes.
The following attributes are only present if the 'extended' argument
was specified (see below for details on access the raw and author
stats):
Attributes Values
---------- ------
files Number of files in the volume
raw Generic AFS::Object object
author Generic AFS::Object object
The 'raw' and 'author' stats are implemented as a hierarchy of simple,
generic AFS::Object objects, which have nothing but a couple
of attributes, and no special methods associated with them.
The 'raw' object has the following attributes:
Attributes Values
---------- ------
reads Generic AFS::Object object
writes Generic AFS::Object object
lib/AFS/Command/VOS.pod view on Meta::CPAN
Attributes Values
---------- ------
same Generic AFS::Object object
diff Generic AFS::Object object
Both of the 'same' and 'diff' objects have the following attributes:
Attributes Values
---------- ------
total Numeric value
auth Numeric value
The 'author' object has the following attributes:
Attributes Values
---------- ------
0sec Generic AFS::Object object
1min Generic AFS::Object object
10min Generic AFS::Object object
1hr Generic AFS::Object object
1day Generic AFS::Object object
1wk Generic AFS::Object object
lib/AFS/Command/VOS.pod view on Meta::CPAN
Attributes Values
---------- ------
same Numeric value
diff Numeric value
At this point, any sane individual is probably hopelessly confused how
to make sense of the statistics, so let's make this clear with an
example.
First of all, the 'raw' and 'author' statistics are parsed from this
noise, generated when -extended is given:
Raw Read/Write Stats
|-------------------------------------------|
| Same Network | Diff Network |
|----------|----------|----------|----------|
| Total | Auth | Total | Auth |
|----------|----------|----------|----------|
Reads | 162 | 162 | 6 | 6 |
Writes | 1815 | 1815 | 0 | 0 |
lib/AFS/Command/VOS.pod view on Meta::CPAN
the same name, one can easily dig into the hierarchy as follows:
my $result = $vos->examine
(
id => 'user.wpm',
cell => 'q.ny.ms.com',
extended => 1,
);
print $result->raw()->reads()->same()->total(); # 162, in the above output.
print $result->author()->10min()->dir()->same(); # 44, in the above output.
See? It's not as ugly as the pedantic description above implies.
=back
=head2 listaddrs
=over
=item Arguments
The vos help string is:
vos listaddrs: list the IP address of all file servers registered in the VLDB
Usage: vos listaddrs [-uuid <uuid of server>] [-host <address of host>]
[-noresolve] [-printuuid] [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
Where: -noresolve don't resolve addresses
-printuuid print uuid of hosts
The corresponding method invocation looks like:
my $result = $vos->listaddrs
(
# Optional arguments
uuid => $uuid,
host => $host,
noresolve => 1,
printuuid => 1,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=item Return Values
This method returns a list of AFS::Object::FileServer
objects, each of which has attributes that vary depending on the
arguments to the method call.
lib/AFS/Command/VOS.pod view on Meta::CPAN
=head2 listpart
=over
=item Arguments
The vos help string is:
vos listpart: list partitions
Usage: vos listpart -server <machine name> [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->listpart
(
# Required arguments
server => $server,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=item Return Values
This method returns an AFS::Object::FileServer object, which
contains one or more AFS::Object::Partition objects. Because
'listpart' returns nothing other than the partition names, the
underlying Partition objects have only one attribute ('partition'), so
lib/AFS/Command/VOS.pod view on Meta::CPAN
print "Server '$server' has partition '$partition'\n";
}
The FileServer object has no attributes at all, it merely contains the
Partition objects. Since the Partition objects are indexed by name,
there's no need to extract the partition objects and query their
attributes, since once you have the names, you have all the information
already.
Compare this with 'vos partinfo', which provides a lot more
information. For pedantic completeness (the author is kinda
anal-retentive in that way), here's the description of the complete
interface.
B<AFS::Object::FileServer>
This object has no attributes, and is merely a container for the
AFS::Object::Partition objects. It has the following methods
for extracting the objects is contains.
Methods Returns
lib/AFS/Command/VOS.pod view on Meta::CPAN
=over
=item Arguments
The vos help string is:
vos listvldb: list volumes in the VLDB
Usage: vos listvldb [-name <volume name or ID>] [-server <machine name>]
[-partition <partition name>] [-locked] [-quiet] [-nosort]
[-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt]
Where: -locked locked volumes only
-quiet generate minimal information
-nosort do not alphabetically sort the volume names
The corresponding method invocation looks like:
my $result = $vos->listvldb
(
# Optional arguments
name => $name,
server => $server,
partition => $partition,
locked => 1,
quiet => 1,
nosort => 1,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=item Return Values
This method returns an AFS::Object::VLDB object, which has a
few attributes, and contains one or more
AFS::Object::VLDBEntry objects, which in turn contain
AFS::Object::VLDBSite objects, as well as their own
lib/AFS/Command/VOS.pod view on Meta::CPAN
=over
=item Arguments
The vos help string is:
vos listvol: list volumes on server (bypass VLDB)
Usage: vos listvol -server <machine name> [-partition <partition name>]
[-fast] [-long] [-quiet] [-extended] [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
Where: -fast minimal listing
-long list all normal volume fields
-quiet generate minimal information
-extended list extended volume fields
The corresponding method invocation looks like:
my $result = $vos->listvol
(
# Required arguments
server => $server,
# Optional arguments
partition => $partition,
fast => 1,
long => 1,
quiet => 1,
extended => 1, # Not really... see below
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
NOTE: 'extended' is not supported in this version of the API, and
specifying it will result in a warning, but not an error. However,
'vos examine' does parse the extended output, so if you really want
that data you can get it on a volume by volume basis. Adding support
for 'extended' to 'vos listvol' is on the todo list.
lib/AFS/Command/VOS.pod view on Meta::CPAN
my $header = $partition->getVolumeHeaderByName($name)
# Do something interesting with $header.
}
foreach my $id ( $partition->getVolumeIds() ) {
my $header = $partition->getVolumeHeaderById($id);
# Do something interesting with $header.
}
And there is yet one more method to extract the headers (don't say the
author doesn't pander to lots of different programming styles,
provided of course they are one of his own).
foreach my $name ( $partition->getVolumeNames() ) {
my $header = $partition->getVolumeHeader( name => $name );
# Do something interesting with $header.
}
foreach my $id ( $partition->getVolumeIds() ) {
my $header = $partition->getVolumeHeader( id => $id );
lib/AFS/Command/VOS.pod view on Meta::CPAN
=head2 partinfo
=over
=item Arguments
The vos help string is:
vos partinfo: list partition information
Usage: vos partinfo -server <machine name> [-partition <partition name>]
[-cell <cell name>] [-noauth] [-localauth]
[-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->partinfo
(
# Required arguments
server => $server,
# Optional arguments
partition => $partition,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=item Return Values
This method returns an AFS::Object::FileServer object, which
contains one or more AFS::Object::Partition objects, which
have more interesting attributes than those returned by 'vos
partinfo'.
lib/AFS/Command/VOS.pod view on Meta::CPAN
=head2 status
=over
=item Arguments
The vos help string is:
vos status: report on volser status
Usage: vos status -server <machine name> [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->status
(
# Required arguments
server => $server,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=item Return Values
This method returns an AFS::Object::VolServer object with one
attribute, which also may or may not contain one or more
AFS::Object::Transaction objects.
lib/AFS/Command/VOS.pod view on Meta::CPAN
NOTE: These attributes just come from a straight parsing of output like this:
--------------------------------------
transaction: 170423 created: Wed Oct 8 15:59:12 2003
attachFlags: offline
volume: 536963097 partition: /vicepf procedure: Restore
packetRead: 222 lastReceiveTime: 1065643165 packetSend: 1 lastSendTime: 1065643165
--------------------------------------
To understand the meaning of these various fields (which to the
author's knowledge are not documented anywhere), see the OpenAFS
source code. Some of these values are obvious, or intuitive, but
others are not.
=back
=head1 METHODS (with simple return values)
All of the following commands return a simple Boolean (true/false)
value, if they succeed or fail.
=head2 addsite
The vos help string is:
vos addsite: add a replication site
Usage: vos addsite -server <machine name for new site> -partition <partition name for new site>
-id <volume name or ID> [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->addsite
(
# Required arguments
server => $server,
partition => $partition,
id => $id,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 backup
The vos help string is:
vos backup: make backup of a volume
Usage: vos backup -id <volume name or ID> [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->backup
(
# Required arguments
id => $id,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 backupsys
The vos help string is:
vos backupsys: en masse backups
Usage: vos backupsys [-prefix <common prefix on volume(s)>+] [-server <machine name>]
[-partition <partition name>] [-exclude]
[-xprefix <negative prefix on volume(s)>+] [-dryrun]
[-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt]
Where: -exclude exclude common prefix volumes
-dryrun no action
The corresponding method invocation looks like:
my $result = $vos->backupsys
(
# Optional arguments
prefix => $prefix, # OR [ $prefix1, $prefix2, ... ]
server => $server,
partition => $partition,
exclude => 1,
prefix => $xprefix, # OR [ $xprefix1, $xprefix2, ... ]
dryrun => 1,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 changeaddr
The vos help string is:
vos changeaddr: change the IP address of a file server
Usage: vos changeaddr -oldaddr <original IP address> [-newaddr <new IP address>]
[-remove] [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
Where: -remove remove the IP address from the VLDB
The corresponding method invocation looks like:
my $result = $vos->changeaddr
(
# Required arguments
oldaddr => $oldaddr,
# Optional arguments
newaddr => $newaddr,
remove => 1,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 changeloc
The vos help string is:
vos changeloc: change an RW volume's location in the VLDB
Usage: vos changeloc -server <machine name for new location>
-partition <partition name for new location>
-id <volume name or ID> [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->changeloc
(
# Required arguments
server => $server,
partition => $partition,
id => $id,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 clone
The vos help string is:
vos clone: make clone of a volume
Usage: vos clone -id <volume name or ID>
[-server <server>] [-partition <partition>]
[-toname <volume name on destination>] [-toid <volume ID on destination>]
[-offline] [-readonly] [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->clone
(
# Required arguments
id => $id,
# Optional arguments
server => $server,
partition => $partition,
toname => $newname,
toid => $newid,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 convertROtoRW
The vos help string is:
vos convertROtoRW: convert a RO volume into a RW volume (after loss of old RW volume)
Usage: vos convertROtoRW -server <machine name> -partition <partition name>
-id <volume name or ID> [-force] [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->convertROtoRW
(
# Required arguments
server => $server,
partition => $partition,
id => $id,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 copy
The vos help string is:
vos copy: copy a volume
Usage: vos copy -id <volume name or ID on source> -fromserver <machine name on source>
-frompartition <partition name on source> -toname <volume name on destination>
-toserver <machine name on destination> -topartition <partition name on destination>
[-offline] [-readonly] [-live] [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->copy
(
# Required arguments
id => $id,
fromserver => $server,
frompartition => $partition,
toname => $name
toserver => $newserver,
topartition => $newpartition,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 create
The vos help string is:
vos create: create a new volume
Usage: vos create -server <machine name> -partition <partition name>
-name <volume name> [-maxquota <initial quota (KB)>]
[-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->create
(
# Required arguments
server => $server,
partition => $partition,
name => $name,
# Optional arguments
maxquota => $maxquota,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 delentry
The vos help string is:
vos delentry: delete VLDB entry for a volume
Usage: vos delentry [-id <volume name or ID>+]
[-prefix <prefix of the volume whose VLDB entry is to be deleted>]
[-server <machine name>] [-partition <partition name>]
[-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->delentry
(
# Optional arguments
id => $id, # OR [ $id1, $id2, ... ]
prefix => $prefix,
server => $server,
partition => $partition,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 lock
The vos help string is:
vos lock: lock VLDB entry for a volume
Usage: vos lock -id <volume name or ID> [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->lock
(
# Required arguments
id => $id,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 move
The vos help string is:
vos move: move a volume
Usage: vos move -id <volume name or ID> -fromserver <machine name on source>
-frompartition <partition name on source>
-toserver <machine name on destination>
-topartition <partition name on destination> [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->move
(
# Required arguments
id => $id,
fromserver => $fromserver,
frompartition => $frompartition,
toserver => $toserver,
topartition => $topartition,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 offline
The vos help string is:
Usage: vos offline -server <server name> -partition <partition name>
-id <volume name or ID> [-sleep <seconds to sleep>]
[-busy] [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->offline
(
# Required arguments
id => $id,
server => $server,
partition => $partition,
# Optional arguments
sleep => $sleep,
busy => 1,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 online
The vos help string is:
Usage: vos online -server <server name> -partition <partition name>
-id <volume name or ID> [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->online
(
# Required arguments
id => $id,
server => $server,
partition => $partition,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 release
The vos help string is:
vos release: release a volume
Usage: vos release -id <volume name or ID> [-force] [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
Where: -force force a complete release
The corresponding method invocation looks like:
my $result = $vos->release
(
# Required arguments
id => $id,
# Optional arguments
force => 1,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 remove
The vos help string is:
vos remove: delete a volume
Usage: vos remove [-server <machine name>] [-partition <partition name>]
-id <volume name or ID> [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->remove
(
# Required arguments
id => $id,
# Optional arguments
server => $server,
partition => $partition,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 remsite
The vos help string is:
vos remsite: remove a replication site
Usage: vos remsite -server <machine name> -partition <partition name>
-id <volume name or ID> [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->remsite
(
# Required arguments
id => $id,
server => $server,
partition => $partition,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 rename
The vos help string is:
vos rename: rename a volume
Usage: vos rename -oldname <old volume name > -newname <new volume name >
[-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->rename
(
# Required arguments
oldname => $oldname,
newname => $newname,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 setfields
The vos help string is:
vos setfields: change volume info fields
Usage: vos setfields -id <volume name or ID> [-maxquota <quota (KB)>]
[-clearuse] [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
Where: -clearuse clear dayUse
The corresponding method invocation looks like:
my $result = $vos->setfields
(
# Required arguments
id => $id,
# Optional arguments
maxquota => $maxquota,
clearuse => 1,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 shadow
The vos help string is:
vos shadow: make or update a shadow volume
Usage: vos shadow -id <volume name or ID on source> -fromserver <machine name on source>
-frompartition <partition name on source> -toserver <machine name on destination>
-topartition <partition name on destination> [-toname <volume name on destination>]
[-toid <volume ID on destination>] [-offline] [-readonly] [-live] [-incremental]
[-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->shadow
(
# Required arguments
id => $id,
fromserver => $server,
frompartition => $partition,
toserver => $newserver,
topartition => $newpartition,
# Optional arguments
toname => $newname
toid => $newid
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 syncserv
The vos help string is:
vos syncserv: synchronize server with VLDB
Usage: vos syncserv -server <machine name> [-partition <partition name>]
[-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->syncserv
(
# Required arguments
server => $server,
# Optional arguments
partition => $partition,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 syncvldb
The vos help string is:
vos syncvldb: synchronize VLDB with server
Usage: vos syncvldb [-server <machine name>] [-partition <partition name>]
[-volume <volume name or ID>] [-cell <cell name>]
[-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->syncvldb
(
# Optional arguments
server => $server,
partition => $partition,
volume => $volume,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 unlock
The vos help string is:
vos unlock: release lock on VLDB entry for a volume
Usage: vos unlock -id <volume name or ID> [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->unlock
(
# Required arguments
id => $id,
# Optional arguments
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 unlockvldb
The vos help string is:
vos unlockvldb: unlock all the locked entries in the VLDB
Usage: vos unlockvldb [-server <machine name>] [-partition <partition name>]
[-cell <cell name>] [-noauth] [-localauth] [-verbose] [-encrypt]
The corresponding method invocation looks like:
my $result = $vos->unlockvldb
(
# Optional arguments
server => $server,
partition => $partition,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head2 zap
The vos help string is:
vos zap: delete the volume, don't bother with VLDB
Usage: vos zap -server <machine name> -partition <partition name> -id <volume ID>
[-force] [-backup] [-cell <cell name>] [-noauth]
[-localauth] [-verbose] [-encrypt]
Where: -force force deletion of bad volumes
-backup also delete backup volume if one is found
The corresponding method invocation looks like:
my $result = $vos->zap
(
# Required arguments
server => $server,
partition => $partition,
id => $id,
# Optional arguments
force => 1,
backup => 1,
cell => $cell,
noauth => 1,
localauth => 1,
verbose => 1,
encrypt => 1,
);
=head1 SEE ALSO
AFS::Command(1), AFS::Object(1)
=cut