mkequ

Name

mkequ - Makes a resource equivalency.

Synopsis

mkequ [-h] -f data_input_file [-T] [-V]

mkequ [-h] [-p A[,NoFailure | NoControl] | O[,Failback | NoFailure | NoControl]] [-m Minimum_Necessary] [-T] [-V] -S "Static_select_string" Equivalency Resource_class

mkequ [-h] [-p A[,NoFailure | NoControl]] [-m Minimum_Necessary] [-T] [-V] -D "Dynamic_select_string" Equivalency Resource_class

mkequ [-h] [-p A[,NoFailure | NoControl] | O[,Failback | NoFailure | NoControl]] [-m Minimum_Necessary] [-T] [-V] Equivalency Resource_class:Resource_name[:Node][,Resource_name[:Node][,...]]

Description

The mkequ command makes a resource equivalency among the specified resources. The resources must all be from the same resource class.

Equivalencies and their attribute flags can be specified on the command line as the syntax indicates or from a file when the -f option is specified. The value must be of the same data type that is defined for this resource attribute. Use the lsrsrcdef command to verify the data type and attribute field for each attribute.

Explicit specification of resource names without selection string is not supported for IPv6–enabled IBM.NetworkInterface equivalency members.

Options

-D "dynamic_select_string"
Dynamic Selection String. The specified selection string is saved as the SelectString attribute for the concerned equivalency. This selection_string is then applied to all resources of the specified resource class by the Recovery Manager, to dynamically determine what members are to be included in the specified equivalency. This option cannot be combined with the Resource_name [:Node] parameter. The selection string must be enclosed within double or single quotation marks. If the selection string contains double quotation marks, enclose the entire selection string in single quotation marks. For example:
-D 'Name == "testing"'
-D 'Name ?= "test"'

The -D option cannot be combined with the -S option or with an ORDERED SelectFromPolicy (-p O).

-f data-input_file
Specifies the name of the file that contains equivalency attribute information.
-h
Writes the command's usage statement to standard output.
-p A | O [,Failback | NoFailure | NoControl]
Specifies the equivalency select-from policy. The value can be:
A
Any, which is the default value.
O
Ordered. The value cannot be used together with the -D option.
Optional (comma-separated) values:
ANY
The member selection has no specific order, which is the default value, that is not displayed if it is the only option.
ORDERED
The member selection starts at the beginning.
Failback
The resources are always started on the first member, if it is available. Only in combination with ORDERED.
NoFailure
The OpState of resources that have a dependency against the equivalency is not forced to Failed Offline, if they cannot be started within the specified timeout interval.
NoControl
System Automation does not start or stop the members of the equivalency but react only to changes of the OpState of these resources.
-S "static_select_string"
Static Selection String. The specified selection string applies to the specified resource class, to determine the resources that make up the equivalency. These resources are saved as the MemberShip attribute for the equivalency. This option cannot be combined with the Resource_name [:Node] parameter. The selection string must be enclosed within double or single quotation marks. If the selection string contains double quotation marks, enclose the entire selection string in single quotation marks. For example:
-S 'Name == "testing"' 
-S 'Name ?= "test"'
-S cannot be combined with -D.
-m Minimum-Necessary
Minimum Necessary Equivalency. Specifies the minimum necessary members to make an equivalency valid. The default value is 1.
-T
Writes the trace messages of the command to standard error. For your software service organization's use only.
-V
Writes the verbose messages of the command to standard error.

Parameters

Equivalency
Specifies the unique name of the new equivalency to be created. Equivalency names cannot contain the Dollar symbol ($).
Resource_class:Resource_name[:Node]

Specifies one or more resources that are members of the equivalency. All of the resources must be from the same resource class. An equivalency resource is identified by the resource name (Resource_name), and, optionally, the node (Node) where the resource is located.

Resource names cannot contain the Dollar symbol ($). Resource_name and Node must be separated by colons. Multiple resources can be specified and are separated by a comma. Resource_class is the name of the resource class the equivalency resource belongs to. The first resource or Resource_name[:Node] must be preceded by the Resource_class it belongs to and it must be separated by the colon (:) delimiter.

Since all resources must be from the same class, the Resource_class is to be specified only once as the syntax indicates.

This syntax is not supported for IPv6–enabled IBM.NetworkInterface equivalency members: use selection string syntax instead.

Exit Status

0
The command ran successfully.
1
Error occurred with RMC.
2
Error occurred with CLI script.
3
Incorrect flag on command line.
4
Incorrect parameter on command line.
5
Error occurred with RMC that was based on faulty command line input.
6
Resource specified was not found.
7
Resource already exists.

Security

This command requires root authority, or a user ID with appropriate permissions. For more information, see Setting up non-root user Ids for the command line interface.

Examples

  1. To create an equivalency, use the data input file:
    1. To generate a template to aid in the defining of these resources in a file, enter:
      lsrsrcdef -i IBM.Equivalency >& /tmp/Equ.rdef
    2. Edit the file /tmp/Equ.rdef with your preferred text editor: (Enter values for all of the attributes, substituting an appropriate value for the type, or leave it blank if you want the default value.)
    3. Run the mkequ command with the file as follows:
      mkequ -f /tmp/Equ.rdef

    Sample Data Input file for mkequ:

    You can enter values for all of the attributes and change the value shown, or remove the line with the attribute if you want the default value.

    PersistentResourceAttributes::
    resource 1:
     Name = "Equiv"
     MemberClass = "IBM.NetworkInterface"
     Membership = "{'eth0:node-name','eth0:node-name'}"
    resource 2: 
     Name = "Equiv2"
     MemberClass = "IBM.Application"
     Membership = "{'App1:node-name','App2:node-name','App3:node-name'}"
     SelectFromPolicy = "Any" 
     MinimumNecessary = 2 
    resource 3: 
     Name = "Equiv3" 
     MemberClass = "IBM.Test" 
     SelectString = "Name ?='Test'" 
     SelectFromPolicy = "Any" 
     MinimumNecessary = 1
  2. To make an equivalency that is called resA with all the members of the resource class IBM.Application, enter:
    mkequ -S 'Name like "%"' resA IBM.Application
  3. To make an equivalency that is called resA with selected members testerA, testerB, and testerC of the resource class IBM.Application, and set its policy to ordered, enter:
    mkequ -p O resA IBM.Application:testerA:node-name,testerB:node-name,testerC:node-name
    Node name needs to be indicated because all resources for making the equivalency must be fixed.
  4. To make an equivalency that is called testerB with selected members of the resource class IBM.Application by using a static select string, enter:
    mkequ -S "ResourceType==0" testerB IBM.Application 
  5. To make an equivalency that is called Jfoo with selected members of the resource class IBM.Application by using a dynamic select string, enter:
    mkequ -D "ResourceType==0" Jfoo IBM.Application
  6. To make an equivalency that is called netequ with selected members eth0 from nodes node1 and node2 of resource class IBM.NetworkInterface, and to set its policy to Ordered and Failback, enter:
    mkequ -p O,Failback netequ IBM.NetworkInterface:eth0:node1,eth0:node2 

Files

/usr/sbin/rsct/bin/mkequ
Location of the mkequ command.
data_input_file
See the examples, and see the man page for Resource_Data_Input file.

See Also

The chequ, chrgmbr, lsequ, mkrel, rmequ commands.

The rmccli general information file.

The Resource_Data_Input file.