Sun Cluster Data Services Planning and Administration Guide for Solaris OS

Replicating and Upgrading Configuration Data for Resource Groups, Resource Types, and Resources

If you require identical resource configuration data on two clusters, you can replicate the data to the second cluster to save the laborious task of setting it up again. Use scsnapshot to propagate the resource configuration information from one cluster to another cluster. To save effort, ensure that your resource-related configuration is stable and you do not need to make any major changes to the resource configuration, before copying the information to a second cluster.

Configuration data for resource groups, resource types, and resources can be retrieved from the Cluster Configuration Repository (CCR) and formatted as a shell script. The script can be used to perform the following tasks:

The scsnapshot tool retrieves configuration data that is stored in the CCR. Other configuration data are ignored. The scsnapshot tool ignores the dynamic state of different resource groups, resource types, and resources.

ProcedureHow to Replicate Configuration Data on a Cluster Without Configured Resource Groups, Resource Types, and Resources

This procedure replicates configuration data on a cluster that does not have configured resource groups, resource types, and resources. In this procedure, a copy of the configuration data is taken from one cluster and used to generate the configuration data on another cluster.

  1. Using the system administrator role, log in to any node in the cluster from which you want to copy the configuration data.

    For example, node1.

    The system administrator role gives you the following role-based access control (RBAC) rights:

    • solaris.cluster.resource.read

    • solaris.cluster.resource.modify

  2. Retrieve the configuration data from the cluster.


    node1 % scsnapshot -s scriptfile
    

    The scsnapshot tool generates a script called scriptfile. For more information about using the scsnapshot tool, see the scsnapshot(1M) man page.

  3. Edit the script to adapt it to the specific features of the cluster where you want to replicate the configuration data.

    For example, you might have to change the IP addresses and host names that are listed in the script.

  4. Launch the script from any node in the cluster where you want to replicate the configuration data.

    The script compares the characteristics of the local cluster to the cluster where the script was generated. If the characteristics are not the same, the script writes an error and ends. A message asks whether you want to rerun the script, using the -f option. The -f option forces the script to run, despite any difference in characteristics. If you use the -f option, ensure that you do not create inconsistencies in your cluster.

    The script verifies that the Sun Cluster resource type exists on the local cluster. If the resource type does not exist on the local cluster, the script writes an error and ends. A message asks whether you want to install the missing resource type before running the script again.

ProcedureHow to Upgrade Configuration Data on a Cluster With Configured Resource Groups, Resource Types, and Resources

This procedure upgrades configuration data on a cluster that already has configured resource groups, resource types, and resources. This procedure can also be used to generate a configuration template for resource groups, resource types, and resources.

In this procedure, the configuration data on cluster1 is upgraded to match the configuration data on cluster2.

  1. Using the system administrator role, log on to any node in cluster1.

    For example, node1.

    The system administrator role gives you the following RBAC rights:

    • solaris.cluster.resource.read

    • solaris.cluster.resource.modify

  2. Retrieve the configuration data from the cluster by using the image file option of the scsnapshot tool:


    node1% scsnapshot -s scriptfile1 -o imagefile1
    

    When run on node1, the scsnapshot tool generates a script that is called scriptfile1. The script stores configuration data for the resource groups, resource types, and resources in an image file that is called imagefile1. For more information about using the scsnapshot tool, see the scsnapshot(1M) man page.

  3. Repeat Step 1 through Step 2 on a node in cluster2:


    node2 % scsnapshot -s scriptfile2 -o imagefile2
    
  4. On node1, generate a script to upgrade the configuration data on cluster1 with configuration data from cluster2:


    node1 % scsnapshot -s scriptfile3 imagefile1 imagefile2
    

    This step uses the image files that you generated in Step 2 and Step 3, and generates a new script that is called scriptfile3.

  5. Edit the script that you generated in Step 4 to adapt it to the specific features of the cluster1, and to remove data specific to cluster2.

  6. From node1, launch the script to upgrade the configuration data.

    The script compares the characteristics of the local cluster to the cluster where the script was generated. If the characteristics are not the same, the script writes an error and ends. A message asks whether you want to rerun the script, using the -f option. The -f option forces the script to run, despite any difference in characteristics. If you use the -f option, ensure that you do not create inconsistencies in your cluster.

    The script verifies that the Sun Cluster resource type exists on the local cluster. If the resource type does not exist on the local cluster, the script writes an error and ends. A message asks whether you want to install the missing resource type before running the script again.