Sun Cluster Data Services Planning and Administration Guide for Solaris OS

ProcedureEncapsulating an SMF Service Into a Multi-Master Proxy Resource Configuration

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Register the SMF proxy multi-master resource type.


    # clresourcetype register -f\ 
    /opt/SUNWscsmf/etc/SUNW.Proxy_SMF_multimaster SUNW.Proxy_SMF_multimaster
    
  3. Create the SMF multi-master resource group.


    # clresourcegroup create\-p Maximum_primaries=m\-p Desired_primaries=n\
    [-n node-zone-list]\
    resource-group
    
    -p Maximum_primaries=m

    Specifies the maximum number of active primaries for this resource group.

    -p Desired_primaries=n

    Specifies the number of active primaries on which the resource group should attempt to start.

    -n node-zone-list

    Specifies a comma-separated, ordered list of zones in which this resource group is to be available. The format of each entry in the list is node:zone. In this format, node specifies the node name and zone specifies the name of a non-global Solaris zone. To specify the global zone, or to specify a node without non-global zones, specify only node.

    This list is optional. If you omit this list, the resource group is configured on the global zones of the cluster nodes.

    resource-group

    Specifies your choice of the name of the scalable resource group to add. This name must begin with an ASCII character.

  4. Verify that the SMF proxy multi-master resource group has been created.


    # clresourcegroup show resource-group
    
  5. Add an SMF proxy multi-master resource to the resource group.


    # clresource create -g resource-group -t SUNW.Proxy_SMF_multimaster\
    [-p "extension-property[{node-specifier}]"=value, …] [-p standard-property=value, …] resource
    
    -g resource-group

    Specifies the name of a scalable service resource group that you previously created.

    -p "extension-property[{node-specifier}]"=value, …

    Specifies a comma-separated list of extension properties that you are setting for the resource. The extension properties that you can set depend on the resource type. To determine which extension properties to set, see the documentation for the resource type.

    node-specifier is an optional qualifier to the -p and -x options. This qualifier indicates that the extension property or properties on only the specified node or nodes or zone or zones are to be set when the resource is created. The specified extension properties on other nodes or zones in the cluster are not set. If you do not include node-specifier, the specified extension properties on all nodes and zones in the cluster are set. You can specify a node name or a node identifier for node-specifier. Examples of the syntax of node-specifier include the following:


    -p "myprop{phys-schost-1}"
    

    The braces ({}) indicate that you want to set the specified extension property on only node phys-schost-1. For most shells, the double quotation marks (“) are required.

    You can also use the following syntax to set an extension property in two different zones on two different nodes:


    -x "myprop{phys-schost-1:zoneA,phys-schost-2:zoneB}"
    
    -p standard-property=value, …

    Specifies a comma-separated list of standard properties that you are setting for the resource. The standard properties that you can set depend on the resource type. For scalable services, you typically set the Port_list, Load_balancing_weights, and Load_balancing_policy properties. To determine which standard properties to set, see the documentation for the resource type and Appendix B, Standard Properties.

    resource

    Specifies your choice of the name of the resource to add.

    The resource is created in the enabled state.

  6. Verify that the SMF proxy multi-master application resource has been added and validated.


    # clresource show resource
    
  7. Bring the multi-master resource group online.


    # clresourcegroup online -M +
    

Example 2–48 Registering an SMF Proxy Multi-Master Resource Type

The following example registers the SUNW.Proxy_SMF_multimaster resource type.


# clresourcetype register SUNW.Proxy_SMF_multimaster
# clresourcetype show SUNW.Proxy_SMF_multimaster

Resource Type:            SUNW.Proxy_SMF_multimaster
RT_description:           Resource type for proxying multimastered SMF services 
RT_version:               3.2
API_version:              6
RT_basedir:               /opt/SUNWscsmf/bin
Single_instance:          False
Proxy:                    False
Init_nodes:               All potential masters
Installed_nodes:          <All>
Failover:                  True
Pkglist:                   SUNWscsmf 
RT_system:                 False
Global_zone:				   False


Example 2–49 Creating and Adding an SMF Proxy Multi-Master Application Resource to a Resource Group

This example shows the creation and addition of a multi-master proxy resource type SUN.Proxy_SMF_multimaster to a resource group resource-group-1.


# clresourcegroup create\
-p Maximum_primaries=2\
-p Desired_primaries=2\
-n phys-schost-1, phys-schost-2\
resource-group-1
# clresourcegroup show resource-group-1

=== Resource Groups and Resources ===          

Resource Group:                        resource-group-1
RG_description:                        <NULL>
RG_mode:                               multimastered
RG_state:                              Unmanaged
RG_project_name:                       default
RG_affinities:                         <NULL>
Auto_start_on_new_cluster:             True
Failback:                              False
Nodelist:                              phys-schost-1 phys-schost-2
Maximum_primaries:                      2
Desired_primaries:                      2
Implicit_network_dependencies:         True
Global_resources_used:                 <All>
Pingpong_interval:                      3600
Pathprefix:                            <NULL>
RG_System:                             False
Suspend_automatic_recovery:                      False

# clresource create -g resource-group-1 -t SUNW.Proxy_SMF_multimaster
-x proxied_service_instances=/var/tmp/svslist.txt resource-1
# clresource show resource-1

=== Resources ===

  Resource:                               resource-1
  Type:                                  SUNW.Proxy_SMF_multimaster
  Type_version:                          3.2 
  Group:                                 resource-group-1
  R_description:                         
  Resource_project_name:                 default
  Enabled{phats1}:                       True 
  Monitored{phats1}:                     True