The instructions that follow explain how to use the clresource command to perform this task. However, you are not restricted to using the clresource command for this task. Instead of the clresource command, you can use Oracle Solaris Cluster Manager or the Resource Group option of the clsetup command to perform this task. See clsetup(8CL) for more information.
Before You Begin
Consult the instructions for upgrading the resource type to determine when you can migrate resources to a new version of the resource type.
Any time
Only when the resource is unmonitored
Only when the resource is offline
Only when the resource is disabled
Only when the resource group is unmanaged
The instructions might state that you cannot upgrade your existing version of the resource. If you cannot migrate the resource, consider the following alternatives:
Deleting the resource and replacing it with a new resource of the upgraded version
Leaving the resource at the old version of the resource type
# clresource unmonitor resource
# clresource disable resource
# clresource disable resource
# clresource disable -g resource-group + # clresourcegroup offline resource-group # clresourcegroup unmanage resource-group
The replaceable items in these commands are as follows:
Specifies the resource group that is to be unmanaged
If necessary, set other properties of the same resource to appropriate values in the same command. To set these properties, specify the –p option in the command.
To determine whether you are required to set other properties, consult the instructions for upgrading the resource type. You might be required to set other properties for the following reasons:
An extension property has been introduced in the new version of the resource type.
The default value of an existing property has been changed in the new version of the resource type.
# clresource set -p Type_version=new-version \ [-p extension-property=new-value] [-p standard-property=new-value] resource
# clresource monitor resource
# clresource enable resource
# clresource enable resource
# clresource enable -g resource-group + # clresourcegroup manage resource-group # clresourcegroup online resource-group
This example shows the migration of a resource that can be migrated only when the resource is offline. The new resource type package contains methods that are located in new paths. Because the methods are not overwritten during the installation, the resource does not need to be disabled until after the upgraded resource type is installed.
The characteristics of the resource in this example are as follows:
The new resource type version is 2.0.
The resource name is myresource.
The resource type name is myrt.
The new RTR file is in /opt/XYZmyrt/etc/XYZ.myrt.
No dependencies on the resource that is to be migrated exist.
The resource that is to be migrated can be taken offline while leaving the containing resource group online.
This example assumes that the upgrade package is already installed on all cluster nodes according to the supplier's directions.
# clresourcetype register -f /opt/XYZmyrt/etc/XYZ.myrt myrt # clresource disable myresource # clresource set -p Type_version=2.0 myresource # clresource enable myresourceExample 6 Migrating a Resource That Can Be Migrated Only When Unmonitored
This example shows the migration of a resource that can be migrated only when the resource is unmonitored. The new resource type package contains only the monitor and RTR file. Because the monitor is overwritten during installation, monitoring of the resource must be disabled before the upgrade package is installed.
The characteristics of the resource in this example are as follows:
The new resource type version is 2.0.
The resource name is myresource.
The resource type name is myrt.
The new RTR file is in /opt/XYZmyrt/etc/XYZ.myrt.
The following operations are performed in this example.
Before the upgrade package is installed, the following command is run to disable monitoring of the resource:
# clresource unmonitor myresource
The upgrade package is installed on all cluster nodes according to the supplier's directions.
To register the new version of the resource type, the following command is run:
# clresourcetype register -f /opt/XYZmyrt/etc/XYZ.myrt myrt
To change the Type_version property to the new version, the following command is run:
# clresource set -p Type_version=2.0 myresource
To enable monitoring of the resource after its migration, the following command is run:
# clresource monitor myresource