test veritas logo


vol_pattern(4)

NAME

vol_pattern - Veritas Volume Manager disk group search specifications

DESCRIPTION

The vol_pattern search expression language can be used in vxprint and vxedit, and with some Veritas Volume Manager (VxVM) support library functions, to locate Veritas Volume Manager configuration records with particular characteristics. Searches are limited to operation on one disk group at a time. In the current release, search expressions are limited to volume, plex, subdisk, DCO and snap records. Search expressions cannot be applied to disk group, disk media, or disk access records.

Search patterns provide an expression-based language for specifying record attributes. In simple cases, patterns can be specified that match records whose fields have specific values. In more complex cases, records can be matched based on attributes of associated records.

Search patterns are expressions that do not have side effects (that is, variables cannot be set or changed). Expressions evaluate either to true or false. If evaluation of an expression within the context of a configuration record yields a value of true, then the expression matches the record; otherwise, the expression does not match the record.

The search pattern language does not have operators that cause changes to be made, and does not have a concept of local variables that can be set and used within or between expressions.

Types of Expressions

Expressions in the pattern language are similar to expressions in awk(1). Expressions can have the following types for constants, variables, and subexpressions:
boolean A boolean variable or expression is either true or false. Numbers and strings can be used as truth values if the context requires a boolean value. For a number, zero implies false and non-zero implies true. For a string, an empty string implies false and a nonempty string implies true.
GUID A Global Unique ID that is assigned to volumes and plexes. These GUIDs can be compared for equality. They are used to store the associations between VxVM objects across disk group split and join operations. A GUID is specified in an expression using the vxprint format {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} where each x represents a hexadecimal digit (for example, {736a3c4e-1dd2-11b2-87c3-080020e706ae}).
number A number is an integer quantity. The maximum size for a number is the largest size that may be used for values in configuration records. In the reference porting base for VxVM, these numbers are 32-bit signed numbers.
Numbers can be specified in decimal, octal, or hexadecimal with a suffix to indicate the unit of the number when it indicates an object length or offset. Hexadecimal numbers begin with 0x, octal numbers begin with 0; otherwise numbers are in decimal. When used as a length, numbers with no suffix are taken as sectors.
Defined suffix characters are: b for 512-byte blocks, s for sectors (typically 512 bytes), k for kilobytes, m for megabytes, and g for gigabytes. Suffix characters also can be specified in upper case.
Length numbers are actually defined in terms of sectors. As a result, on a system with 512-byte sectors, 1k is the same as 2. Thus, the expression:
 

nassoc=1k

tests for a record with 2 associated records, rather than 1024 associated records.
numeration An enumeration field is a number that represents one of the values for a field that has symbolic names. The vol_pattern expression grammar handles enumeration values exactly like numbers. Enumerations are usually only useful for comparing compatible enumeration field and enumeration constants. For example, the enumeration field pl_layout is a number whose possible values are represented by the symbols CONCAT and STRIPE.
regular expression
  A regular expression is a value, much like a regular expression in awk or ed, that can be used to specify a pattern for matching strings. Regular expressions can only be used in the context of the boolean ~ and !~ operators.
sequence numbers and record IDs
  Each time a transaction is issued against a disk group configuration, a 64-bit configuration sequence number is increased. When a configuration records is created or changed in a transaction, the record is stamped with the configuration sequence number associated with that transaction.
When a record is created, it is given a 64-bit record ID. These record IDs are never reused within a disk group configuration.
Configuration sequence numbers and record IDs can be specified as constants of the form number, where both numbers are specified in decimal.
string A string is a literal string in quotes or a character array field from a configuration record. Strings can be implicitly promoted to boolean, but are never promoted to other types. For example, a string-valued field in a record that contains only digits cannot be compared with a number. String literals are described later.
Two higher-level types are also included, which can represent multiple values of the same base type. These higher-level types are:
list A list is a set of expressions and sets within parenthesis that are separated by commas. List expressions can only be used for the right-hand expression of the in operator.
set A set is a multi-valued variable (an array). Sets are normally used within the right-hand expression for the any and in operators. Reference to a set expression yields all of the currently valid members of the set, of which there may be none.

EXPRESSION GRAMMAR

A pattern is an expression with the following components and operators, in increasing order of precedence. Groups of operators described together have the same precedence.
expr1 ? expr2 : expr3
  This is a conditional expression. Expression expr1 is evaluated as a boolean value. If it has a truth value of true, then the value for the conditional expression is the value of expr2, otherwise the value for the conditional expression is the value of expr3.
expr1 || expr2
  The logical or operator. expr1 and expr2 are evaluated as boolean expressions. If either expr1 or expr2 have a truth value of true, the expression is true; otherwise, the value of the expression is false.
expr1 && expr2
  The logical and operator. expr1 and expr2 are evaluated as boolean expressions. If both expr1 and expr2 have a truth value of true, the expression is true; otherwise, the value of the expression is false.
any expr The expression expr is evaluated as a boolean expression for all combinations of elements for all sets within expr that represent sets. If any of these combinations yields a truth value of true, then the value of the any expression is true; otherwise, the value is false.
For example, pl_sd is a set defining the names of subdisk records that are associated with a plex. The expression:
 

any pl_sd.sd_disk="disk01"

searches for plex records that have an associated subdisk on disk disk01. Each name in the pl_sd_name set is referenced as a subdisk and checked to see if that subdisk is on disk disk01. The expression is true if it is true for any subdisk.
expr in list
  Expression expr is evaluated, and the resulting value is compared to all of the values in list. If any of the values in list match expr, then the value of the in expression is true; otherwise, the value is false. The list can either be a list of expressions within parentheses that are separated by commas, or it can be a single expression. If any of the expressions in list represent sets, then the comparison is made against all combinations of values in that set.
Type promotions are not performed on the expressions in list, or on expr. Types for all these expressions must match exactly.
For example, the expression:
 

"disk01" in (pl_sd.sd_disk,pl_log_sd.sd_disk)

searches for plexes that have either a regular subdisk or a subdisk on disk disk01.
expr ~/regexp/
expr!~/regexp/
  The binary ~ and !~ operators are used to match string values against a regular expression. The value of expr must be a string. For the ~ operator, if the value of expr matches the regular expression regexp, then the value for the match expression is true; otherwise the value is false. For the !~ operator, if expr matches regexp the result is false; otherwise the result is true.
Regular expressions are in the format described in regcomp(3). The slash (/) character in the regular expression must be escaped with a backslash (\) if it does not occur within a character range.
expr1 = expr2
expr1 != expr2
  These expressions compare string, number, sequence number, record ID, GUID or boolean values. If either expr1 or expr2 is a boolean value, then the other is promoted to a boolean as well. For the = operator, if the two values are equal then the result is true; otherwise, the result is false. For the != operator, if the two values are equal, then the result is false; otherwise, the result is true.
For consistency with awk(1) and many other languages, == is allowed as an alias for the = operator.
expr1 < expr2
expr1 > expr2
expr1 <= expr2
expr1 >= expr2
  These expressions compare the magnitudes of numbers or sequence numbers. They cannot be applied to any other types of expressions. The result is a boolean.
expr1 + expr2
expr1 - expr2
  These expressions add or subtract two numbers, yielding another number.
expr1 * expr2
expr1 / expr2
expr1 % expr2
  These expressions multiply, divide, or take the modulo of two numbers, yielding another number.
+ expr
- expr
The unary + operator applied to any expression yields the value of that expression. The unary - operator negates the value of a number-valued expression expr.
! expr expr is evaluated as a boolean expression. If its value is true, then the value for the ! expression is false; otherwise, the value for the ! expression is true.
expr . field-name
  expr is evaluated as a string expression. Its value is used as the name of a record in the disk group configuration. If the record exists, and if that record contains a field named field-name, then the value of this expression is the value in that field within the referenced record. If the record does not exist, or if the record does not contain a field named field-name, then the behavior is context-dependent.
If this occurs within the context of an any or in operator, then the next combination of values for the right-hand side of the any or in operator is evaluated. If this occurs within the context of an && or || operator, then the left or right-hand expression of that operator yields false, whichever side the . operator occurs on. The innermost any, in, &&, or || operator determines the context. If no such context exists, then the result of the entire search pattern is that the record being tested does not match the pattern.
The effect of this short-circuiting behavior is that an expression that does not make sense, either because a record does not exist or because it does not contain a specific field, causes that expression to be false. The effect is similar to implicit asserts, which are described later in this section under field name.
For compatibility with earlier releases of VxVM, -> can be used instead of . as the operator.
( expr ) Parentheses can be used to override precedence rules.
literal A string, number, sequence number, or record ID literal, as defined in the section Types of Expressions.
assert An assert is a special type of variable name that is true within the context of a specific type of record. Outside of that context, an assert causes the expression that it is in to be false. The scope of an assert is the right or left-hand side of the smallest expression within a || or && operator. If an assert does not occur within a || or && operator, then the search pattern does not match the record being evaluated. The names that specify asserts are vol, plex, sd, dco and snap, which specify volume, plex, subdisk, data change object (DCO) and snap records, respectively.
constant There is a set of symbolic constants that can be specified in search patterns. For example, true and false are the two truth values. Also, if a field within a record has a specific set of symbolic values, then these symbolic values are available as numeric constants. See the section Constants.
variable There is a small set of global variables that can be referenced in search patterns. Such variables can be used within any context. See the section Global Variables.
field name Referencing the name of a field in a configuration record yields the value of that field within the configuration record being evaluated.
Not all field names are defined for all record types. If a field name is referenced that is not valid in the context of the record type, then the smallest expression on either side of a && or || operator becomes false. This is an implicit assert. For example, the expression:
 

v_kstate!=V_ENABLED

matches only volume records because the v_kstate field is only defined for volume records.
Some fields in a record only make sense if another field contains a specific value. For example, the pl_st_width field in plex records is not defined unless the value of the pl_layout field is PL_STRIPE. These cases are treated as implicit asserts.

CONSTANTS

The names of constants that are recognized within search patterns are:
true, yes, on
  Constants representing boolean true.
false, no, off
  Constants representing boolean false.
ROUND, PREFER, SELECT
  The enumeration constants that represent values for the v_read_pol field in volume records. The v_current_read_pol field can be set to ROUND or PREFER. These constants can also be specified with a prefix of V_.
DISABLED, DETACHED, ENABLED
  The enumeration constants that represent values for the v_kstate field in volume and plex records. These constants can also be specified with a prefix of V_ or PL_.
NO_OP, FAIL_OP, DET_PL, FAIL_DET_PL,
DET_VOL, FAIL_DET_VOL, GEN_DET,
GEN_DET_SPARSE, GEN_FAIL, GEN_DET2
 
The enumeration constants that represent values for the v_r_all, v_r_some, v_w_all, and v_w_some fields in volume records. These constants can also be specified with a prefix of V_.
LOGUNDEF, LOGNONE, LOGBLKNO
  The enumeration constants that represent values for the v_log_type field in volume records. These enumeration constants can also be specified with a prefix of V_PFLAG_.
STRIPE, CONCAT
  The enumeration constants that represent values for the pl_layout field in plex records. These constants can also be specified with a prefix of PL_.
RO, WO, RW The enumeration constants that represent values for the pl_iomode field in plex records. These enumeration constants can also be specified with a prefix of PL_TFLAG_.
VOLNODEV The value for a device number field indicating that the device number is undefined.

GLOBAL VARIABLES

The global variables that can be used within search patterns are:
config_tid or tid
  The configuration sequence number of the disk group configuration.
util_num or nutil
  The number of fields in a tutil or putil arrays in a volume, plex, or subdisk structure. This is always 3, but it is treated as a global variable anyway.

GENERIC FIELDS

Some fields can be found in all types of configuration records (with exceptions for DCO and snap records). These fields can be referenced without a v_, pl_, sd_, dco_ or sp_ suffix, and do not generate implicit asserts. These fields can be used either to name fields in the record being evaluated, or as a field name reference for the . operator.

A generic field name can be specified with a prefix of v_, pl_, sd_, dco_ or sp_ to indicate that implicit asserts should be used and that the field requires a context of a volume, plex, subdisk, DCO or snap record, respectively. Currently, use of a prefix for a generic field name is ignored for the right-hand side of a . operator.

The recognized generic field names are:
comment or c
  A string containing the comment field.
len or l A number representing the length of the volume, plex or subdisk. (Not applicable for DCO or snap records.)
lock A boolean value indicating whether the record is locked in the current transaction of the caller. This variable is not useful when used with vxprint or vxedit. It is only useful for C programs. (Not applicable for DCO or snap records.)
name or n A string containing the record name.
open A boolean value indicating whether the volume, plex, or subdisk is open. A subdisk is considered open of the volume or plex device for the subdisk is open. A plex is considered open only if the plex device is open. A volume is considered open if the volume or one of its plex devices is open. (Not applicable for DCO or snap records.)
putil A set of strings representing all of the permanent utility fields.
putil0 or p0
  A string containing the first permanent utility field.
putil1 or p1
  A string containing the second permanent utility field.
putil2 or p2
  A string containing the third permanent utility field.
rid The record ID of the record being evaluated.
tutil A set of strings representing all of the temporary utility fields.
tutil0 or t0
  A string representing the first temporary utility field.
tutil1 or t1
  A string representing the second temporary utility field.
tutil2 or t2
  A string representing the third temporary utility field.
update_tid or update
  The disk group configuration sequence number corresponding to the transaction that created or that last modified the record.
Other special fields exist that do not obey the prefix convention, but which apply to more than one type of record. These are:
aslist The set of associated record names. In the context of a volume or plex record, this yields the names of the associated plexes and subdisks, of which there may be none. In case of a DCO record, aslist yields the names of the associated snap records. This is not appropriate in the context of a subdisk or snap record. This causes an implicit assert when applied to a subdisk or snap record.
assoc The name of a field with which a record is associated. In the context of a plex or subdisk record, assoc yields the name of the volume or plex with which the record is associated. In the context of a snap record, assoc yields the name of the DCO with which the snap record is associated. If the record is not associated, assoc yields an empty string. Use of assoc is not appropriate in the context of a volume record. This causes an implicit assert when applied to a volume or DCO.
naslist The number of records in the aslist set. This causes an implicit assert when applied to a subdisk or snap record.

VOLUME RECORD FIELDS

The fields that can be specified for volume records are:
badlog A boolean value indicating that all block-change log copies for the value were detached due to I/O failures.
detach_tid The sequence number of the last transaction that detached the volume due to a failure of some kind. This is also set when all copies of the block-change log for the volume are detached by I/O failures.
forceminor A boolean value indicating whether the volume can use one of the reserved minor numbers (minor numbers zero through four). The root and swap usage types set this flag to allow them to grab minor numbers 0 and 1 for the root and swap volumes.
pref_plex_rid
  The record ID of the preferred plex.
v_active A boolean value indicating whether the volume was in use at the time of a system failure. This is not set if the volume was not written prior to the crash. This flag indicates that plex synchronization recovery is required for the volume. v_active is normally cleared during system startup when the volume is started.
v_bdev and v_cdev
  The block and character device numbers for the volume.
v_current_read_pol or v_creadpol
  An enumeration representing the current read policy that is in effect for the volume. This is the same as v_read_pol unless v_read_pol is SELECT, in which case v_current_read_pol matches the chosen policy.
v_data_lock
  A boolean value indicating whether the volume is locked against I/O activity within the current transaction of the caller.
v_dco_name or v_dconame
  The name of the DCO which is associated with the volume. If there is no associated DCO, this is an empty string.
v_dco_parent_name, v_dco_parentname or v_dcoparentname
  The name of the DCO with which this volume is associated as a DCO volume. If the volume is not a DCO volume, this is an empty string.
v_dco_rid The record ID of the DCO which is associated with the volume.
v_fastresync or v_fmr
  A boolean value indicating whether FastResync is enabled for a volume.
v_fstype A string containing the file system type for the volume, as set by the administrator.
v_gid A number representing the group ID for the volume. There is currently no way to represent a group name in a search pattern.
v_guid The Global Unique ID (GUID) of the volume.
v_hasdcolog or v_hasdcomap
  A boolean value indicating whether the volume has a DCO volume. The setting of v_instant can be used to determine whether the DCO supports instant snapshot operations.
v_instant A boolean value indicating whether the DCO that is associated with a volume supports instant snapshot operations. (Only the new-style DCO layout supports instant snapshot operations. The old-style DCO layout does not.)
v_iosize A number indicating the largest sector size, in bytes, of any disk associated with the volume.
v_isdcolog or v_isdcomap
  A boolean value indicating whether the volume is a DCO volume.
v_krwback A boolean value indicating whether the read-writeback recovery mode is still enabled in the kernel. This flag is turned on when v_rwback is turned on, but is cleared by the kernel when recovery for the volume is complete.
v_kstate An enumeration field for the kernel-enabled state for the volume. This can have one of the values DETACHED, DISABLED, or ENABLED.
v_lasterr A number representing a sequence number for the last error that occurred on the volume.
v_log_len A number representing the length of logs associated with the volume, if any.
v_log_serial_hi, v_log_serial_lo
  Two numbers that together represent the most significant and least significant long values for the current log serial number for a volume. The log serial number, represented as a combined binary integer, is incremented every time a new log is written for a volume that has logging enabled.
v_log_type An enumeration representing the logging type for the volume. This can take one of the values LOGUNDEF (no specific type specified), LOGNONE (no logging), or LOGBLKNO (block-change logging).
v_logging A boolean value that is true if logging is enabled for the volume. Logging is enabled if the volume is enabled, and it has at least one associated, enabled plex with an enabled, associated log subdisk.
v_minor A number representing the minor number of the volume block and character devices. This is the persistent device number for the volume. If two volumes on the system have the same value for v_minor, then one of the volumes is given a different device number, which is reflected in v_bdev and v_cdev.
v_mode A number representing the file permission modes for the volume. There is currently no way to represent a symbolic mode in a search pattern.
v_pl_name or v_plex or v_plexes
  The set of plex names that are associated with the volume.
v_pl_num or v_nplex
  A number representing the number of plexes associated with the volume.
v_pref_name
  A string containing the preferred plex for the volume. This is only defined if the value for v_current_read_pol is PREFER. Otherwise, use of this variable causes an implicit assert.
v_r_all, v_r_some, v_w_all, v_w_some
  These are numbers that represent the exception policies for the volume. Each of these fields can have one of the exception policy values:
 

DET_PL DET_VOL FAIL_DET_PL FAIL_DET_VOL FAIL_OP GEN_DET GEN_DET_SPARSE GEN_DET2 GEN_FAIL NO_OP

v_read_pol An enumeration representing the read policy for the volume. This can be one of the values ROUND, PREFER, or SELECT. The value SELECT indicates that read policy is adjusted to match the configuration of the volume: if there is one associated striped plex, this read policy is preferred; otherwise the preferred policy is round-robin.
v_rec_lock A boolean value indicating whether the record is locked within the current transaction of the caller.
v_rwback A boolean value indicating that read-writeback plex synchronization recovery has been started for the volume. This is normally set when a mirrored volume is started when the v_active flag was set.
v_rwback_offset
  A number indicating the offset within the volume to where recovery has completed. A read operation on a volume performs a plex synchronization recovery if the read is after this point in the volume. A read that occurs at the current read-writeback offset advances the offset to the end of the read. When the offset reaches the end of the volume, recovery is complete and v_krwback is turned off.
v_specify_writecopy
  If the boolean value of v_specify_writecopy is true, this overrides the value of v_writecopy derived from the configuration of the volume, and writecopy stabilization is enforced unconditionally.
If v_specify_writecopy is false, VxVM automatically turns on v_writecopy if block-change logging is in operation on the volume, and turns it off otherwise.
Note: The behavior of specify_writecopy is likely to change in a future release. See the vxedit(1M) manual page for more information.
v_start_opts
  A string value that is used by usage types to represent options to the volume start utility. See the usage-type-specific options in the vxintro(1M), vxmake(1M), vxmend(1M), vxplex(1M), vxprint(1M), vxrelayout(1M), vxsd(1M), and vxvol(1M) manual pages for more information.
v_state A string representing the usage-type-dependent state for the volume.
v_uid A number representing the user ID for the volume. There is currently no way to represent a user name in a search pattern.
v_use_type A string containing the usage type of the volume.
v_writeback
  A boolean value indicating whether the writeback-on-read-error policy is turned on for the volume. This policy is set by default and can be turned off or back on using vxedit. See vxedit(1M) for more information.
v_writecopy
  A boolean value indicating whether volume writes are copied to a private buffer in the kernel before being written to disk. See vxedit(1M) for more information.

PLEX RECORD FIELDS

The fields that can be specified for plex records are:
detach_tid The configuration sequence number of the disk group that was in effect when the plex was last detached or disabled due to an I/O failure or a disk failure.
log_sd A string representing the name of a subdisk associated with the plex as a log subdisk. This string is empty if no log subdisk is associated with the plex.
pl_compact A boolean value that is true if the plex is compact. A plex is compact if its entire length is mapped by subdisks, leaving no holes. Note that the length of a plex is computed as the length to the end of the last block in the plex address space that is mapped by a subdisk.
pl_contig_len
  The offset to the first unmapped block in the plex. If the plex is compact, this matches the plex length. If the plex is not mapped, this is the offset of the first hole in the plex.
pl_dev A number representing the device number of the plex device (a character device). This is VOLNODEV if the plex is dissociated.
pl_guid The Global Unique ID (GUID) of the plex.
pl_iomode An enumeration representing the I/O mode of the plex. This can have one of the values RO (read-only), RW (read-write) or WO (write-only).
pl_kdetach or pl_iofail
  A boolean indicating that the plex was detached by the kernel due to an I/O failure. The stale and kdetach flags are normally both cleared during a system reboot as part of starting the volume.
pl_kstate An enumeration for the kernel enabled state for the plex. This can be DETACHED, DISABLED or ENABLED.
pl_lasterr A number representing a sequence number for the last error that occurred on the plex.
pl_layout An enumeration representing the subdisk layout policy for the plex. This can be one of the values CONCAT or STRIPE to represent concatenation or striping, respectively.
pl_log A boolean value that is true if block-change logging is enabled for the plex.
pl_log_sd_rid
  The record ID of the log subdisk for the plex. This is 0.0 if the plex has no log subdisk.
pl_minor A number representing the minor number of the plex device. This is -1 if the plex is dissociated.
pl_nodarec or pl_failed
  A boolean indicating whether any subdisk in the plex is defined on a failed disk. A failed disk is one where the underlying physical disk could not be found, or was detached by an I/O failure.
pl_noerror A boolean value that is true if the plex is accounted for in volume error handling. If this is set, then I/O errors on the plex are ignored if they result from normal volume I/O.
pl_removed A boolean indicating whether any subdisk in the plex is defined on a removed disk. See vxdg(1M) for information on removed disks.
pl_sd_name, pl_sd, pl_subdisk, or pl_subdisks
  A set containing the names of subdisks that are associated with the plex.
pl_sd_num or pl_nsd
  A number representing the count of subdisks that are associated with the plex.
pl_st_width
  A number representing the stripe width for the plex. This is only defined if the value for the pl_layout field in the plex is STRIPE. Otherwise, use of this variable causes an implicit assert.
pl_stale or pl_recover
  A boolean indicating whether a disk replacement or a temporary failure caused the plex to become disabled and out-of-date with respect to the volume contents. Such plexes require recovery either from other plexes in the volume or from a backup of the volume.
pl_state A string representing the usage-type-dependent state for the plex.
pl_v_name or pl_volume
  The name of the associated volume. If the plex is not associated, this is an empty string.
pl_vol_rid or pl_v_rid
  The record ID of the volume with which the plex is associated. This is 0.0 if the plex is not associated.
pl_volatile
  A boolean value that is true if if one of the subdisks in the plex is defined on a volatile disk. Volatile disks are disks whose contents are not guaranteed to be preserved across a system reboot. Volatile disks can be created using the nopriv disk type (see vxdisk(1M)).

SUBDISK RECORD FIELDS

The fields that can be specified for subdisk records are:
sd_da_name or sd_device
  The disk access record underlying the disk media record of the subdisk. This is empty if the disk is currently failed or removed.
sd_dev The device number of the device that the subdisk resides on. This number is a combination of the major and minor number for the device. This is VOLNODEV if the underlying disk is removed or failed.
sd_dev_offset
  A number representing the offset of the subdisk within the disk partition containing the public region for the disk. This can differ from sd_dm_offset if the public region of the disk does not begin at the beginning of its partition.
sd_dm_name or sd_disk
  The name of the disk media record on which the subdisk is defined.
sd_dm_offset or sd_offset
  A number representing the offset of the subdisk within the public region of the disk that the subdisk resides on.
sd_dm_rid or sd_disk_rid
  The record ID of the disk media record on which the subdisk is defined.
sd_is_log or sd_log
  A boolean value indicating that this is a log subdisk for a plex.
sd_path A string containing the path to the device that the subdisk resides on.
sd_pl_name or sd_plex
  The name of the associated plex. If the subdisk is not associated, this is an empty string.
sd_pl_offset
  A number representing the offset of the subdisk within the address space of the plex with which it is associated.
sd_plex_rid or sd_pl_rid
  The record ID of the plex with which the subdisk is associated.
sd_volatile
  A boolean value that is true if the subdisk is defined on a volatile disk. The contents of a volatile disk are not guaranteed to be preserved across a reboot. Volatile disks can be created using the nopriv disk type (see vxdisk(1M)).

DCO RECORD FIELDS

The fields that can be specified for date change object (DCO) records are:
dco_badlog or dco_badmap
  A boolean value indicating whether the DCO volume was detached due to write error.
dco_log_name, dco_map_name or dco_mapname
  The name of the volume which is associated with the DCO as a DCO volume. If there is no associated DCO volume, this is an empty string.
dco_log_vol, dco_map_vol or dco_map_vol_rid
  The record ID of the DCO volume which is associated with the DCO.
dco_parent_name or dco_parentname
  The name of the volume with which the DCO is associated. If the DCO is not associated, this is an empty string.
dco_parent_vol, dco_parent_rid or dco_parent_vol_rid
  The record ID of the volume with which the DCO is associated.
dco_sp_num or dco_spnum
  A number representing the count of snap records that are associated with the DCO.

SNAP RECORD FIELDS

The fields that can be specified for snap records are:
sp_dco_name
  The name of the DCO with which the snap record is associated.
sp_dco_rid The record ID of the DCO with which the snap record is associated.
sp_snap_volguid
  The Global Unique ID (GUID) of the snapshot volume. The GUID is used to keep the association between the original and snapshot volumes. The snap record of the original volume contains the GUID of the snapshot volume, and the snap record of the snapshot volume contains the GUID of the original volume.
sp_vol_name
  The name of the volume with which the snap record is associated.
sp_vol_guid
  The GUID of the volume with which the snap record is associated.

EXAMPLES

The following example matches any plex or volume that does not have any associated subdisks or plexes. Because pl_nsd only applies to plexes, while v_nplex only applies to volumes, there is no ambiguity concerning which types of records can be matched by the expression.

pl_nsd = 0 || v_nplex = 0

The following example matches all plexes and subdisks that have a comment field beginning with the string Henry. For example, this could be a convention describing ownership.


(plex || sd) && comment ~ /^Henry/

The following example matches all volumes for which the preferred plex is striped:


v_pref_name.pl_layout = STRIPE

Because v_pref_name is only defined for volumes that have v_read_pol set to PREFER, the preceding expression is equivalent to:


vol && v_read_pol = PREFER && v_pref_name.pl_layout = STRIPE

The following expression matches any volume that contains a plex with a subdisk longer than 100 megabytes:


any v_plex.pl_subdisk.sd_len > 100M

If an expression contains a set but does not use the any or in operator, then an any operator is assumed to surround the expression. Thus, the preceding example can also be specified as:


v_plex.pl_subdisk.sd_len > 100M

The following example matches any record that was changed in the most recent set of changes to the disk group:


update_tid = config_tid

Alternatively, to get all records that have been changed since a past disk group configuration (with an configuration transaction ID of 0.23482), use:


update_tid > 0.23482

The following example matches all snapshots of volume vol1:


any v_dco_name.dco_snap.sp_snap_volguid=‘vxprint -F%guid vol1‘

SEE ALSO

awk(1), vxdg(1M), vxdisk(1M), vxedit(1M), vxintro(1M), vxmake(1M), vxmend(1M), vxplex(1M), vxprint(1M), vxrelayout(1M), vxsd(1M), vxvol(1M), regcomp(3)


VxVM 7.3.1 vol_pattern(4)