Home > Veritas Cluster Server Manual Pages

HAATTR (1M)

Maintenance Commands

Table of contents


NAME

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

SYNOPSIS

haattr -add restype attribute [VALUETYPE] [DIMENSION] [default]

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

haattr -add -temp 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 restype 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 is string (-string), the default, integer (-integer), or boolean (-boolean). DIMENSION is -scalar, -vector (a list of non-unique values), -keylist (a list of unique strings), or -assoc (a list of unique strings associated with a value).
-add -static restype attribute [VALUETYPE] [DIMENSION] [default]
Add a static attribute to the VCS configuration for the specified resource type. default is the initial value that all instances will have. This value is stored in the type class, and has the same value for every resource of that type. When new types are instantiated, they are instantiated with static attributes. The VALUETYPE and DIMENSION are the same for static and non-static attributes. Modify the individual values with the hatype command.
-add -temp resource_type attribute [VALUETYPE] [DIMENSION] [default]
Add a temporary attribute to the VCS configuration for the specified resource type. The VALUETYPE may be either a string (-string), the default, an integer (-integer), or boolean (-boolean)i. The DIMENSION may be -scalar (the default), -vector (a list of non-unique values), -keylist (a list of unique strings), or -assoc (a list of unique strings associated with a value). 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 new resources of the resource type are created, they are instantiated with the temporary attribute and its default value. The hares -modify command may be used to change the values of temporary attributes for individual resources. 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 stored in the types.cf file. When VCS is restarted, the default value of the temporary attribute is restored.
-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 | 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 at 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) 2008 Symantec.

All rights reserved.

Last updated: 07/03/2008
Copyright ©2009 Symantec Corporation
All rights reserved.