This section describes how application resource groups were created for an NFS application. The procedures in this section are specific to the application. The procedures cannot be used for another type of application.
Access nodeA as superuser.
Register SUNW.nfs as a resource type.
nodeA# scrgadm -a -t SUNW.nfs |
If SUNW.HAStoragePlus has not been registered as a resource type, register it.
nodeA# scrgadm -a -t SUNW.HAStoragePlus |
Create an application resource group for the devicegroup.
nodeA# scrgadm -a -g nfs-rg \ -y Pathprefix=/global/etc \ -y Auto_start_on_new_cluster=False \ -y RG_dependencies=devicegroup-stor-rg |
Is the name of the application resource group.
Specifies a directory into which the resources in the group can write administrative files.
Specifies that the application resource group is not started automatically.
Specifies the resource groups that the application resource group depends on. In this example, the application resource group depends on the replication resource group.
If the application resource group is switched over to a new primary node, the replication resource group is automatically switched over. However, if the replication resource group is switched over to a new primary node, the application resource group must be manually switched over.
Add a SUNW.HAStoragePlus resource to the application resource group.
nodeA# scrgadm -a -j nfs-dg-rs -g nfs-rg \ -t SUNW.HAStoragePlus \ -x FileSystemMountPoints=/global/mountpoint \ -x AffinityOn=True |
Is the name of the HAStoragePlus resource for the NFS application.
Specifies that the mount point for the file system is global.
Specifies that the resource is of the type SUNW.HAStoragePlus.
Specifies that the application resource must perform an affinity switchover for the global devices and cluster file systems defined by -x GlobalDevicePaths=. Therefore, when the application resource group fails over or is switched over, the associated device group is switched over.
For more information about these extension properties, see the SUNW.HAStoragePlus(5) man page.
Add a logical hostname resource to the application resource group.
nodeA# /usr/cluster/bin/scrgadm -a -L -j lhost-nfsrg-prim -g nfs-rg \ -l lhost-nfsrg-prim |
Where lhost-nfsrg-prim is the logical hostname of the application resource group on the primary cluster.
Enable the resources, manage the application resource group, and bring the application resource group online.
Bring the HAStoragePlus resource for the NFS application online.
nodeA# /usr/cluster/bin/scrgadm -a -g nfs-rg \ -j nfs-rs -t SUNW.nfs -y Resource_dependencies=nfs-dg-rs |
Bring the application resource group online on nodeA .
nodeA# /usr/cluster/bin/scswitch -Z -g nfs-rg nodeA# /usr/cluster/bin/scswitch -z -g nfs-rg -h nodeA |
Verify that the application resource group is online.
nodeA# /usr/cluster/bin/scstat -g |
Examine the resource group state field to determine whether the application resource group is online for nodeA and nodeB.
Create the application group resource as described in Step 1 through Step 6 of How to Create an Application Resource Group on the Primary Cluster, with the following exceptions:
Replace nodeA with nodeC.
Ignore references to nodeB.
Replace references to lhost-nfsrg-prim with lhost-nfsrg-sec.
Ensure that the application resource group does not come online on nodeC.
nodeC# /usr/cluster/bin/scswitch -n -j nfs-rs nodeC# /usr/cluster/bin/scswitch -n -j nfs-dg-rs nodeC# /usr/cluster/bin/scswitch -n -j lhost-nfsrg-sec nodeC# /usr/cluster/bin/scswitch -z -g nfs-rg -h "" |
The resource group remains offline after a reboot, because Auto_start_on_new_cluster=False.
If the global volume is mounted on the primary cluster, unmount the global volume from the secondary cluster.
nodeC# umount /global/mountpoint |
If the volume is mounted on a secondary cluster, the synchronization fails.