In the following example, the resource group resource-group-1 contains three data services.
iWS, which depends on /global/resource-group-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 resource-group-1, perform the following steps.
Become superuser on a cluster member.
Create the resource group resource-group-1.
# scrgadm -a -g resource-group-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 resource-group-1 -t SUNW.HAStorage \ -x ServicePaths=/global/resource-group-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 resource-group-1, and set their dependency to hastorage-1.
For example, for iWS, run the following command.
# scrgadm -a -j resource -g resource-group-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 resource-group-1 to the managed state, and bring resource-group-1 online.
# scswitch -Z -g resource-group-1 |
The SUNW.HAStorage resource type 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. See the SUNW.HAStorage(5) man page for details.