Sun Cluster Data Service for SAP Web Application Server Guide for Solaris OS

ProcedureHow to Enable the SAP Web Application Server to Run in a Cluster

The following resource groups are created in this procedure:

Note that the procedure to enable the SAP J2EE engine to run in a cluster is located in a separate section. See How to Enable the Stand-Alone SAP J2EE Engine to Run in a Cluster.

  1. Become superuser on a cluster node.

  2. Create a resource group for the SAP central services.

    The SAP central services resource group is a failover resource group to contain the SAP enqueue server resource, the SAP message server resource, and the logical hostname for these resources.


    # clresourcegroup create central-rg
    
    central-rg

    Specifies the name of the resource group to be created. Choose a unique name for each resource group within the cluster.

  3. Add a logical hostname resource to the resource group that you created in Step 2.


    # clreslogicalhostname create -g central-rg central-logical-hostname
    
    -g central-rg

    Specifies that the logical hostname resource is to be added to the resource group named central-rg that you created in Step 2.

    central-logical-hostname

    Specifies that the logical hostname of the SAP central services resource is central-logical-hostname.


    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  4. Bring online the SAP central services resource group.


    # clresourcegroup online -M central-rg
    
    -M

    Specifies that the resource group is to be brought over into the managed state.

  5. Create a resource group for the SAP replica server.

    The SAP replica server resource group is a failover resource group to contain the SAP replica server resource and the logical hostname for this resource.


    # clresourcegroup create repl-rg
    
  6. Add a logical hostname resource to the resource group that you created in Step 5.


    # clreslogicalhostname create -g repl-rg saprepl-logical-hostname
    
    -g repl-rg

    Specifies the name of the resource group.

    saprepl-logical-hostname

    Specifies the logical hostname of the SAP replica server resource.


    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  7. Bring online the SAP replica server resource group.


    # clresourcegroup online -M repl-rg
    
    -M

    Specifies that the resource group is to be brought into the managed state.

  8. Set weak positive affinity between the SAP central services resource group and the SAP replica server resource group.

    The weak positive affinity setting ensures that, in case of failover, the SAP central services resource group fails over to the node where the SAP replica server resource group has been running.


    # clresourcegroup set -p RG_affinities=+repl-rg central-rg
    
    central-rg

    Specifies the name of the resource group to be modified.

    -p RG_affinities=+repl-rg

    Specifies that the central-rg resource group has weak positive affinity with the repl-rg resource group.

    central-rg

    Specifies the name of the resource group central-rg to be modified

  9. If the SAP central services resource group and the SAP replica server resource group are online on the same node, switch one of them to another node.

    The two resource groups must be mastered on different nodes before the strong negative affinity can be set between the resource groups.


    # clresourcegroup switch -n node repl-rg
    
    -n node

    Specifies the node to which the resource group is to be switched.

    repl-rg

    Specifies the name of the resource group to be switched. This resource group can be either the SAP central services resource group or the SAP replica server resource group.

  10. Set strong negative affinity between the SAP replica server resource group and the SAP central services resource group.

    The strong negative affinity setting ensures that node failover behavior is appropriate. The SAP central services resource group fails over to the node where the SAP replica server resource group has been running. The SAP replica server resource group then fails over to another available node.

    The SAP replica server resource group is never brought online nor allowed to remain online on a node on which the SAP central services resource group is online.


    # clresourcegroup set -p RG_affinities=--central-rg repl-rg
    
    -p RG_affinities=--central-rg

    Specifies that the repl-rg resource group has strong negative affinity with the central-rg resource group.

    repl-rg

    Specifies the name of the resource group to be modified.

  11. Create a resource group for the SAP web application server component.

    The SAP web application server resource group can be configured as a failover or scalable resource group to contain the resource for the SAP web application server component. If the SAP web application server is configured as a failover resource, the logical hostname for this resource is also contained in the SAP web application server resource group.

    • To create a failover resource group, run the following command.


      # clresourcegroup create webas-rg
      
    • To create a scalable resource group, run the following command.


      # clresourcegroup create \
      -p Maximum_primaries=value -p Desired_primaries=value webas-rg
      
    -p Maximum_primaries=value

    Specifies the maximum number of primary nodes for this scalable resource group.

    -p Desired_primaries=value

    Specifies the desired number of primary nodes for this scalable resource group.

    webas-rg

    Specifies the name of the failover resource group to be added. This name can be your choice but must be unique for the resource groups within the cluster.

  12. If the resource group that you created in Step 11 is configured as a failover resource group, add a logical hostname resource to the resource group.

    If the resource group that you created in Step 11 is configured as a scalable resource group, skip this step.


    # clreslogicalhostname create -g webas-rg webas-logical-hostname
    
    -g webas-rg

    Specifies the name of the resource group.

    webas-logical-hostname

    Specifies the logical hostname saprepl-logical-hostname of the SAP replica server resource. By default the name of the logical-host resource is set to the same name as this. If you wish to specify a separate name then place the name of the resource at the end of the command listing.


    Note –

    If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.


  13. Bring online the SAP web application server resource group.


    # clresourcegroup online -M webas-rg
    
    -M

    Specifies that the resource group is to be brought into the managed state.

    webas-rg

    Specifies the name of the resource group that needs to be brought online.

  14. (Optional) Consider configuring your cluster to off-load noncritical resource groups.

    You might plan to run a noncritical, lower-priority SAP web application server component resource on a node to which a critical, higher-priority SAP central services resource can fail over. In this situation, consider setting strong negative affinity between the resource groups. This setting ensures that, if a higher-priority SAP central services resource fails over to the node where a lower-priority SAP web application server component resource is running, the lower-priority resource is off-loaded, thereby automatically freeing the node's resources to be used for the critical SAP central services resource.


    # clresourcegroup set -p RG_affinities=--central-rg webas-rg
    
    -p RG_affinities=--central-rg

    Specifies that the webas-rg resource group has strong negative affinity with the central-rg resource group. If the central-rg resource group fails over to the node where the webas-rg resource group is running, the webas-rg resource group is off-loaded.

    webas-rg

    Specifies the name of the resource group to be modified.

  15. Copy all system files that were changed during the SAP Web Application Server installation and configuration process to all the nodes that are to run the SAP Web Application Server resources. These files might include the following:

    • /etc/passwd

    • /etc/group

    • /etc/system

    • /etc/services