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.

Steps
  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 host name for these resources.


    # scrgadm -a  -g central-rg
    
    -a

    Specifies that a new resource group is to be added.

    -g central-rg

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

  3. Add a logical-host-name resource to the resource group that you created in Step 2.


    # scrgadm -a -L -g central-rg  -l central-logical-hostname [ -n netiflist]
    -a

    Specifies that a new configuration is to be added.

    -L

    Specifies that a logical-host-name resource is to be added.

    -g central-rg

    Specifies the logical-host-name resource to be added to the resource group that you created in Step 2.

    -l central-logical-hostname

    Specifies the logical-host name of the SAP central services resource.

    -n netiflist

    Specifies a comma-separated list of network interfaces. All nodes in the node list of the resource group must be represented in the list of network interfaces. Specifying a list of network interfaces is optional. If you omit the list, an attempt is made for each node to discover a network interface on the subnet that the host-name list identifies.

  4. Bring online the SAP central services resource group.


    # scswitch -Z  -g central-rg
    
    -Z

    Specifies that a resource group is to be brought online.

    -g central-rg

    Specifies the name of the resource group to be brought online. This name is the name of the resource group that was created in Step 2.

  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 host name for this resource.


    # scrgadm -a  -g repl-rg
    
    -a

    Specifies that a new resource group is to be added.

    -g repl-rg

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

  6. Add a logical-host-name resource to the resource group that you created in Step 5.


    # scrgadm -a -L -g repl-rg  -l saprepl-logical-hostname [ -n netiflist]
    -a

    Specifies that a new configuration is to be added.

    -L

    Specifies that a logical-host-name resource is to be added.

    -g repl-rg

    Specifies the logical-host-name resource to be added to the resource group that you created in Step 5.

    -l saprepl-logical-hostname

    Specifies the logical-host name of the SAP replica server resource.

    -n netiflist

    Specifies a comma-separated list of network interfaces. All nodes in the node list of the resource group must be represented in the list of network interfaces. Specifying a list of network interfaces is optional. If you omit the list, an attempt is made for each node to discover a network interface on the subnet that the host-name list identifies.

  7. Bring online the SAP replica server resource group.


    # scswitch -Z  -g repl-rg
    
    -Z

    Specifies that a resource group is to be brought online.

    -g repl-rg

    Specifies the name of the resource group to be brought online. This name is the name of the resource group that was created in Step 5.

  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.


    # scrgadm -c  -g central-rg  -y RG_affinities=+repl-rg
    
    -c

    Specifies that a resource group is to be modified

    -g central-rg

    Specifies the name of the resource group to be modified

    -y RG_affinities=+repl-rg

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

  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.


    # scswitch -z  -g rg  -h node
    
    -z

    Specifies that a resource group is to be switched to another node.

    -g 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.

    -h node

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

  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.


    # scrgadm -c  -g repl-rg  -y RG_affinities=--central-rg
    
    -c

    Specifies that a resource group is to be modified

    -g repl-rg

    Specifies the name of the resource group to be modified

    -y RG_affinities=--central-rg

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

  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 host name for this resource is also contained in the SAP web application server resource group.

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


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


      # scrgadm -a  -g scalwebas-rg \
      -y Maximum_primaries=value  -y Desired_primaries=value
      
    -a

    Specifies that a new resource group is to be added.

    -g 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.

    -g scalwebas-rg

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

    -y Maximum_primaries=value

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

    -y Desired_primaries=value

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

  12. If the resource group that you created in Step 11 is configured as a failover resource group, add a logical-host-name 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.


    # scrgadm -a -L -g webas-rg  -l webas-logical-hostname [ -n netiflist]
    -a

    Specifies that a new configuration is to be added.

    -L

    Specifies that a logical-host-name resource is to be added.

    -g webas-rg

    Specifies the logical-host-name resource to be added to the resource group that you created in Step 11.

    -l webas-logical-hostname

    Specifies the logical-host name of the SAP web application server component resource.

    -n netiflist

    Specifies a comma-separated list of network interfaces. All nodes in the node list of the resource group must be represented in the list of network interfaces. Specifying a list of network interfaces is optional. If you omit the list, an attempt is made for each node to discover a network interface on the subnet that the host-name list identifies.

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


    # scswitch -Z  -g webas-rg
    
    -Z

    Specifies that a resource group is to be brought online.

    -g webas-rg

    Specifies the name of the resource group to be brought online. This name is the name of the resource group that was created in Step 11.

  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.


    # scrgadm -c  -g webas-rg  -y RG_affinities=--central-rg
    
    -c

    Specifies that a resource group is to be modified.

    -g webas-rg

    Specifies the name of the resource group to be modified.

    -y 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.

  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