Sun Cluster 3.0 12/01 Release Notes Supplement

Using the Command Line to Create a Service Using GDS

In this section we describe how the above mentioned parameters would actually be input to the GDS. The GDS will be used and administered using the existing Sun Cluster administrative commands, such as scrgadm(1M) and scswitch(1M).

Command Line Interface to Create a Highly Available Service Using GDS
  1. Register the resource type SUNW.gds.


    # scrgadm -a -t gds
    
  2. Create the resource group containing the LogicalHostname resource and the failover service itself.


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


    # scrgadm -a -L -g haapp_rs -l hhead
    
  4. 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 \
    -x Start_command="/usr/local/ha/appctl start" \
    -x Stop_command="/usr/local/ha/appctl stop" \
    -x Probe_command="/usr/local/app/bin/probe" \
    -x Child_mon_level=0 -y Network_resources_used=hhead
    

    Note -

    See "Start Command Arguments" for information on issuing the start command.


  5. Bring the resource group haapp_rg online.


    # scswitch -Z -g haapp_rg
    
Command Line Interface to Create a Scalable Service Using GDS
  1. Register the resource type SUNW.gds.


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


    # scrgadm -a -g sa_rg
    
    .

  3. Create the SharedAddress resource on sa_rg.


    # scrgadm -a -S -g sa_rg -l hhead
    
  4. 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
    
  5. 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 \
    -x Start_command="/usr/local/app/bin/start" \
    -x Stop_command="/usr/local/app/bin/stop" \
    -x Probe_command="/usr/local/app/bin/probe \
    -x Child_mon_level=0 -y Network_resource_used=hhead
    

    Note -

    See "Start Command Arguments" for information on issuing the start command.


  6. Bring the resource group containing the network resources online.


    # scswitch -Z -g sa_rg
    
  7. Bringing the resource group app_rg online.


    # scswitch -Z -g app_rg
    

Start Command Arguments

The arguments to the start script will vary according to the type of resource. Check the customized man page or run the start script without any argument to get a usage statement.


# /opt/NETapp/util/startapp 
The resource name of LogicalHostname or SharedAddress must be specified.

For failover services: 
Usage: startapp -h <logical host name>
-p <port and protocol list> 
[-n <nafogroup/adapter list>] 
[-v]

For scalable services: 
Usage: startapp
-h <shared address name>
-p <port and protocol list>
[-l <load balancing policy>] 
[-n <nafogroup/adapter list>] 
[-w <load balancing weights>] [-v]

For stand-alone (non-network aware applications):
Usage: startapp [-v]