Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 User's Guide   

Defining Attributes as Local

Localizing an attribute means that the attribute has a per-system value for each system listed in the group's SystemList. These attributes are localized on a per-resource basis. For example, to localize the attribute attribute_name for resource only, type:

# hares -local resource  attribute_name

Note that global attributes cannot be modified with the hares -local command. The following table lists the commands to be used to localize attributes depending on their dimension.

Dimension Task and Command

scalar

Replace a value:

-modify [object] attribute_name value [-sys system]

vector

  • Replace list of values:
  • -modify [object] attribute_name value [-sys system]
  • Add list of values to existing list:
  • -modify [object] attribute_name  -add value [-sys system]
  • Update list with user-supplied values:
  • -modify [object] attribute_name -update entry_value ...   [-sys system]
  • Delete all values in list (you cannot delete an individual element of a vector):
  • -modify [object] attribute_name -delete -keys [-sys system]

keylist

  • Replace list of keys (duplicate keys not allowed):
  • -modify [object] attribute_name value ... [-sys system]
  • Add keys to list (duplicate keys not allowed):
  • -modify [object] attribute_name -add value ... [-sys system]
  • Delete user-supplied keys from list:
  • -modify [object] attribute_name -delete key ...
      [-sys system]
  • Delete all keys from list:
  • -modify [object] attribute_name -delete -keys [-sys system]

association

  • Replace list of key-value pairs (duplicate keys not allowed):
  • -modify [object] attribute_name  value ... [-sys system]
  • Add user-supplied list of key-value pairs to existing list (duplicate keys not allowed):
  • -modify [object] attribute_name -add value ...[-sys system]
  • Replace value of each key with user-supplied value:
  • -modify [object] attribute_name -update key value ...
      [-sys system]
  • Delete a key-value pair identified by user-supplied key:
  • -modify [object] attribute_name -delete key ...
      [-sys system]
  • Delete all key-value pairs from association:
  • -modify [object] attribute_name -delete  -keys
      [-sys
    system]


  • Note    If multiple values are specified and if one is invalid, VCS returns an error for the invalid value, but continues to process the others. In the following example, if sysb is part of the attribute SystemList, but sysa is not, sysb is deleted and an error message is sent to the log regarding sysa.
  • hagrp -modify  group1 SystemList -delete sysa sysb
               [-sys system]

Adding Service Groups

  To add a service group to your cluster


hagrp -add service_group
The variable service_group must be unique among all service groups defined in the cluster.
This command initializes a service group that is ready to contain various resources. To employ the group properly, you must populate its SystemList attribute to define the systems on which the group may be brought online and taken offline. (A system list is an association of names and integers that represent priority values.)

Modifying Service Group Attributes

  To modify a service group attribute


hagrp -modify service_group attribute value [-sys system]
The variable value represents:
system_name1  priority  system_name2  priority2
If the attribute being modified has local scope, you must specify the system on which to modify the attribute, except when modifying the attribute on the system from which you run the command.

For example, to populate the system list of service group groupx with Systems A and B, type:


hagrp -modify groupx SystemList -add SystemA 1 SystemB 2

Similarly, to populate the AutoStartList attribute of a service group, type:


hagrp -modify groupx AutoStartList SystemA SystemB

You may also define a service group as parallel. To set the Parallel attribute to 1, type the following command. (Note that the default for this attribute is 0, which designates the service group as a failover group.):


hagrp -modify groupx Parallel 1

This attribute cannot be modified if resources have already been added to the service group.

You can modify the attributes SystemList, AutoStartList, and Parallel only by using the command hagrp -modify. You cannot modify attributes created by the system, such as the state of the service group.

Modifying the SystemList Attribute

When using the hagrp -modify command ot change a service group's existing system list, you can use the options -modify, -add, -update, -delete, or -delete -keys.

For example, suppose you originally defined the SystemList of service group groupx as SystemA and SystemB. Then after the cluster was brought up you added a new system to the list:


hagrp -modify groupx SystemList -add SystemC 3

You must take the service group offline on the system being modified.

When you add a system to a service group's system list, the system must have been previously added to the cluster. When using the command line, you can use the hasys -add command.

When you delete a system from a service group's system list, the service group must not be online on the system to be deleted.

If you attempt to change a service group's existing system list using hagrp -modify without other options (such as -add or -update) the command fails.

 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 User's Guide  
VERITAS Software Corporation
www.veritas.com