rmrel

Name

rmrel - Removes a managed relationship between resources.

Synopsis

rmrel [-h] [-i] -s "selection_string" [-T] [-V]

rmrel [-h] [-i] -S Source_Class[:Resource_name[:Node]] [-s "Source_string"] [-G Target_Class[:Resource_name[:Node][,Target_class[:Resource_name[:Node][,. ...]]]]][-g "Target__string"] [-P Current_relationship] [-O Current_condition] [-T] [-V]

rmrel [-h] [-i] [-T] [-V] Managed_Relation [Managed_Relation ...]

Description

The rmrel command removes a relationship between resources. The relationship to be removed is determined by the source parameter (Source_class [:Resource_name [:Node]]) or by the selection string when it is applied to the relationship itself or the name(s) of the managed relationship(s).

Options

-O Current_condition
Specifies the condition value to query all defined relationships, in order to find a match. The value can be the numeric value or the word (not case-sensitive):
  • 0x0000 or NoCondition
  • 0x0001 or IfOnline
  • 0x0002 or IfOffline
  • 0x0003 or IfNotOnline
  • 0x0004 or IfNotOffline
  • 0x0005 or IfPossible
-g Target_string
The Target_string is applied to all resources of the resource class specified by the -G option, to determine the targets of the relationship.

If the -g option is used to specify a target selection string, Resource_name and Node must not be specified for the -G option.

-G Target_class[:Resource_name[:Node]]

Specifies the target resource to be used with the target query, and any other specified query, to find a match from all defined relationships. A target resource is identified by the class of the resource (Target_class), the name of the resource ( Resource_name), and optionally the node (Node) on which the resource is located. The Resource_class, Resource_name and Node must be separated by a colon. Multiple target resources can be specified and are separated by a comma. The colons are required, but if the Target_class is omitted, the previously-specified class will be used when specifying multiple target resources.

If the -g option is used to specify a target selection string, Resource_name and Node must not be specified for the -G option.

-h
Writes the command's usage statement to standard output.
-i
Interactive. Prompt before removing relationships.
-P Current_relationship
Specifies the managed relationship value used to query all the defined relationships to find a match. The value can be a numeric value or the word (not case-sensitive):
0x0001 or Collocated
Specifies that the source and the target resources are to be located on the same node.
0x0002 or AntiCollocated
Specifies that the source and the target resources are to be located on different nodes.
0x0003 or Affinity
Specifies that the source resource and its specified affinity resource are to be located on the same node, if possible.
0x0004 or AntiAffinity
Specifies that the source resource and its specified affinity resource are to be located on different nodes, if possible.
0x0005 or IsStartable
Specifies that the source and its target resources are startable.
0x0006 or StartAfter
Specifies that the source is to be started after the target resources.
0x0007 or DependsOn
Specifies that the target resources must be online before the source resource is started and includes an implicit collocation between the source and target resources.
0x0008 or DependsOnAny
Specifies that the target must be online before the source resource is started. It is identical to the DependsOn relationship except that it does not provide the collocated constraint for the start sequence. Therefore the source and target resources may not be started on the same node.
0x0009 or StopAfter
Specifies that the source resource may not be stopped until after the target resource has been brought offline.
0x000A or ForcedDownBy
Specifies that the source resource must be forced offline in the event that either the target resource goes offline unexpectedly or the target resource itself is forced offline.
-s "selection_string"
Specifies the selection string. If the -s option is specified without the -S option, the selection string associated with it will be applied to all managed relationships of resources. The selection string must be enclosed within either 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 Source_string

Specifies the source selection string. The Source_string is applied to all resources of the resource class specified by the -S option to determine the source of the relationship. The result of the selection may contain one or more resources.

If the -s option is used to specify a source selection string, Resource_name and Node must not be specified for the -S option.

-S Source_class[:Resource_name[:Node]]

Specifies the source resource of the query. This source resource, with any other query that may be specified, will be queried against all defined relationship to find a match. A source resource is identified by the class of the resource (Source_class), the name of the resource (Resource_name), and optionally the node (Node) on which the resource is located. The Resource_class, Resource_Name and Node must be separated by a colon.

If the -s option is used to specify a source selection string, Resource_name and Node must not be specified for the -S option.

-T
Writes the command's trace messages to standard error. For your software-service organization's use only.
-V
Writes the command's verbose messages to standard output.

Parameters

Managed_Relation
Name of the managed relationship to be removed. Multiple relationships can be specified on the command line, but have to be separated by spaces.

Exit Status

0
Command has run 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 remove a relationship for a resource tester that belongs to resource class IBM.Application, enter:
    rmrel -S IBM.Application:tester
  2. To remove the relationship of a resource by using a selection string, enter:
    rmrel -s 'Name == "tester"' 
  3. To remove a relationship for a source resource resA from a selection string applied to the class IBM.Application, enter:
    rmrel -s 'Name=="resA"'-S IBM.Application
  4. To remove all relationship for source resources from class IBM.Application:
    rmrel -s 'Name like "%"' -S IBM.Application
  5. To remove relationship for resources with targets from class IBM.Application with a collocated relationship and a specific condition, enter:
    rmrel -S IBM.Application:narten -G IBM.Application:ha,:test -P collocated -O 1
  6. To remove relationships named narten and resA, enter:
    rmrel narten resA

Files

/usr/sbin/rsct/bin/rmrel
Location of the rmrel command.

See Also

The addrgmbr, chequ, chrel, chrg, chrgmbr, lsrg, mkequ, mkrel, mkrg, rmequ, rmrg, rmrgmbr commands.

The rmccli General Information file.