After a cluster boots up or services fail over to another node, global devices and cluster file systems may take a while before they become available. However, a data service can run its START method before global devices and cluster file systems-on which the data service depends-come online. In this case, the START method times out and you must reset the state of the resource groups used by the data service and restart the data service manually.The resource type SUNW.HAStorage monitors the global devices and cluster file systems and causes the START method of the other resources in the same resource group to wait until they become available. To avoid additional administrative tasks, you should set up SUNW.HAStorage for all the resource groups whose data service resources depend on global devices or cluster file systems.
In the following example, the resource group rg-1 contains three data services:
iWS, which depends on /global/rg-1
Oracle, which depends on /dev/global/dsk/d5s2
NFS, which depends on dsk/d6
To create a SUNW.HAStorage resource hastorage-1 for new resources in rg-1, do the following:
Become superuser on a node in the cluster.
Create the resource group rg-1.
# scrgadm -a -g rg-1 |
Register the resource type.
# scrgadm -a -t SUNW.HAStorage |
Create the SUNW.HAStorage resource hastorage-1 and define the service paths.
# scrgadm -a -j hastorage-1 -g rg-1 -t SUNW.HAStorage \ -x ServicePaths=/global/rg-1,/dev/global/dsk/d5s2,dsk/d6 |
ServicePaths can contain the following values:
Global device group names, such as nfs-dg
Paths to global devices, such as /dev/global/dsk/d5s2 or dsk/d6
Cluster file system mount points, such as /global/nfs
Enable the hastorage-1 resource.
# scswitch -e -j hastorage-1 |
Add the resources, iWS, Oracle, and NFS, to rg-1 and set their dependency to hastorage-1. For example, for iWS, type:
# scrgadm -a -j resource-name -g rg-1 -t SUNW.iws \ -x Confdir_list=/global/iws/schost-1 \ -y Scalable=False -y Network_resources_used=schost-1 \ -y Port_list=80/tcp -y Resource_dependencies=hastorage-1 |
Set rg-1 to the managed state and bring it online.
# scswitch -Z -g rg-1 |
SUNW.HAStorage contains another extension property, AffinityOn, which is a Boolean that specifies whether SUNW.HAStorage must perform an affinity switchover for the global devices and cluster file systems defined in ServicePaths. For details, see the SUNW.HAStorage(5) man page.
To create a SUNW.HAStorage resource for existing resources, do the following:
Register the resource type.
# scrgadm -a -t SUNW.HAStorage |
Create the SUNW.HAStorage resource hastorage-1, for example:
# scrgadm -a -g resource-group-name -j hastorage-1 -t SUNW.HAStorage \ -x ServicePaths= ... -x AffinityOn=True |
Enable the hastorage-1 resource.
# scswitch -e -j hastorage-1 |
Set up the dependency for each of the existing resources, as required.
# scrgadm -c -j resource-name -y Resource_Dependencies=hastorage-1 |