Sun Cluster 3.1 10/03 Data Services Developer's Guide

Upgrading and Downgrading a Resource Type

The section “Upgrading a Resource Type” in Sun Cluster 3.1 Data Service Planning and Administration Guide contains additional information about upgrading or migrating a resource type.

How to Upgrade a Resource Type
  1. Read the upgrade documentation for the new resource type to find out the resource type changes and resource tunability constraints.

  2. Install the resource type upgrade package on all cluster nodes.

    The recommended practice for installing new resource type packages is in a rolling upgrade fashion: the pkgadd occurs while the node is booted in non-cluster mode.

    There are scenarios in which it would be possible to install new resource type packages on a node in cluster mode:

    • If resource type package installation leaves the method code unchanged and only updates the monitor, then it is necessary to stop monitoring on all resources of that type during the installation.

    • If resource type package installation leaves both the method and monitor code unchanged then it is not necessary to stop monitoring on the resource during the installation, because the installation is only putting a new RTR file on the disk.

  3. Register the new resource type version using the scrgadm (or equivalent) command, referencing the RTR file of the upgrade.

    The RGM creates a new resource type whose name is of the form


    vendor_id.resource_type:version
  4. If the resource type upgrade is installed on only a subset of the nodes, you must set the Installed_nodes property of the new resource type to the nodes on which it is actually installed.

    When a resource takes on the new type (either by being newly created or updated), the RGM requires that the resource group nodelist be a subset of the Installed_nodes list of the resource type.


    scrgadm -c -t resource_type -h installed_node_list
    
  5. For each resource of the preupgraded type that is to be migrated to the upgraded type, invoke scswitch to change the state of the resource or its resource group to the appropriate state as dictated by the upgrade documentation.

  6. For each resource of the preupgraded type that is to be migrated to the upgraded type, edit the resource, changing its Type_version property to the new version.


    scrgadm -c -j resource -y Type_version=new_version
    

    If necessary, edit other properties of the same resource to appropriate values in the same command.

  7. Restore the previous state of the resource or resource group by reversing the command invoked in Step 5.

How to Downgrade a Resource to an Older Version of Its Resource Type

You can downgrade a resource to an older version of its resource type. The conditions under which you can downgrade a resource to an older version of the resource type are more restrictive than when you upgrade to a newer version of the resource type. You must first unmanage the resource group. In addition, you can only downgrade a resource to an upgrade-enabled version of the resource type. You can identify upgrade-enabled versions by using the scrgadm -p command. In the output, upgrade-enabled versions contain the suffix :version.

  1. Switch the resource group that contains the resource you want to downgrade offline.


    scswitch -F -g resource_group
    
  2. Disable the resource that you want to downgrade and all resources in the resource group.


    scswitch -n -j resource_to_downgrade
    scswitch -n -j resource1
    scswitch -n -j resource2
    scswitch -n -j resource3
    ...


    Note –

    Disable resources in order of dependency, starting with the most dependent (application resources) and ending with the least dependent (network address resources).


  3. Unmanage the resource group.


    scswitch -u -g resource_group
    
  4. Is the old version of the resource type to which you want to downgrade still registered in the cluster?

    • If yes, go to the next step.

    • If no, re-register the old version that you want.


      scrgadm -a -t resource_type_name
      

  5. Downgrade the resource by specifying the old version that you want for Type_version.


    scrgadm -c -j resource_to_downgrade -y Type_version=old_version
    

    If necessary, edit other properties of the same resource to appropriate values in the same command.

  6. Bring the resource group that contains the resource that you downgraded to a managed state, enable all the resources, and switch the group online.


    scswitch -Z -g resource_group