Configuring user-defined resources

PowerHA® SystemMirror® allows you to configure user-defined resource instances for an already configured user-defined resource type.

User-defined resource configuration does the following:
  • Creates an instance of the chosen resource type with default attribute values.
  • All resource type management scripts/methods can access the attributes associated with the user-defined resource by using the cludres -q command.
  • A method is called in a specific format, for example, if the start method is /opt/udrmethods/start_resource.sh, then the format to call the method is /opt/udrmethods/start_resource.sh <resourcename>.
  • If a monitor method is specified in the user-defined resource type configuration, a custom resource monitor is added for the current resource with a name in the format of cludrm_<RESOURCENAME>. The custom monitor is added with the following default values for monitor attributes, which you can change by using the Change/Show User Defined Resource Monitor option in SMIT:
    • INVOCATION = longrunning
    • MONITOR_INTERVAL = 60
    • HUNG_MONITOR_SIGNAL = 9
    • STABILIZATION_INTERVAL = 15
    • RESTART_COUNT = 3
    • FAILURE_ACTION = fallover
    • RESTART_INTERVAL = 15
    • MONITOR_METHOD = monitor method defined in resource type configuration
    • CLEANUP_METHOD = cleanup method defined in resource type configuration, otherwise, this is the stop script
    • FAILURE_NOTIFY_METHOD = failure notification method defined in resource type configuration
    • RESTART_METHOD = restart method defined in resource type configuration otherwise start method
  • Enables the ability to add the user defined resource type to the resource group in the User defined resources field of the resource group.

To configure a user-defined resource, complete these steps:

  1. From the command line, enter smit sysmirror
  2. In SMIT, select Custom Cluster Configuration > Resources > Configure User Defined Resources and Types > Add a User Defined Resource, and press Enter.
  3. SMIT displays the Select User Defined Resource type panel, which lists all user-defined resource types.
    Note: If you have not previously configured a resource type, none are listed and you cannot complete this task.
  4. SMIT displays the Add a User Defined Resource panel. Enter the field values as follows:
    Table 1. Add a User Defined Resource fields
    Field Value
    Resource Type Name Displays the name of the selected user-defined resource type.
    Resource Name Enter an ASCII text string that identifies the resource. You use this name to refer to the resource when you define resources during node configuration. The resource name can include alphanumeric characters and underscores. You can enter maximum of 64 characters.
    Note: The resource name must be unique across the cluster. When you define a volume group as a user-defined resource for a Peer-to-Peer Remote Copy (PPRC) configuration or a HyperSwap® configuration, the resource name must match the volume group.
    Attribute Data Specify a list of attributes and values in the form of attribute=value, with each pair separated by a space; for example, Rattr1="value1" Rattr2="value2" Oattr1="value3".
  5. Press Enter to add this information to the PowerHA SystemMirror Configuration Database on the local node. Return to previous PowerHA SystemMirror SMIT panels to perform other configuration tasks.
    Note: You can also import user-defined resource configuration from an xml file by using the Import User Defined Resource Types and Resources Definition from XML File option in SMIT. Before using this option, you must first create an xml file with all necessary information. You can do this by using a the /usr/es/sbin/cluster/etc/udrt_sample.xml as a template.