AFS
view release on metacpan or search on metacpan
pod/v2/afsperlvos.pod view on Meta::CPAN
PARTITION arguments. The volume's space quota is set to 5000 kilobyte
blocks by default. Use the MAXQUOTA argument to specify a different
quota.
VOLID specifies the volume ID for the read/write volume. If this
argument is not specified, or the given volume ID is 0, a volume ID
will be allocated for the volume automatically. The volume IDs
allocated should be fine for almost all cases, so you should almost
never need to specify this argument.
ROVOLID specifies the volume ID for the readonly volume corresponding
to the read/write volume that is being created. The readonly volume
will not be created; this merely specifies what volume ID the readonly
volume will use when it is created. If a volume ID of 0 is specified
here, no readonly volume ID will be assigned to the created volume
immediately. A readonly volume ID can still be assigned later when
B<vldb->addsite> is run; if a volume does not have a readonly volume
ID associated with it by the time B<vos->:release> is run, a volume ID
will be allocated for it. If this argument is not specified, the
default readonly volume ID is one number higher than the read-write
volume ID, whether or not that ID was manually specified. As with the
B<VOLID> argument, the default allocated volume IDs should be sufficient
for almost all cases, so you should almost never need to specify this
argument.
These two arguments (VOLID, ROVOLID) are supported when the AFS Perl
modules are linked with the OpenAFS system libraries v1.4.12 or later.
It returns the volume id number of the new volume. It calls the AFS
system library function I<UV_CreateVolume2> or I<UV_CreateVolume3>
(OpenAFS v.1.4.12 or later).
=item B<$ok = $vos-E<gt>dump(VOLUME [, TIME [, FILE [, SERVER, PARTITION, CLONE_FLG, OMIT_FLG]]]);>
Converts the contents of the indicated volume, which can be
read/write, read-only or backup, into ASCII format. VOLUME specifies
either the complete name or volume ID number of the volume. The
Volume Server writes the converted contents to the FILE or to the
standard output stream (default). To dump the complete contents of a
volume (create a full dump), set TIME to 0 (default). To create an
incremental dump, which includes only the files and directories in the
volume that have modification timestamps later than a certain time,
specify a date and time as the value for the TIME argument. By
default, the VL server consults the Volume Location Database (VLDB) to
learn the volume's location. To dump the read-only volume from a
particular site, use the SERVER and PARTITION arguments to specify the
site.
If CLONE_FLG is set to 1 (default 0), it will clone the volume first
and then dumps the clone. This can significantly decrease the amount
of time the volume is kept locked for dumps of large volumes. By
default, it includes all directory objects in an incremental dump
whether theyâve been changed or not.
If the OMIT_FLG is set to 1 (default 0), unchanged directories will be
omitted. This will reduce the size of the dump and not cause problems
if the incremental is restored, as expected, on top of a volume
containing the correct directory structure (such as one created by
restoring previous full and incremental dumps).
B<These two flags are supported with OpenAFS system libraries 1.4.5 or
later.>
It calls the AFS system library function I<UV_DumpVolume>.
=item B<@part = $vos-E<gt>listpart(SERVER);>
Returns a list of the valid AFS partitions on the indicated file
SERVER machine.
It calls the AFS system library function I<UV_ListPartitions>.
=item B<$vollist = $vos-E<gt>listvol(SERVER [, PARTITION [, FAST [, EXTENDED]]]);>
Returns information about volume headers. The actual information
returned depends on the combination of arguments supplied when the
method is applied. To get volume header information for various
numbers of volumes, combine the arguments as indicated:
* For every volume on a file server machine, specify the SERVER
argument.
* For every volume at a particular site, combine the SERVER argument
with the PARTITION argument.
If you set EXTENDED (default 0) to 1, it returns extensive statistics
about access patterns for each volume. If you set FAST (default 0) to
1, it returns only the volume IDs and the numbers of volumes.
The return value is a reference to a hash table containing the values
from the C structure C<volintinfo>. The hash table has the following
keys
backupID cloneID creationDate
dayUse inUse maxquota
parentID server size
status type updateDate
copyDate backupDate accessDate
volid
It calls the AFS system library function I<UV_ListPartitions>.
You can find an example how to print the entire content of the
returned hash reference in the C<examples/v2/vos> directory.
=item B<$vollist = $vos-E<gt>listvolume(VOLUME);>
Returns information about the volume header of the indicated volume.
VOLUME specifies either the complete name or volume ID number of the
volume. The return value is a reference to a hash table containing the
values from the C structure C<volintinfo>. For a list of the hash
keys see above.
It calls the AFS system library function I<UV_ListOneVolume>.
You can find an example how to print the entire content of the
returned hash reference in the C<examples/v2/vos> directory.
=item B<$volid = $vos-E<gt>move(VOLUME, FSERVER, FPARTITION, TSERVER, TPARTITION);>
Moves the indicated read/write volume from its current site FSERVER,
FPARTITION to the destination site TSERVER, TPARTITION. VOLUME
pod/v2/afsperlvos.pod view on Meta::CPAN
Removes the indicated volume. VOLUME specifies either the complete
name or volume ID number of the volume. To remove the read-only
volume from a particular site, specify the SERVER and PARTITION
arguments. It returns the volume id number of the removed volume. It
calls the AFS system library function I<UV_DeleteVolume>.
=item B<$ok = $vos-E<gt>rename(ONAME, NNAME);>
Changes the name of the read/write volume from ONAME to NNAME.
It calls the AFS system library function I<UV_RenameVolume>.
=item B<$ok = $vos-E<gt>restore(SERVER, PARTITION, VOLUME [, DUMPFILE [, ID [, INTER [, OVERWRITE [, OFFLINE [, READONLY]]]]]] );>
Converts the ASCII file DUMPFILE or the standard input stream
(default) and restores it as a read/write VOLUME to the PARTITION on
the SERVER. ID specifies the volume ID number to assign to the
restored volume. OVERWRITE must be specified when overwriting an
existing volume. The following values are possible:
=over 4
=item B<a> to abort the restore operation.
=item B<f> if restoring a full dump file.
=item B<i> if restoring an incremental dump file.
=back
Set OFFLINE (default 0) to 1 to leave restored volume offline. Set
READONLY (default 0) to 1 to make the restored volume read-only.
If the VOLUME already exists, the OVERWRITE argument is omitted, and
the INTER argument (default 0) is set to 1 the method is interactively
prompting for the type of restore (exactly like the I<vos restore>
command).
It calls the AFS system library function I<UV_RestoreVolume>.
=item B<$ok = $vos-E<gt>setquota(VOLUME, QUOTA [, CLEAR]);>
Sets the QUOTA for the specified volume. Specify the number of
one-kilobyte blocks as a positive integer (1024 is one megabyte).
VOLUME specifies either the complete name or volume ID number of the
volume. Set CLEAR (default 0) to 1 to clear the access counter on the
VOLUME, shown on the B<examine> method. It calls the AFS system
library function I<UV_SetVolumeInfo>.
=item B<$stat = $vos-E<gt>status(SERVER);>
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
Linear Accelerator Center, a department of Stanford University. This
documentation were written by
=over
=item Alf Wachsmann E<lt>alfw@slac.stanford.eduE<gt>,
=item Venkata Phani Kiran Achanta E<lt>neo_phani@hotmail.comE<gt>, and
=item Norbert E. Gruener E<lt>nog@MPA-Garching.MPG.deE<gt>
=item S< >
=back
=head1 COPYRIGHT AND LICENSE
Copyright (c) 2005-2011 Norbert E. Gruener <nog@MPA-Garching.MPG.de>
Copyright (c) 2003-2004 Alf Wachsmann <alfw@slac.stanford.edu>,
Venkata Phani Kiran Achanta <neo_phani@hotmail.com>, and
Norbert E. Gruener <nog@MPA-Garching.MPG.de>
All rights reserved.
Most of the explanations in this document are taken from the original
AFS documentation.
AFS-3 Programmer's Reference:
Volume Server/Volume Location Server Interface
Edward R. Zayas
Copyright (c) 1991 Transarc Corporation.
All rights reserved.
IBM AFS Administration Reference
Copyright (c) IBM Corporation 2000.
All rights reserved.
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 DOCUMENT VERSION
Revision $Rev: 1082 $
( run in 1.389 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )