volprint(1M) Volume Manager Utilities volprint(1M)
NAME
volprint - Displays records from the Volume Manager
configuration
SYNOPSIS
volprint [ -vpshnlafmStq ] [ -e pattern ] [ -d database ]
[ -F format-spec ] [ name .. ]
DESCRIPTION
The volprint utility displays complete or partial
information from records in the Volume Manager configuration
database. Complete information is displayed in a format
that can be used as input to the volmake utility, or as
input to awk(1). Also, complete records can be packed into
a single line for processing by line-oriented programs such
as sed(1) or grep(1). Records can be selected by name or
with special search expressions. Additionally, hierarchies
can be displayed in an orderly fashion so that the structure
of the database is more apparent.
The default output format is single-line records containing
a record type, name, usage-type (or - for plexes and
subdisks), enabled state (or - for subdisks), length, and
the comment. A one-line header is written before any record
information.
By default, all records in the configuration are selected.
OPTIONS
The following options are recognized:
-v Select only volumes to be displayed. This restricts
the records matched with search patterns. Also, the
default selection of all records in the database is
then restricted to all volumes. If a name operand
names a plex or subdisk, then a diagnostic is written
to the standard error.
-p Select only plexes.
-s Select only subdisks. Note: the -v, -p, and -s options
may be combined to specify that more than one record
type is allowed. Specifying all three options restores
the default behavior.
-e pattern
Use a volume configuration search expression to select
records to be displayed. See volpattern(3X) for a
description of search patterns.
-h List complete hierarchies below selected records. For
volumes, this list includes all associated plexes and
Page 1 (printed 1/21/92)
volprint(1M) Volume Manager Utilities volprint(1M)
subdisks. For plexes, this list includes all
associated subdisks. Hierarchies are separated in the
output by a blank line. The order of output is a
volume name, followed by one associated plex, followed
by all of the subdisks for that plex, followed by
another associated plex, followed by all of the
subdisks for the second plex, and so on.
The -v, -p and -s options limit the selection only of
the head of a hierarchy. They do not prevent the
display of associated records through the -h option.
Unless objects are named explicitly with name operands,
a record is never displayed in two separate
hierarchies. Thus, a selected plex is not displayed as
a separate hierarchy if the volume that is associated
with the plex is also selected.
-n Display only the names of selected records.
-l Display all information from each selected record.
This information is in a free format that is not
intended for use by scripts. The format is more
convenient than the -m format for looking at records
directly, because the density of information is more
appropriate to human viewing.
-a Display all information about each selected record, one
record per line. The format is the same as for the -m
option, except that the -a option format appears on a
single line with one space character between each
field, and the list of associated records is not
displayed. This format is useful for processing output
through filters such as sed and grep that operate
exclusively on one-line records, although the fields
are not readily distinguishable. It isn't a practical
format from the viewpoint of human readability.
-m Display all information about each selected record in a
format that is useful as input to both the volmake
utility and to awk(1) scripts. The format used is the
volmake description format (see volmake(4)). In
addition to record information, the list of plex or
subdisk records associated with selected volume or plex
records is displayed. Each field is output on a
separate line, indented by a single tab. Values for
fields that contain comment-style strings are always
preceded by one double-quote character.
-f Display information about each record as one-line
output records containing the following fields:
Page 2 (printed 1/21/92)
volprint(1M) Volume Manager Utilities volprint(1M)
1. Record type
2. Record name
3. Usage-type, volume association, or plex association
(or - for unassociated plexes and subdisks)
4. Enabled state (or - for subdisks)
5. Length, in units of system sectors
6. Plex association offset (or - for volumes or
plexes). This field will appear as LOG for log
subdisks.
7. Usage dependent state (or - for subdisks)
8. The tutil[0] field. This field is set by usage-
types as a lockout mechanism.
9. The putil[0] field. This field can be set to
prevent associations of plex or subdisk records.
A one-line header is written before any record
information.
-t Print single-line output records that depend upon the
configuration record type. For subdisks, the output
consists of the following fields, in order from left to
right:
1. Record type, sd
2. Record name
3. Associated plex, or - if the subdisk is dissociated
4. Plex association offset in sectors, or - if
dissociated
5. Device offset in sectors
6. Subdisk length in sectors
7. Device for the subdisk
For plexes, the output consists of the following
fields, from right to left:
1. Record type, pl
2. Record name
3. Associated volume, or - if the plex is dissociated
4. Plex kernel state
5. Plex utility state
6. Plex length in sectors
7. Plex layout type
8. Plex stripe width, or - if the plex is not striped
For volumes, the output consists of the following
fields, from right to left:
1. Record type, v
2. Record name
3. Associated usage type
4. Volume kernel state
5. Volume utility state
Page 3 (printed 1/21/92)
volprint(1M) Volume Manager Utilities volprint(1M)
6. Volume length in sectors
7. Owner of the volume
8. Group of the volume
9. Permission modes for the volume, in octal
A header line is printed before any record information,
for each type of record that could be selected based on
the -v, -p -s and -h options. These header lines are
followed by a single blank line.
-q Suppress headers that would otherwise be printed for
the default and the -t and -f output formats.
-S Display configuration summary information. The output
consists of a header line followed by a line containing
the total number of subdisks, plexes and volumes, the
number of unassociated subdisks and the number of
unassociated plexes.
-F [types:]format-spec
Set a literal format string to use for displaying
record information. If the option argument begins with
a comma-separated list of zero or more record types
(sd, plex, or vol), followed by a colon, then the
format-spec after the colon is used when printing the
indicated record types. If no record types are
specified, then all record types are assumed.
The order of -F options is significant, with
specifications later in the option list overriding
earlier specifications. Any use of -F overrides any
other option letter specifying a type of format for the
indicated record types. Thus, -F vol:format-spec can
be used with the -t option to change the format used
for volumes, while still using the -t format for plex
and subdisk records.
The format-spec string consists of literal text with
embedded configuration record variables. Configuration
record variables are introduced with a percent sign
(%). The percent sign is followed by a variable name
or by a variable name and optional field width in
braces. The following formats are allowed for a
variable specification:
%field-name
%{field-name}
%{field-name:[[-]width][*]}
The second format allows a field to be specified with
immediately surrounding text that would otherwise be
taken as part of the field name. The third format
Page 4 (printed 1/21/92)
volprint(1M) Volume Manager Utilities volprint(1M)
allows the specification of a justification and a field
width.
If no field width is specified, then the number of
output column positions used for the field is the
smallest possible to contain the value; otherwise
spaces are added in the output to make it at width
columns in length. A field is not truncated if the
minimum number of column positions necessary for a
value is greater than width.
If a field width is specified with a leading -
character, then an output field is lengthened by adding
spaces after the field value, yielding a left justified
field. Otherwise, spaces are added before the value,
yielding a right-justified field.
If a field width is followed or replaced by an asterisk
character, then an unrecognized or inappropriate field
yields no output for the field, or a field containing
all blanks. Without the asterisk, the printed field
contains the character -.
One % can be displayed by including two % characters in
format-spec.
See the ``Record Fields'' section for a description of
the field names that can be specified. An invalid
format string may yield unexpected output but does not
generate an error.
-d database
Use the specified configuration database. This
configuration can indicate an on-disk file, with a
pathname, offset and length, where each field is
separated in the database option argument by blanks or
a comma. Alternately, one of a set of named physical
or logical configuration databases can be named. The
recognized named databases are
vold The configuration maintained by the volume
daemon utility vold. This database is
retrieved by making calls to the Volume
Manager library functions to get all
configuration records.
kernel The configuration that exists in the kernel.
This database is retrieved through the
/dev/volconfig interface. It cannot be used
if vold is currently running, or if some
other process has /dev/volconfig open.
Page 5 (printed 1/21/92)
volprint(1M) Volume Manager Utilities volprint(1M)
pending The pending configuration that resides in the
kernel. This includes the changes in the
last partially committed transaction, and
differs from the kernel configuration only if
vold was killed while committing a
transaction from a client. This database is
also retrieved through the /dev/volconfig
interface, and cannot be retrieved if vold is
running, or some other process has
/dev/volconfig open.
See the voladm(1M) utility for more information on
databases and how they can be named.
The database option argument can be - to indicate that
a database shall be read from the standard input. This
database should be in the record description format
used as input to volmake.
By default the vold database is used.
RECORD FIELDS
The field names that can be used with the format-spec string
of the -F option and that are produced for the -m or -a
options are the same as those that can be provided as input
to the volmake utility. For a list of these field names see
volmake(4). Some additional pseudo fields are also
supported. These are
name The name of the record being displayed. Because
the record name is specified positionally within
volmake description formats, the volmake utility,
and the -m and -a options to volprint do not
explicitly provide this field name.
rectype This is either vol, plex or sd depending upon
whether the record being displayed is a volume,
plex or subdisk.
assoc The name of the volume or plex to which a plex or
subdisk record is associated. If the record is
not associated this field is empty.
useassoc The usage type for volume records and the
association name for associated plexes and
subdisks. For dissociated plexes and subdisks,
this is an empty string.
aslist A comma-separated list of subdisks or plexes that
are associated with a plex or volume record.
sdaslist A comma-separated list of subdisks associated with
Page 6 (printed 1/21/92)
volprint(1M) Volume Manager Utilities volprint(1M)
a plex. Each subdisk name is followed by a colon
and the subdisk's plex association offset, in
sectors. For volume records, this field is
equivalent to aslist.
Displaying a boolean value always yields on or off. If a
field containing a length or offset is specified in a
format-spec string, then the result is the length or offset
in sectors. When the field is displayed with -m or -a the
length or offset is displayed in sectors with a suffix of s.
EXIT CODES
The volprint utility exits with a nonzero status if the
attempted operation fails. A nonzero exit code is not a
complete indicator of the problems encountered but rather
denotes the first condition that prevented further execution
of the utility.
See volintro(1M) for a list of standard exit codes.
EXAMPLE
To display the names of all unassociated plexes, use the
command
volprint -n -p -e !assoc
FILES
/usr/lib/VxVM/voldrequest The STREAMS rendezvous point for
connecting with the volume
daemon when reading from the
vold database.
/dev/volconfig The kernel interface used to
retrieve the kernel and pending
configurations.
SEE ALSO
volintro(1M), vold(1M), voladm(1M), volmake(1M),
volpattern(3X). volconfig(7), awk(1), sed(1), and grep(1).
Page 7 (printed 1/21/92)