HAATTR(1M)

NAME

haattr - define new attributes, changes default values, and deletes attributes associated with resource types

SYNOPSIS

haattr -add [-temp | -static] restype attribute [VALUETYPE] [DIMENSION] [default]

haattr -default restype attribute default

haattr -delete restype attribute

haattr -delete -static restype attribute

haattr -delete -temp restype attribute

haattr -display {cluster | group | system | heartbeat | restype}

haattr [-help]

AVAILABILITY

VRTSvcs

DESCRIPTION

Attributes contain information about the various objects (clusters, systems, groups, resource types, and resources) that make up the VCS configuration. Users can add attributes to resource types to store information about how to manage the particular resource, such as the path to a process or the name of a volume. The haattr command adds attribute metadata, that is, the name, VALUETYPE, DIMENSION, and default value for new attributes. New attributes can be added only to resource types (in which case they are static or temporary) or to resources themselves. After the metadata is added, each instance of a resource type or a resource that is created, is instantiated with a copy of the attribute. Using the hares(1M) command with the -modify option, you can change the values of individual attributes without modifying the metadata itself. Temporary attributes can exist in memory, that is, be added, modified, or deleted, only as long as the VCS engine is running, and are lost when the engine is stopped. See NOTES for how to specify "-" and "%" characters in the command line.

OPTIONS

-add [-temp | -static] resource_type attribute [VALUETYPE] [DIMENSION]
  [default]
Add an attribute to the VCS configuration for the specified resource type. All new resources of this type are instantiated with this attribute and its default value. default is the initial value that all instances will have. You modify the individual instances using the hares command. VALUETYPE can either be a string (-string), which is the default, integer (-integer), or boolean (-boolean). DIMENSION can either be scalar (-scalar), vector (-vector, a list of non-unique values), keylist (-keylist, a list of unique strings), or assoc (-assoc, a list of unique strings associated with a value).

The -static option adds a static attribute and the -temp option adds a temporary attribute.

A temporary attribute can be defined while the engine is running. Since neither the definition nor the value of a temporary attribute is added to the main.cf configuration file, a temporary attribute can be added to the configuration without making the configuration read-write. When a configuration containing a temporary attribute is dumped (using the haconf -dump command) the definition of the temporary attribute and its default value are added to the types.cf configuration file, however, any run-time values assigned to the attribute are lost. When VCS is restarted, the temporary attribute is restored to its default value.

-default restype attribute default
  Change the attribute’s default value for the specified resource type. Subsequent instances of the resource type are instantiated with the new default value.
-delete restype attribute
  Delete attributes for the specified resource type. The attribute in all existing instances of the resource type is also deleted.
-delete -static restype attribute
  Delete static attributes for the specified resource type. The attribute in all existing instances of the type is also deleted.
-delete -temp restype attribute
  Delete temporary attributes for the specified resource type. The attribute in all existing instances of the type is also deleted.
-display {cluster | group | system | heartbeat | site | restype}
  Display attributes for specified objects, including name, VALUETYPE, DIMENSION, and default value (if any).

EXAMPLES

To add a new attribute to the user permissions for a FileOnOff resource, enter:

     # haattr -add FileOnOff Permissions -assoc root rwx

This command adds the attribute Permissions to all resources (current and future) of type FileOnOff, which is a string (default) association. The default value for all subsequent instantiations of FileOnOff resources is the association root rwx. To add a temporary attribute SocketPortNumber to the Process resource type definition, enter:

     # haattr -add -temp Process SocketPortNumber -integer -scalar 0

This command adds the temporary attribute SocketPortNumber to all resources of the type Process for as long as the VCS engine is running. The VALUETYPE is integer and the DIMENSION is scalar. The default value for the SocketPortNumber for all instantiations of Process resources is 0. The value of SocketPortNumber can be changed without making the VCS configuration writable.

NOTES

Attributes defined by the VCS system itself cannot be modified with this command.

Attributes cannot be added to the cluster, system, or group objects.

When using the command to specify or modify an attribute’s value that begins with a dash ("-"), precede the value with a percent sign ("%"). For example, specify -y as %-y. Likewise, precede a value that starts with a percent sign with another percent sign.

SEE ALSO

hares(1M),

hatype(1M)

COPYRIGHTS

Copyright (c) 2016 Veritas.

All rights reserved.


VCS 7.2 HAATTR(1M)