vxannotate - add and administer user-defined storage attributes
vxannotate [options] add attribute [storage_spec ...]
vxannotate [options] set attribute [storage_spec ...]
vxannotate [options] remove attribute [storage_spec ...]
vxannotate [options] print attribute [storage_spec ...]
vxannotate [options] print disk [storage_spec ...]
vxannotate help [options|keywords]
The vxannotate utility provides a command-line interface for adding and administering user-defined storage properties that can be used with the Intelligent Storage Provisioning (ISP) feature of VERITAS Volume Manager (VxVM).
The operations that can be performed by vxannotate are selected by specifying the appropriate keyword on the command line. See the KEYWORDS section for a description of the available operations.
If a disk group is specified by using the -g option, an operation is applied only to that disk group. Otherwise, the operation is performed on all storage that is visible on the host system.
Most vxannotate operations take storage specification attributes, which specify the storage on which an operation is to be performed. These attributes are specified in the same way as for the vxvoladm command by naming individual disks (for example, disk01), or by grouping disks by controller or enclosure In addition, rule-based expressions can be used to determine how storage can be allocated. See the STORAGE SPECIFICATION section for details.
add Defines new user-defined attributes and values for the specified storage. help Displays information on usage, keywords and options. print attribute Prints the attributes of the specified storage. If a comma-separated list of attribute names is specified as an argument to the attribute_name parameter, only details about those attributes are printed. print disk Prints information about disks that have the attribute names that are specified as an argument to the attribute_name parameter. remove If an attribute name and values are specified, those values are disassociated from the storage attribute. If an attribute name but no attribute value is specified, the attribute is removed along with its values. If no attribute is specified, all attributes are removed along with their values. set Defines new values for existing storage attributes, or, if the attribute does not already exist, adds new user-defined attributes and values for the specified storage.
-d pathname Specifies the pathname of a file containing annotation specifications that is to be merged with the annotation database. This option can only be used with the add, remove and set operations. Each line of the annotation specifications file contains one attribute definition with the following format:
When this option is used, no attribute names or values may be specified on the command line. -g diskgroup Specifies the disk group ID or name for the operation, If not specified, an operation is performed on all storage that is visible on the host system.
Storage specification attributes are used to specify to the storage vxannotate operations are to be applied.
Storage specification attributes take one of the following forms:
[!]diskname Specifies a disk to which an operation should be applied. If ! is specified, the disk is ignored. The diskname refers to the name of a disk media record in a disk group. [!]diskclass:instance Specifies a set of disks to which an operation should be applied. If ! is specified, the disks are ignored. The diskclass specifies a particular type of disk grouping:
ctlr (alias: c, ctrl, cntrl, controller) Disks on a controller (for example, ctrlr:c1 specifies all disks that are attached to controller c1). enclr (alias: e, enclr, enclosure) Disks in an enclosure (for example, ctrlr:enc1 specifies all disks in the enclosure enc1). diskclass:same Specifies that an operation is to be applied only to disks with same specified class. For example, the storage specification diskparam:same indicates that the disks must have the same basic parameters (tracksize, cylinder size, size, and revolutions-per-minute), but does not otherwise specify which parameters to use. The following disk classes are defined:
ctlr (alias: c, ctrl, cntrl, controller) Specifies disks that are accessible through a specified host bus adapter (HBA) controller. The controller is identified in the form scsi# (for SCSI) or fscsi# (for Fibre Channel SCSI), where # is a decimal controller number starting at 0. da Specifies a VERITAS Volume Manager disk (VM disk) by its disk access record name. For example, hdisk10 indicates a VM disk defined on disk hdisk10. device (alias: d) Specifies all VM disks on a physical disk. The physical disk is specified in the form hdisk##, where the number ## uniquely identifies an entire disk. Typically, only one VM disk device is created for each physical disk. diskgeom (alias: geom) Specifies disks with a particular geometry. The geometry is specified in the form cyls.heads.sectors, to indicate the number of cylinders, heads, and sectors per track, of the disk. Many modern drives have variable geometries (or geometries that do not fit the standard conventions). For such drives, the geometry parameters used are whatever the drive reports. Note: The diskgeom attribute is not supported for EFI disks. diskparam Specifies disks with particular parameters. The parameters are specified in the form cyls.heads.sectors.rpm, to indicate cylinders, heads, sectors per track, and the number of revolutions per minute of the drive. As with the diskgeom parameter, the instances of the diskparam disk class depend upon the values reported by the drive, and may not be accurate. Note: The diskparam attribute is not supported for EFI disks. diskrpm (alias: rpm) Specifies disks with a given rotation speed in revolutions per minute (for example, 7200). dm (alias: disk) Specifies a VM disk by disk name (disk media record name) in the disk group of the volume. Specifying a disk class type of dm or disk is equivalent to giving a storage specification with no disk class name. Storage can additionally be specified by using the following expression in conjunction with a set of rules that may be combined by applying the allof, anyof, eachof and noneof operators (see the OPERATORS section for details): storage=rules Specifies the storage to which user-defined attributes are to be applied and administered.
allof Selects available storage that matches the union of all of the operands. anyof Selects available storage that matches any of the operands in the order that they are listed. The first match is chosen. eachof Selects available storage that matches the intersection of the operands. noneof Does not select storage that matches any of the operands.
See the VERITAS Storage Foundation Intelligent Storage Provisioning Administrators Guide for more information about these operators.
Add the attribute Building=b1 to all storage.
vxannotate add attribute Building=b1
Add the attribute Room=r1 to all storage in the disk group mydg.
vxannotate -g mydg add attribute Room=r1
Merge attributes from the annotation definitions file, annotate.txt, into the annotation database.
vxannotate -d annotate.txt add attribute
Remove attributes from all storage.
vxannotate remove attribute
Remove all values of the attribute Room from all storage.
vxannotate remove attribute Room
Remove all attributes from storage in the disk group mydg.
vxannotate -g mydg remove attribute
Remove all instances of the Room=r1 attribute.
vxannotate remove attribute Room=r1
Apply a new value r2 to the Room attribute.
vxannotate set attribute Room=r2
Apply new values r2 and b2 to the Room and Building attributes in the disk group mydg.
vxannotate -g mydg set attribute Room=r2 Building=b2
Display the assigned attributes and their values for all storage.
vxannotate print attribute
Display the assigned attributes and their values of all storage in the disk group mydg.
vxannotate -g mydg print attribute
Display the values of the attribute Room that have been defined for the available storage.
vxannotate print attribute attribute_name=Room
Display all storage that has the attribute Room.
vxannotate print disk attribute=Room
Add the attribute and value Room=r1 to the disks mydg01 and mydg02.
vxannotate add attribute dm:mydg01 dm:mydg02 Room=r1
Add the attribute and value Room=r1 to disks which are either in enclosure enc1 or enc2.
vxannotate add attribute
Apply the attribute ReservedLuns=true to disks which are defined as being in room r2, and which have a "VendorName" of "EMC" or "Hitachi":
vxannotate set attribute
Display the attributes of all disks that are defined as being in rooms r1 or r2.
vxannotate print attribute storage=allof("Room"="r1", "Room"="r2")
/var/vx/alloc/attributes.config Annotations definition file.
To ensure high availability, the annotations definition file, /var/vx/alloc/attributes.config, can be configured as a symbolic link to an NFS-shared file, or to a file on shared storage.
Attribute names and values are case sensitive.
The vxannotate 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 execuation of the utility.
VERITAS Storage Foundation Intelligent Storage Provisioning Administrators Guide
|VxVM 5.0||vxannotate (1M)|