Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Synchronizing the Startups Between Resource Groups and Disk Device Groups

After a cluster boots or services fail over to another node, global devices and cluster file systems might require time to become available. However, a data service can run its START method before global devices and cluster file systems come online. If the data service depends on global devices or cluster file systems that are not yet online, the START method times out. In this situation, you must reset the state of the resource groups that the data service uses and restart the data service manually.

To avoid these additional administrative tasks, use the HAStorage resource type or the HAStoragePlus resource type. Add an instance of HAStorage or HAStoragePlus to all resource groups whose data service resources depend on global devices or cluster file systems. Instances of these resource types perform the following operations:

To determine which resource type to use, see Choosing Between HAStorage and HAStoragePlus.

To create an HAStorage resource, see How to Set Up HAStorage Resource Type for New Resources.

To create an HAStoragePlus resource, see How to Set Up the HAStoragePlus Resource Type for an NFS-Exported File System.

ProcedureHow to Set Up HAStorage Resource Type for New Resources

HAStorage might not be supported in a future release of Sun Cluster software. Equivalent functionality is supported by HAStoragePlus. For instructions for upgrading from HAStorage to HAStoragePlus, see Upgrading From HAStorage to HAStoragePlus.

In the following example, the resource group resource-group-1 contains the following data services.

To create an HAStorage resource hastorage-1 for new resources in resource-group-1, read Synchronizing the Startups Between Resource Groups and Disk Device Groups and then perform the following steps.

To create an HAStoragePlus resource, see Enabling Highly Available Local File Systems.

Steps
  1. Become superuser on a cluster member.

  2. Create the resource group resource-group-1.


    # scrgadm -a -g resource-group-1
    
  3. Determine whether the resource type is registered.

    The following command prints a list of registered resource types.


    # scrgadm -p | egrep Type
    
  4. If you need to, register the resource type.


    # scrgadm -a -t SUNW.HAStorage
    
  5. Create the HAStorage resource hastorage-1, and define the service paths.


    # scrgadm -a -j hastorage-1 -g resource-group-1 -t SUNW.HAStorage \
    -x ServicePaths=/global/resource-group-1,/dev/global/dsk/d5s2,dsk/d6
    

    ServicePaths can contain the following values.

    • Global device group names, such as nfs-dg

    • Paths to global devices, such as /dev/global/dsk/d5s2 or dsk/d6

    • Mount points for cluster file systems, such as /global/nfs


    Note –

    If ServicePaths contains paths for cluster file systems, global device groups might not be colocated with the resource groups that correspond to them.


  6. Enable the hastorage-1 resource.


    # scswitch -e -j hastorage-1
    
  7. Add the resources (Sun Java System Web Server, Oracle, and NFS) to resource-group-1, and set their dependency to hastorage-1.

    For example, for Sun Java System Web Server, run the following command.


    # scrgadm -a -j resource -g resource-group-1 -t SUNW.iws \
    -x Confdir_list=/global/iws/schost-1 -y Scalable=False \
    -y Network_resources_used=schost-1 -y Port_list=80/tcp \
    -y Resource_dependencies=hastorage-1
    
  8. Verify that you have correctly configured the resource dependencies.


    # scrgadm -pvv -j resource | egrep strong
    
  9. Set resource-group-1 to the MANAGED state, and bring resource-group-1 online.


    # scswitch -Z -g resource-group-1
    
Affinity Switchovers

The HAStorage resource type contains another extension property, AffinityOn, which is a Boolean that specifies whether HAStorage must perform an affinity switchover for the global devices and cluster file systems that are defined in ServicePaths. For details, see the SUNW.HAStorage(5) man page.


Note –

HAStorage and HAStoragePlus do not permit AffinityOn to be set to True if the resource group is scalable. HAStorage and HAStoragePlus check the AffinityOn value and internally reset the value to False for a scalable resource group.


ProcedureHow to Set Up HAStorage Resource Type for Existing Resources

HAStorage might not be supported in a future release of Sun Cluster software. Equivalent functionality is supported by HAStoragePlus. For instructions for upgrading from HAStorage to HAStoragePlus, see Upgrading From HAStorage to HAStoragePlus.

Before You Begin

Read Synchronizing the Startups Between Resource Groups and Disk Device Groups.

Steps
  1. Determine whether the resource type is registered.

    The following command prints a list of registered resource types.


    # scrgadm -p | egrep Type
    
  2. If you need to, register the resource type.


    # scrgadm -a -t SUNW.HAStorage
    
  3. Create the HAStorage resource hastorage-1.


    # scrgadm -a -g resource-group -j hastorage-1 -t SUNW.HAStorage \
    -x ServicePaths= … -x AffinityOn=True
    
  4. Enable the hastorage-1 resource.


    # scswitch -e -j hastorage-1
    
  5. Set up the dependency for each of the existing resources, as required.


    # scrgadm -c -j resource -y Resource_Dependencies=hastorage-1
    
  6. Verify that you have correctly configured the resource dependencies.


    # scrgadm -pvv -j resource | egrep strong