A resource is an instantiation of a resource type. You must add resources to a resource group before they can be managed by the RGM. Three types of resources are described in this section: logical host name resources or shared address resources and data service (application) resources.
Logical host name and shared address resources are always added to failover resource groups. Data service resources for failover data services are added to failover resource groups. Failover resource groups contain both the logical host name resources and the application resources for the data service. Scalable resource groups contain only the application resources for scalable services. The shared addresses on which the scalable service depends must reside in a separate failover resource group. You must specify dependencies between the scalable application resources and the shared address resources for the data service to scale across cluster nodes.
You can add resources to resource groups through the Sun Management Center GUI or by using the command line, as shown in this section.
For more information on resources, see the Sun Cluster 3.0 Concepts document and Chapter 1, Planning for Sun Cluster Data Services.
To complete this procedure, you must supply the following information:
The name of the failover resource group into which you are adding the resource
The host names you are adding to the resource group
Refer to scrgadm(1M) for additional information.
Perform this procedure from any cluster node.
Become superuser on a node in the cluster.
Add the logical host name resource to the resource group.
# scrgadm -a -L [-j resource-name] -g resource-group-name -l hostname, ... \ [-n netiflist] |
Adds a logical host name resource.
Specifies the logical host name resource form of the command.
Specifies an optional resource name of your choice. If you do not specify this option, the name defaults to the first host name specified with the -l option.
Specifies the name of the resource group in which this resource resides.
Specifies a comma-separated list of UNIX host names (logical host names) by which clients communicate with services in the resource group.
Specifies an optional comma-separated list that identifies the NAFO groups on each node. All nodes in nodelist of the resource group must be represented in netiflist. See scrgadm(1M) for a description of the syntax for specifying netiflist. If you do not specify this option, scrgadm attempts to discover a net adapter on the subnet identified by the hostname list for each node in nodelist.
Verify that the logical host name resource has been added.
# scrgadm -pv -j resource-name |
The resource addition action cause the resource to be validated by the Sun Cluster software. If the validation succeeds, the resource can be enabled and the resource group can be moved into the state where it is managed by the RGM. If the validation fails, scrgadm produces an error message to that effect and exits. In that case, check the syslog on each node for an error message. The message appears on the node that performed the validation, not necessarily the node on which you ran the scrgadm command.
This example shows the addition of logical host name resource (lh-r-1) to a resource group (lh-rg-1).
# scrgadm -a -L -j lh-r-1 -g lh-rg-1 -l schost-1 # scrgadm -pv -j lh-r-1 RG Name: lh-rg-1 (lh-rg-1) Res name: lh-r-1 (lh-rg-1:lh-r-1) Res R_description: (lh-rg-1:lh-r-1) Res resource type: SUNW.LogicalHostname (lh-rg-1:lh-r-1) Res resource group name: lh-rg-1 (lh-rg-1:lh-r-1) Res enabled: False (lh-rg-1:lh-r-1) Res monitor enabled: True |
After adding logical host name resources, use the procedure "How to Bring a Resource Group Online" to bring them online.
To complete this procedure, you must supply the following information:
The name of the resource group into which you are adding the resource. This group must be a failover resource group created previously.
The host names you are adding to the resource group.
Refer to scrgadm(1M) for additional information.
Perform this procedure from any cluster node.
Become superuser on a node in the cluster.
Add the shared address resource to the resource group.
# scrgadm -a -S [-j resource-name] -g resource-group-name -l hostname, ... \ [-X auxnode-list] [-n netiflist] |
Adds shared address resources.
Specifies the shared address resource form of the command.
Specifies an optional resource name of your choice. If you do not specify this option, the name defaults to the first host name specified with the -l option.
Specifies the resource group name.
Specifies a comma-separated list of shared address host names.
Specifies a comma-separated list of physical node names or IDs that identify the cluster nodes that can host the shared address but never serve as primary in the case of failover. These nodes are mutually exclusive, with the nodes identified in the resource group nodelist as potential masters.
Specifies an optional comma-separated list that identifies the NAFO groups on each node. All the nodes in nodelist of the resource group must be represented in the network-interface-list. See scrgadm(1M) for a description of the syntax for specifying netiflist. If you do not specify this option, scrgadm attempts to discover a net adapter on the subnet identified by the hostname list for each node in nodelist.
Verify that the shared address resource has been added and validated.
# scrgadm -pv -j resource-name |
The resource addition action causes the resource to be validated by the Sun Cluster software. If the resource is successfully validated, it can be enabled and the resource group can be moved into the state where it is managed by the RGM. If the validation fails, scrgadm produces an error message to this effect and exits. In that case, check the syslog on each node for an error message. The message appears on the node that performed the validation, not necessarily the node on which you ran the scrgadm command.
This example shows the addition of a shared address resource (sa-r-1) to a resource group (sa-rg-1).
# scrgadm -a -S -j sa-r-1 -g sa-rg-1 -l schost-1 # scrgadm -pv -j sa-r-1 (sa-rg-1) Res name: sa-r-1 (sa-rg-1:sa-r-1) Res R_description: (sa-rg-1:sa-r-1) Res resource type: SUNW.SharedAddress (sa-rg-1:sa-r-1) Res resource group name: sa-rg-1 (sa-rg-1:sa-r-1) Res enabled: False (sa-rg-1:sa-r-1) Res monitor enabled: True |
After adding a shared resource, enable it by following the procedure "How to Bring a Resource Group Online".
A failover application resource is an application resource that uses logical host names created in a failover resource group previously.
To complete this procedure, you must supply the following information:
The name of the failover resource group into which you are adding the resource
The name of the resource type for the resource
The logical host name resources used by the application resource, which are the logical host names previously included in the same resource group
Refer to scrgadm(1M) for additional information.
Perform this procedure from any cluster node.
Become superuser on a node in the cluster.
Add a failover application resource to the resource group.
# scrgadm -a -j resource-name -g resource-group-name -t resource-type-name \ [-x Extension_property=value, ...] [-y Standard_property=value, ...] |
Adds a resource.
Specifies your choice of the name of the resource to add.
Specifies the name of the failover resource group created previously.
Specifies the name of the resource type for the resource.
Specifies a comma-separated list of extension properties that depend on the particular data service. See the chapter for each data service to determine whether it is required.
Specifies a comma-separated list of standard properties that depends on the particular data service. See the chapter for each data service and Appendix A, Standard Properties to determine whether it is required.
You can set additional properties. For details, see Appendix A, Standard Properties and the chapter in this book on installing and configuring your failover data service.
Verify that the failover application resource has been added and validated.
# scrgadm -pv -j resource-name |
The resource addition action causes the resource to be validated by the Sun Cluster software. If the validation succeeds, the resource can be enabled and the resource group can be moved into the state where it is managed by the RGM. If the validation fails, check the syslog on each node for an error message. The message appears on the node that performed the validation, not necessarily the node on which you ran the scrgadm command.
This example shows the addition of a resource (fo-r-1) to a resource group (fo-rg-1). The resource depends on logical host name resources (schost-1, schost-2), which must reside in the same failover resource groups defined previously.
# scrgadm -a -j fo-r-1 -g fo-rg-1 -t rt-1 \ -y Network_resources_used=schost-1,schost2 \ # scrgadm -pv -j fo-r-1 (fo-rg-1) Res name: fo-r-1 (fo-rg-1:fo-r-1) Res R_description: (fo-rg-1:fo-r-1) Res resource type: rt-1 (fo-rg-1:fo-r-1) Res resource group name: fo-rg-1 (fo-rg-1:fo-r-1) Res enabled: False (fo-rg-1:fo-r-1) Res monitor enabled: True |
After adding a failover application resource, enable it by following the procedure "How to Bring a Resource Group Online".
A scalable application resource is an application resource that uses shared addresses in a failover resource group.
To complete this procedure, you must supply the following information:
The name of the scalable resource group into which you are adding the resource
The name of the resource type for the resource
The shared address resources used by the scalable service resource, which are the shared addresses previously included in a failover resource group
Refer to scrgadm(1M) for additional information.
Perform this procedure from any cluster node.
Become superuser on a node in the cluster.
Add a scalable application resource to the resource group.
# scrgadm -a -j resource-name -g resource-group-name -t resource-type-name \ -y Network_resources_used=network-resource[,network-resource...] \ -y Scalable=True [-x Extension_property=value, ...] [-y Standard_property=value, ...] |
Adds a resource.
Specifies your choice of the name of the resource to add.
Specifies the name of a scalable service resource group created previously.
Specifies the name of the resource type for this resource.
Specifies the list of network resources (shared addresses) on which this resource depends.
Specifies that this resource is scalable.
Specifies a comma-separated list of extension properties that depend on the particular data service. See the chapter for each data service to determine whether it is required.
Specifies a comma-separated list of standard properties that depends on the particular data service. See the chapter for each data service and Appendix A, Standard Properties to determine whether it is required.
You can set additional properties. For information on other configurable properties, see Appendix A, Standard Properties and the chapter in this book on installing and configuring your scalable data service. Specifically for scalable services, you would normally set the Port_list, Load_balancing_weights, and Load_balancing_policy properties, which are described in Appendix A, Standard Properties.
Verify that the scalable application resource has been added and validated.
# scrgadm -pv -j resource-name |
The resource addition action causes the resource to be validated by the Sun Cluster software. If the validation succeeds, the resource can be enabled and the resource group can be moved into the state where it is managed by the RGM. If the validation fails, check the syslog on each node for an error message. The message appears on the node that performed the validation, not necessarily the node on which you ran the scrgadm command.
This example shows the addition of a resource (ss-r-1) to a resource group (ss-rg-1). Note that ss-rg-1 depends on the failover resource group that contains the network addresses being used (schost-1 and schost-2 in the following example). The resource depends on shared address resources (schost-1, schost-2), which must reside in one or more failover resource groups defined previously.
# scrgadm -a -j ss-r-1 -g ss-rg-1 -t rt-1 \ -y Network_resources_used=schost-1,schost-2 \ -y Scalable=True # scrgadm -pv -j ss-r-1 (ss-rg-1) Res name: ss-r-1 (ss-rg-1:ss-r-1) Res R_description: (ss-rg-1:ss-r-1) Res resource type: rt-1 (ss-rg-1:ss-r-1) Res resource group name: ss-rg-1 (ss-rg-1:ss-r-1) Res enabled: False (ss-rg-1:ss-r-1) Res monitor enabled: True |
After adding a scalable application resource, enable it by following the procedure "How to Bring a Resource Group Online".