< Previous | Next > | |
Product: Volume Manager Manual Pages for Storage Foundation | |
Manual: Maintenance Commands (1m) |
vxprintNAMEvxprint - display records from the VERITAS Volume Manager configuration SYNOPSISvxprint [-aAbcCdfGhHlLmnpPqQrstvVx] [-D database] [-e pattern] [-F [type:] format-spec ] [-g diskgroup] [name...] vxprint [-AqS] [-g diskgroup] DESCRIPTIONThe vxprint utility displays complete or partial information from records in VERITAS Volume Manager (VxVM) disk group configurations. Records can be selected by name or with special search expressions. Selecting RVG and RLINK records via search expressions is not currently supported. Additionally, record association hierarchies can be displayed in an orderly fashion so that the structure of records is more apparent. Dashes (-) are displayed in the output wherever there is no applicable record value. If no options are specified, the default output uses -f, -h, -r, and -A. Specifying other options can override the these defaults, making it necessary to explicitly specify the normal default options. The default output format consists of single-line records, each of which includes a record type, name, usage type or object association, enabled state, length, and other fields. A one-line header is written before the record information. When no disk group is specified, selected records are retrieved from the default disk group as determined using the rules given in the vxdg(1M) manual page. Subdisks/Subvolumes are sorted primarily by their device/volume, subdisks may also include a device offset. Plex and volume records are sorted by name. Note 1: The vxprint utility can display disk group, disk media, volume, plex, subdisk/subvolume, data change object (DCO), and snap object records. It cannot display disk access records. Use the vxdisk list operation to display disk access records, or physical disk information. Note 2: The subvolume "record type" appears as sv as a convenience in displaying views of the configuration database. For manipulation purposes, these records are accessible as subdisk record types, that is, records tagged as type sd. OPTIONSThe -V, -P, -v, -p, -s, -d, and -G options may be combined to specify that more than one record type is allowed. Specifying all these options restores the default behavior of retrieving all record types. Display all information about each selected record, one record per line. The contents are similar to the -m option, with the following exceptions: the -a option format appears on a single line with one space character between each field, the list of associated records is not displayed, and the -m option retains the sd record type rather than sv . 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 is not a practical format from the viewpoint of human readability. Print records from all active (imported) disk groups. Each disk group represented in the output is separated from other disk groups by blank lines. A short header line introduces each disk group. Note This option overrides the -g option. Print the size of fields such as object length and offset in units of 512 bytes, regardless of platform. If used with the -m option, the output values are qualified by a suffix character. Display only DCO and snap object records. Display only cache object records. Display only disk media records. Get a configuration from the specified location. The database option argument can be one of: Get a configuration from the volume configuration daemon. Read a configuration from the standard input. The standard input is expected to be in standard vxmake input format. Use a volume configuration search expression to select records to be displayed. See vol_pattern(4) for a description of search patterns. Selecting RVG and RLINK records via search expressions is not currently supported. Display information about each record as one-line output records containing the following fields, from left to right. A one-line header is written before any record information. Usage-type, volume association, or plex association (or - for unassociated plexes and subdisks). Kernel state (or - for subdisks, disks, or disk groups). Plex association offset (or - for volumes, plexes, disks, or disk groups). This field appears as LOG for log subdisks. Usage-dependent state (or - for subdisks). If an exception condition is recognized (a plex I/O failure, removed or inaccessible disk, or an unrecovered stale data condition), then that condition is listed instead of any usage-type-dependent state. The tutil[0] field is set by usage-types as a lockout mechanism. The putil[0] field can be set to prevent associations of plex or subdisk records. Set a literal format string for displaying record information. If the option argument begins with a comma-separated list of zero or more record types (dg, dm, plex, sd, vol, or vset) followed by a colon, the format_spec after the colon is used when printing the indicated record types. If no record types are specified, all record types are assumed. In this case, a colon can still be used to prevent parts of format_spec from being interpreted as a type. 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 ][ * ] } %{field_spec | field_spec [ |...] } The first format specifies the exact field name. 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 allows the specification of a justification and a field width. The fourth format allows alternate specifications to be used, either with or without justification and width specifications. For the fourth, the first specification is used if the specified field name is applicable to the record and is non-empty; otherwise, the next available specification is used. Any number of alternate specifications can be used. 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 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 dash (-) 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 either no output for the field or a field containing all blanks. Without the asterisk, the printed field contains the character -. A percent sign (%) can be displayed by including two percent 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. Display records from the specified disk group. The diskgroup argument can be a name or ID of a disk group. If neither the -g option nor the -A option is specified, vxprint displays information about the default disk group for the -F, -m and -n options, as determined using the rules given in the vxdg(1M) manual page. For other options, vxprint displays information about all disk groups. Note If the default disk group is the reserved disk group, nodg, some operations may fail. Display only disk group records. List hierarchies below selected records. For RVGs, this list includes all associated RLINKs, volumes, and subdisks. For volumes, this list includes all associated plexes and subdisks. For plexes, this list includes all associated subdisks/subvolumes. Hierarchies are separated in the output by a blank line. Each object listed occupies its own line. The order of output is the volume name, followed by an associated plex and its subdisks/subvolumes, followed by the next associated plex and its subdisks/subvolumes, and so on. If a DCO is associated with a volume, the order of output is the volume hierarchy (as described above) followed by the DCO and the DCO volume hierarchy (if a DCO volume is associated with the DCO), followed by any snap objects that are associated with the DCO. For an RVG, all RLINKs and volumes that are associated with it are displayed using a similar hierarchy. The -V, -P, -v, -p, -s and -c 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. Print help information on usage. Display all information from each selected record, including pfto values for DM records. This information is in a free format that is not intended for use by scripts. This format is more convenient than the -m format for looking at records directly, because the density of information is more appropriate for human viewing. Display all information about each selected record in a format that is useful as input to both the vxmake utility and to awk(1) scripts. The format used is the vxmake description format (see vxmake(4)). In addition to record information, the list of plex or subdisk/subvolume 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 and terminated by the end of the line. Note The -A option is not suitable for use with the -m option. This is because the vxmake command cannot handle vxprint output for multiple disk groups. Display only the names of selected records. Display only plexes. If a name operand refers to a volume or subdisk, then a diagnostic is written to the standard error. Suppress headers that would otherwise be printed for the default and the -t and -f output formats. Suppress the disk group header that separates each disk group. A single blank line still separates each disk group. Rendezvous point. This is a reserved option to indicate the communications point used with vxconfigd. Display related records of a volume containing subvolumes. Grouping is done under the highest level volume. Useful when used with the -r parameter. Display related records of a volume containing subvolumes, but grouping is done under any volume. Display only subdisks/subvolumes. If a name operand refers to a volume or plex, then a diagnostic is written to the standard error. Display configuration summary information. The output consists of a header line followed by a line containing the total number of subdisks/subvolumes, plexes, volumes, RVGs, and RLINKs; the number of unassociated subdisks/subvolumes; and the number of unassociated plexes. Print single-line output records that depend upon the configuration record type. For cache objects, the output consists of the following fields, from left to right. Name of associated cache volume. For DCOs, the output consists of the following fields, from left to right. Associated volume, or dash (-) if the DCO is dissociated. Name of the DCO volume, or dash (-) if no DCO volume is associated with the DCO object. For disk group records, the output consists of the following fields, in order from left to right. Number of configuration database copies. The base minor number of the disk group. For disk media records, the output consists of the following fields, in order from left to right: Underlying disk access record. Disk access record type (auto, simple or nopriv). Length of the disk's private region. Length of the disk's public region. A string representing the state of the disk media: Marked as not for use with ISP. Disk cannot be used for Hot-Relocation. Disk is being removed from disk group. Disk is marked as a spare for disk group. Disk is marked as spare for storage pool. For subcaches and subdisks, the output consists of the following fields, from left to right. Record type (sc or sd for subcache or subdisk). Associated plex, or dash (-) if the subdisk is dissociated. For subcaches, the name of the cache. For subdisks, the name of the disk media record used by the subdisk. Device (cache or disk, as appropriate) offset in sectors. Subcache or subdisk length in sectors. Plex association offset, optionally preceded by subdisk column number for subdisks associated with striped plexes. LOG is displayed for log subdisks. If the subdisk is dissociated, the putil[0] field is displayed. The putil[0] field can be non-empty to reserve the subdisk's space for non-volume uses. If the putil[0] field is empty, - is displayed for dissociated subdisks. Name of the disk access record used by the subcache or subdisk. A string representing the I/O mode of the subcache or subdisk: The subdisk has been detached. The subdisk in a RAID-5 plex has failed and the RAID-5 volume is in degraded mode (d indicates that the subdisk is detached, and S indicates that its contents are stale). The subdisk has been detached in the kernel due to an error. The media record on which the subdisk is defined has no associated access record. The subdisk is part of a RAID-5 plex and has stale content. The subdisk has failed and is waiting to be relocated. The media record on which the subdisk is defined has been removed from its disk access record by a utility. For plexes, the output consists of the following fields, from left to right: Associated volume, or - if the plex is dissociated. Plex utility state. If an exception condition is recognized on the plex (an I/O failure, a removed or inaccessible disk, or an unrecovered stale data condition), then that condition is listed instead of the value of the plex record's state field. Number of columns and plex stripe width, or - if the plex is not striped. Plex I/O mode: RW (read-write), WO (write-only) or RO (read-only). For RLINKs, the output consists of the following fields, in order from left to right: Associated RVG, or - if the RLINK is dissociated. RLINK kernel state (derived from various flags). For RVGs, the output consists of the following fields, in order from left to right: RVG kernel state (derived from various flags). RVG primary flag (primary or secondary). For snap objects, the output consists of the following fields, from left to right. Name of the volume whose snapshot information this snap object records. Name of the DCO with which this snap record is associated. For storage pool records (used with the Intelligent Storage Provisioning (ISP) feature), the output consists of the following fields, in order from left to right. Number of disks in the storage pool. Number of spare disks in the storage pool. Number of application volumes in the storage pool. For subvolumes, the output consists of the following fields, from left to right. Associated plex, or dash (-) if the subvolume is dissociated. Name of the underlying (layered) volume record used by the subvolume. Number of layers used in the subvolume. Plex association offset, optionally preceded by subvolume column number for subvolumes associated with striped plexes. Number of active plexes, followed by the number of plexes in the underlying (layered) volume. A string representing the I/O mode of the subvolume: The subvolume has been detached in the kernel due to an error. For volumes, the output consists of the following fields, from left to right: Associated replicated volume group (RVG), volume set (VSET) or cache object (CO), if applicable. Referred plex, if used by the read-policy. For volume sets, the output consists of the following fields, from left to right: A header line is printed before any record information, for each type of record that could be selected based on the -V, -P, -v, -p, -s, and -h options. These header lines are followed by a single blank line. Display only volumes. If a name operand refers to a plex or subdisk/subvolume, a diagnostic is written to the standard error. Display only volume set objects. RECORD FIELDSThe 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 vxmake utility. For a list of these field names, see vxmake(4). Some additional pseudo fields are also supported. These are: The persistent state for a plex or volume record, accounting for any exceptional conditions. For volume records, this displays the state field. For plex records, this displays one of the following in the given precedence order: An expected underlying disk could not be found An underlying disk is in the removed state An unrecovered I/O failure caused the plex to be detached A disk replacement left the plex in need of recovery, either from another plex or from a backup The plex has been moved by the Hot-Relocation feature A comma-separated list of subdisks or plexes that are associated with a plex or volume record. 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. For a subdisk associated with a striped plex, the column number and column offset of the subdisk separated by a \/ or the plex offset (if the subdisk is associated in a non-striped plex) or - (if the plex is not associated). This is the name of the disk group containing the record. The name of the record being displayed. Because the record name is specified positionally within vxmake description formats, the vxmake utility and the -m and -a options to vxprint do not explicitly provide this field name. For a striped plex, the number of columns and stripe unit size for a plex, separated by a \/, or - if the plex is not striped. The name of an associated plex record. For a plex record, this is the plex's name; for a subdisk record, this is the associated plex's name (if any). This is either dg (disk group), dm (disk), vol (volume), plex (plex), or sd (subdisk), depending on the record being displayed. For a subdisk associated with a RAID-5 plex, this will display flags relating to the status of the subdisk. An S indicates that the subdisk is considered to contain stale data. A d indicates that the subdisk has been detached from the RAID-5 plex. A comma-separated list of subdisks associated with 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. This is either dg, dm, v, pl, or sd, depending upon the record type. This pseudo variable can be used in a 2-character field, if a full 4 character field (required by rec_type) is too large. 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. The name of an associated volume record. For a volume record, this is the volume's name; for a plex record, this is the associated volume's name (if any); for a subdisk record, this is the associated volume of the associated plex (if any). The name of an associated RVG record. For an RLINK record, this is the associated RVG name (if any). 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 CODESThe vxprint utility exits with a non-zero status if the attempted operation fails. A non-zero 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 vxintro(1M) for a list of standard exit codes. EXAMPLESTo display all records in all disk groups, with clearly displayed associations and with output lines tailored to each record type, enter: vxprint -Ath To avoid looking at the 5-line header and the extra disk group headers generated by this command, you can remove all the headers by adding a -q. To display all subdisks and all disk groups, in sorted order by disk, enter: vxprint -AGts If all plexes are named based on volumes, this can be a convenient means of viewing large configurations. The association field for each of the subdisks names the plex, and the plex name will normally imply a volume association by the form of the plex name. To display the names of all unassociated plexes, use the command vxprint -n -p -e !assoc To print all subdisks, including the subdisk name and either the subdisk plex association offset or the putil0 field for dissociated subdisks, enter: vxprint -s -F "%{name:-14} %{pl_offset|putil0}" The vxprint command can be used to back up objects from one disk group configuration with the use of the combined options -mvpsch or -mvpschr. The output should be saved into a file that is maintained outside of the system being backed up. Use the following command with the saved file to restore the configuration: vxmake -d file NOTESA VxVM configuration without any disk groups is not considered to be an error. Note Although it is possible to use vxmake to create new volumes from an appropriate description file, it is recommended that you use vxassist, vxvoladm, or the graphical user interface instead. Note The Configuration Backup and Restore utilities, vxcnfbk and vxcnfres, are the recommended method for backing up and restoring volume hierarchies. SEE ALSOawk(1), grep(1), pfto (7), sed(1), vxdg (1M), vxinfo (1M), vxintro (1M), vxmake (1M), vxmake (4) |
^ Return to Top | < Previous | Next > |
Product: Volume Manager Manual Pages for Storage Foundation | |
Manual: Maintenance Commands (1m) | |
VERITAS Software Corporation
www.veritas.com |