The example in this section assumes the following configuration, where failover IP addresses are represented by logical host names.
Node Agent NA1 and its associated server instances I1 and I2 are configured to listen on failover IP address IP1.
Node Agent NA2 and its associated server instances I3 and I4 are also configured to listen on failover IP address IP1.
Node Agent NA3 and its associated server instances I5 and I6 are configured to listen on failover IP address IP2.
Node Agent NA4 and its associated server instances I7 and I8 are also configured to listen on failover IP address IP2.
To register the resource type for the Node Agents, the following command is run.
# clresourcetype register SUNW.jsas-na |
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.
# clresourcegroup create na-rg1 |
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.
# clresourcegroup create na-rg2 |
To add the failover IP address resource IP1 to the resource group na-rg1, the following command is run.
# clreslogicalhostname create -g na-rg1 -h IP1 IP1 |
If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.
To add the failover IP address resource IP2 to the resource group na-rg2, the following command is run.
# clreslogicalhostname create -g na-rg2 -h IP2 IP2 |
If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.
To create the Node Agent resource na-rs1 in resource group na-rg1, the following command is run.
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.
# clresource create -g na-rg1 \ -t SUNW.jsas-na \ -p Resource_Dependencies=das-rs \ -p Adminhost=host-1 \ -p Adminuser=admin \ -p Agentdir=/global/dg1/na-dir \ -p Passwordfile=/global/dg1/p na-rs1 |
Run this command if the installation is not in the default location, and the administrative port is not the default value.
# clresource create -g na-rg1 \ -t SUNW.jsas-na \ -p Resource_Dependencies=das-rs \ -p Adminhost=host-1 \ -p Adminuser=admin \ -p Agentdir=/global/dg1/na-dir \ -p Passwordfile=/global/dg1/p \ -p Confdir_list=/global/disk1/appserver-install-dir \ -p Adminport=6162 na-rs1 |
The resource is created in the enabled state.
To create the Node Agent resource na-rs2 in resource group na-rg2, the following command is run.
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.
# clresource create -g na-rg2 \ -t SUNW.jsas-na \ -p Resource_Dependencies=das-rs \ -p Adminhost=host-1 \ -p Adminuser=admin \ -p Agentdir=/global/dg1/na-dir \ -p Passwordfile=/global/dg1/p na-rs2 |
Run this command if the installation is not in the default location, and the administrative port is not the default value.
# clresource create -g na-rg2 \ -t SUNW.jsas-na \ -p Resource_Dependencies=das-rs \ -p Adminhost=host-1 \ -p Adminuser=admin \ -p Agentdir=/global/dg1/na-dir \ -p Passwordfile=/global/dg1/p \ -p Confdir_list=/global/disk1/appserver-install-dir \ -p Adminport=6162 na-rs2 |
The resource is created in the enabled state.
To bring the Node Agent resource group na-rg1 online, the following command is run.
# clresourcegroup online 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.
To bring the Node Agent resource group na-rg2 online, the following command is run.
# clresourcegroup online 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.