=head1 NAME

vos_listvol - Displays information from a volume header

=head1 SYNOPSIS

=for html
<div class="synopsis">

B<vos listvol> S<<< B<-server> <I<machine name>> >>>
    S<<< [B<-partition> <I<partition name>>] >>> [B<-fast>] [B<-long>] [B<-quiet>]
    [B<-extended>] S<<< [B<-cell> <I<cell name>>] >>> [B<-noauth>] [B<-localauth>]
    [B<-verbose>] [B<-help>]

B<vos listvo> S<<< B<-s> <I<machine name>> >>> S<<< [B<-p> <I<partition name>>] >>> [B<-f>]
    [-lon] [B<-q>] [B<-e>] S<<< [B<-c> <I<cell name>>] >>> [B<-n>] [B<-loc>]
    [B<-v>] [B<-h>]

=for html
</div>

=head1 DESCRIPTION

The B<vos listvol> command formats and displays the following information
from the volume header of each specified volume: volume name, volume ID,
volume type, size, and status at the server. The actual information
displayed depends on the combination of arguments supplied when the
command is issued. To display volume header information for various
numbers of volumes, combine the command's arguments as indicated:

=over 4

=item *

For every volume on a file server machine, specify the machine's name with
the B<-server> argument.

=item *

For every volume at a particular site, combine the B<-server> argument
with the B<-partition> argument.

=back

To display the Volume Location Database (VLDB) entry for one or more
volumes, use the B<vos listvldb> command. To display both the VLDB entry
and the volume header for a single volume, use the B<vos examine> command.

=head1 OPTIONS

=over 4

=item B<-server> <I<server name>>

Identifies the file server machine that houses volumes for which to
display the header. Provide the machine's IP address or its host name
(either fully qualified or using an unambiguous abbreviation). For
details, see L<vos(1)>.

This argument can be combined with the B<-partition> argument, as well as
the B<-fast>, B<-long>, or B<-extended> flag.

=item B<-partition> <I<partition name>>

Identifies the partition (on the file server machine specified by the
B<-server> argument) that houses volumes for which to display the
header. Provide the partition's complete name with preceding slash (for
example, F</vicepa>) or use one of the three acceptable abbreviated
forms. For details, see L<vos(1)>.

=item B<-fast>

Displays only the volume ID numbers of volumes stored at the site
specified by the B<-server>, and optionally B<-partition>, argument. Do
not combine this flag with the B<-extended> flag.

=item B<-long>

Displays more detailed information about each volume stored at the site
specified by the B<-server>, and optionally B<-partition>, argument. The
information includes the volume IDs of all three volume types associated
with the volume, and the read/write volume's quota, creation date and
update date.

=item B<-quiet>

Suppresses the lines that summarize the number of volumes listed and their
status, which otherwise appear at the beginning and end of the output when
the output includes more than one volume.

=item B<-extended>

Displays extensive statistics about access patterns for each volume stored
at the site specified by the B<-server>, and optionally B<-partition>,
argument. The statistics include the number of reads and writes to files
in the volume, and how recently files and directories have been updated by
their owners or other users. Do not combine this flag with the B<-fast>
flag.

=item B<-cell> <I<cell name>>

Names the cell in which to run the command. Do not combine this argument
with the B<-localauth> flag. For more details, see L<vos(1)>.

=item B<-noauth>

Assigns the unprivileged identity C<anonymous> to the issuer. Do not
combine this flag with the B<-localauth> flag. For more details, see
L<vos(1)>.

=item B<-localauth>

Constructs a server ticket using a key from the local
F</usr/afs/etc/KeyFile> file. The B<vos> command interpreter presents it
to the Volume Server and Volume Location Server during mutual
authentication. Do not combine this flag with the B<-cell> argument or
B<-noauth> flag. For more details, see L<vos(1)>.

=item B<-verbose>

Produces on the standard output stream a detailed trace of the command's
execution. If this argument is omitted, only warnings and error messages
appear.

=item B<-help>

Prints the online help for this command. All other valid options are
ignored.

=back

=head1 OUTPUT

The output is ordered alphabetically by volume name and by default
provides the following information on a single line for each volume:

=over 4

=item *

Name

=item *

Volume ID number

=item *

Type (the flag is C<RW> for read/write, C<RO> for read-only, C<BK> for
backup)

=item *

Size in kilobytes (C<1024> equals a megabyte)

=item *

Number of files in the volume, if the B<-extended> flag is provided

=item *

Status on the file server machine, which is one of the following:

=over 4

=item On-line

The volume is completely accessible to Cache Managers.

=item Off-line

The volume is not accessible to Cache Managers, but does not seem to be
corrupted. This status appears while a volume is being dumped, for
example.

=item Off-line**needs salvage**

The volume is not accessible to Cache Managers, because it seems to be
corrupted. Use the B<bos salvage> or B<salvager> command to repair the
corruption.

=back

=back

If the following message appears instead of the previously listed
information, it indicates that a volume is not accessible to Cache
Managers or the B<vos> command interpreter, for example because a clone is
being created.

   **** Volume <volume_ID> is busy ****

If the following message appears instead of the previously listed
information, it indicates that the File Server is unable to attach the
volume, perhaps because it is seriously corrupted. The F<FileLog> and
F<VolserLog> log files in the F</usr/afs/logs> directory on the file
server machine possibly provide additional information; use the B<bos
getlog> command to display them.

   **** Could not attach volume <volume_ID> ****

The information about individual volumes is bracketed by summary
lines. The first line of output specifies the number of volumes in the
listing. The last line of output summarizes the number of volumes that are
online, offline, and busy. These lines do not appear if the B<-quiet> flag
is used.

If the B<-fast> flag is added, the output displays only the volume ID
number of each volume, arranged in increasing numerical order. The final
line (which summarizes the number of online, offline, and busy volumes) is
omitted.

If the B<-long> flag is included, the output for each volume includes all
of the information in the default listing plus the following. Each item in
this list corresponds to a separate line of output:

=over 4

=item *

The file server machine and partition that house the volume, as determined
by the command interpreter as the command runs, rather than derived from the
VLDB or the volume header.

=item *

The volume ID numbers associated with the various versions of the volume:
read/write (C<RWrite>), read-only (C<ROnly>), backup (C<Backup>), and
ReleaseClone (C<RClone>). One of them matches the volume ID number that
appears on the first line of the volume's output. If the value in the
C<RWrite>, C<ROnly>, or C<Backup> field is C<0> (zero), there is no volume
of that type. If there is currently no ReleaseClone, the C<RClone> field
does not appear at all.

=item *

The maximum space quota allotted to the read/write copy of the volume,
expressed in kilobyte blocks in the C<MaxQuota> field.

=item *

The date and time the volume was created, in the C<Creation> field. If the
volume has been restored with the B<backup diskrestore>, B<backup
volrestore>, or B<vos restore> command, this is the restore time.

=item *

The date and time when the contents of the volume last changed, in the
C<Last Update> field. For read-only and backup volumes, it matches the
timestamp in the C<Creation> field.

=item *

The number of times the volume has been accessed for a fetch or store
operation since the later of the two following times:

=over 4

=item *

12:00 a.m. on the day the command is issued

=item *

The last time the volume changed location

=back

=back

If the B<-extended> flag is included, the output for each volume includes
all of the information reported with the B<-long> flag, plus two tables of
statistics:

=over 4

=item *

The table labeled C<Raw Read/Write Stats> table summarizes the number of
times the volume has been accessed for reading or writing.

=item *

The table labeled C<Writes Affecting Authorship> table contains
information on writes made to files and directories in the specified
volume.

=back

=head1 EXAMPLES

The following example shows the output for the F</vicepb> partition on the
file server machine C<fs2.abc.com> when no flags are provided:

   % vos listvol -server fs2.abc.com -partition b
   Total number of volumes on server fs2.abc.com partition /vicepb : 66
   sys                  1969534847 RW       1582 K On-line
   sys.backup           1969535105 BK       1582 K On-line
         .                   .     .         .   .    .
         .                   .     .         .   .    .
   user.pat             1969534536 RW      17518 K On-line
   user.pat.backup      1969534538 BK      17537 K On-line
   Total volumes onLine 66 ; Total volumes offLine 0 ;  Total busy 0

The following example shows the output when the B<-fast> flag is added:

   % vos listvol -server fs2.abc.com -partition b -fast
   Total number of volumes on server fs2.abc.com partition /vicepb : 66
    1969516782
    1969516784
        .
        .
    1969535796

The following example shows two volumes from the output that appears when
the B<-long> flag is added:

   % vos listvol -server fs2.abc.com -partition b -long
   Total number of volumes on server fs2.abc.com partition /vicepb: 66
         .                   .      .         .   .    .
         .                   .      .         .   .    .
   user.pat             1969534536 RW      17518 K On-line
        fs2.abc.com /vicepb
        RWrite 1969534536 ROnly 0        Backup 1969534538
        MaxQuota      20000 K
        Creation    Mon Jun 12 09:02:25 1989
        Last Update Thu May 20 17:39:34 1999
        1573 accesses in the past day (i.e., vnode references)
   user.pat.backup      1969534538 BK      17537 K On-line
        fs2.abc.com /vicepb
        RWrite 1969534536 ROnly 0        Backup 1969534538
        MaxQuota      20000 K
        Creation    Tue Jun 13 04:37:59 1989
        Last Update Wed May 19 06:37:59 1999
        0 accesses in the past day (i.e., vnode references)
          .                   .      .         .   .    .
          .                   .      .         .   .    .
   Total volumes onLine 66 ; Total volumes offLine 0 ; Total busy 0

=head1 PRIVILEGE REQUIRED

None

=head1 SEE ALSO

L<backup_diskrestore(8)>,
L<backup_volrestore(8)>,
L<bos_getlog(8)>,
L<bos_salvage(8)>,
L<salvager(8)>,
L<vos(1)>,
L<vos_examine(1)>,
L<vos_listvldb(1)>,
L<vos_restore(1)>

=head1 COPYRIGHT

IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

This documentation is covered by the IBM Public License Version 1.0.  It was
converted from HTML to POD by software written by Chas Williams and Russ
Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
