Sun Cluster Data Service for Sun Java System Application Server Guide for Solaris OS

Example of Creating the Failover Node Agent Component in the Sun Cluster HA for Sun Java System Application Server

The example in this section assumes the following configuration, where failover IP addresses are represented by logical host names.


Example 1–4 Creating Failover Node Agent Resources

  1. To register the resource type for the Node Agents, the following command is run.


    # scrgadm -a -t SUNW.jsas-na
    
  2. To create the failover resource group na-rg1 to contain the failover IP address IP1 and the Node Agent resource for Node Agents NA1 and NA2, the following command is run.


    # scrgadm -a -g na-rg1
    
  3. To create the failover resource group na-rg2 to contain the failover IP address IP2 and the Node Agent resource for Node Agents NA3 and NA4, the following command is run.


    # scrgadm -a -g na-rg2
    
  4. To add the failover IP address resource IP1 to the resource group na-rg1, the following command is run.


    # scrgadm -a -L -g na-rg1 -l IP1
    
  5. To add the failover IP address resource IP2 to the resource group na-rg2, the following command is run.


    # scrgadm -a -L -g na-rg2 -l IP2
    
  6. To create the Node Agent resource na-rs1 in resource group na-rg1, the following command is run.


    Note –

    Only one Node Agent resource is created for all the Node Agents configured for one failover IP address. The data service automatically detects the Node Agents that are configured on the failover IP address that is created in the failover resource group.

    In this example, Node Agents NA1 and NA2 and all their server instances (I1, I2, I3, and I4) are configured on IP1, and therefore only one resource, na-rs1 is created for NA1 and NA2.


    • Run this command if you use the default values for the extension properties.


      # scrgadm -a -j na-rs1  -g na-rg1  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p
      
    • Run this command if the installation is not in the default location, and the administrative port is not the default value.


      # scrgadm -a -j na-rs1  -g na-rg1  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p \
      -x Confdir_list=/global/disk1/appserver-install-dir \
      -x Adminport=6162
      
  7. To create the Node Agent resource na-rs2 in resource group na-rg2, the following command is run.


    Note –

    Only one Node Agent resource is created for all the Node Agents configured for one failover IP address. The data service automatically detects the Node Agents that are configured on the failover IP address that is created in the failover resource group.

    In this example, Node Agents NA3 and NA4 and all their server instances (I5, I6, I7, and I8) are configured on IP2, and therefore only one resource, na-rs2 is created for NA3 and NA4.


    • Run this command if you use the default values for the extension properties.


      # scrgadm -a -j na-rs2  -g na-rg2  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p
      
    • Run this command if the installation is not in the default location, and the administrative port is not the default value.


      # scrgadm -a -j na-rs2  -g na-rg2  \
      -t SUNW.jsas-na \
      -y Resource_Dependencies=das-rs \
      -x Adminhost=host-1 \
      -x Adminuser=admin \
      -x Agentdir=/global/dg1/na-dir \
      -x Passwordfile=/global/dg1/p \
      -x Confdir_list=/global/disk1/appserver-install-dir \
      -x Adminport=6162
      
  8. To bring the Node Agent resource group na-rg1 online, the following command is run.


    # scswitch -Z -g na-rg1
    

    By bringing online the resource group na-rg1, you enable the following resources.

    • Node Agent NA1 and server instances I1 and I2, which are configured under NA1.

    • Node Agent NA2 and server instances I3 and I4, which are configured under NA2.

  9. To bring the Node Agent resource group na-rg2 online, the following command is run.


    # scswitch -Z -g na-rg2
    

    By bringing online the resource group na-rg2, you enable the following resources.

    • Node Agent NA3 and server instances I5 and I6, which are configured under NA3.

    • Node Agent NA4 and server instances I7 and I8, which are configured under NA4.