Sun Cluster Data Services Developer's Guide for Solaris OS

Using the Standard Sun Cluster Administration Commands to Create a Service That Uses the GDS

This section describes how to input parameters to the GDS. You use the existing Sun Cluster administration commands, such as scrgadm and scswitch, to use and administer the GDS.

You do not need to enter the lower-level administration commands that are shown in this section if the scripts provide adequate functionality. However, you can enter the lower-level administration commands if you need to have finer control over the GDS-based resource. These commands are executed by the scripts.

How to Use Sun Cluster Administration Commands to Create a Highly Available Service That Uses the GDS
  1. Become superuser or assume an equivalent role.

  2. Register the resource type SUNW.gds


    # scrgadm -a -t SUNW.gds
    
  3. Create the resource group that contains the LogicalHostname resource and the failover service itself.


    # scrgadm -a -g haapp_rg
    
  4. Create the resource for the LogicalHostname resource.


    # scrgadm -a -L -g haapp_rs -l hhead
    
  5. Create the resource for the failover service itself.


    # scrgadm -a -j haapp_rs -g haapp_rg -t SUNW.gds \
             -y Scalable=false -y Start_timeout=120 \
             -y Stop_timeout=120 -x Probe_timeout=120 \
             -y Port_list="2222/tcp" \
             -x Start_command="/export/ha/appctl/start" \
             -x Stop_command="/export/ha/appctl/stop" \    
             -x Probe_command="/export/app/bin/probe" \
             -x Child_mon_level=0 -y Network_resources_used=hhead \
             -x Failover_enabled=true -x Stop_signal=9
    
  6. Bring the resource group haapp_rg online.


    # scswitch -Z -g haapp_rg
    
How to Use Sun Cluster Administration Commands to Create a Scalable Service That Uses the GDS
  1. Become superuser or assume an equivalent role.

  2. Register the resource type SUNW.gds.


    # scrgadm -a -t SUNW.gds
    
  3. Create the resource group for the SharedAddress resource.


    # scrgadm -a -g sa_rg
    

  4. Create the SharedAddress resource on sa_rg.


    # scrgadm -a -S -g sa_rg -l hhead
    
  5. Create the resource group for the scalable service.


    # scrgadm -a -g app_rg -y Maximum_primaries=2 \
          -y Desired_primaries=2 -y RG_dependencies=sa_rg
    
  6. Create the resource group for the scalable service itself.


    # scrgadm -a -j app_rs -g app_rg -t SUNW.gds \
           -y Scalable=true -y Start_timeout=120 \ 
           -y Stop_timeout=120 -x Probe_timeout=120 \
           -y Port_list="2222/tcp" \
           -x Start_command="/export/app/bin/start" \
           -x Stop_command="/export/app/bin/stop" \
           -x Probe_command="/export/app/bin/probe" \
           -x Child_mon_level=0 -y Network_resource_used=hhead \
           -x Failover_enabled=true -x Stop_signal=9 
    
  7. Bring the resource group that contains the network resources online.


    # scswitch -Z -g sa_rg
    
  8. Bring the resource group app_rg online.


    # scswitch -Z -g app_rg