Use the following procedure to create a resource group using the Cluster Manager CLI:
Determine the list of resources that belong to the resource group you are defining. The list of resources that belong to a resource group are the resources that move from one node to another as one unit.
A resource group that provides NFS services would contain a resource of each of the following types:
IP_address
volume
filesystem
NFS
All resource and resource type dependencies of resources in a resource group must be satisfied. For example, the NFS resource type depends on the filesystem resource type, so a resource group containing a resource of NFS resource type should also contain a resource of filesystem resource type.
Determine the failover policy to be used by the resource group.
Use the template cluster_mgr script available in the /usr/lib/failsafe/cmgr-templates/cmgr-create-resource_group file.
This example shows a script that creates a resource group with the following characteristics:
The resource group is named nfs-group
The resource group is in cluster HA-cluster
The resource group uses the failover policy
the resource group contains IP_Address, volume, filesystem, and NFS resources
The following script can be used to create this resource group:
define resource_group nfs-group in cluster HA-cluster set failover_policy to n1_n2_ordered add resource 192.0.2.34 of resource_type IP_address add resource havol1 of resource_type volume add resource /hafs1 of resource_type filesystem add resource /hafs1 of resource_type NFS done |
Run this script using the -f option of the cluster_mgr command.