rmrg

Name

rmrg - Removes one or more already-defined resource groups.

Synopsis

rmrg [-h] [-i] -s " selection_string" [-T] [-V] [Resource_group ...]

rmrg [-h] [-i] [-T] [-V] Resource_group [...]

Description

The rmrg command removes one or more resource groups specified by the Resource_group parameter, or that match the specified selection string. The member resources associated with the removed resource groups, are also removed by System Automation for Multiplatforms. If any member of the resource groups to be deleted are part of a managed relationship between resources, the managed relationships are also removed by System Automation for Multiplatforms. The resource group must already exist for it to be removed. If the resource group to be removed is still online, the resource group is not removed.

This implies that all resource groups that are nested within the resource group to be removed are also removed recursively. If you want to prevent contained resource groups from being deleted recursively, proceed as follows:
  1. Remove these resource groups as members from the resource group to be removed using the rmrgmbr command.
  2. Remove the containing resource group.

When the -h option is specified, this command's usage statement is written to standard output. All verbose messages are also written to standard output.

All trace messages are written to standard error.

Parameters

Resource_group
The name of the defined resource group to be removed. Multiple resource groups can be specified but must be separated by spaces.

Options

-h
Writes the command's usage statement to standard output.
-i
Interactive. Prompt before removing relationships.
-s "selection_string"
Specifies the selection string. If the Resource_group parameters are not specified, the selection string will be applied to all existing resource groups. 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 'Name like "%"' (For all resources)
-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.

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.

Security

This command requires root authority, or a user ID with appropriate permissions. (For more information, see , section "Setting up non-root security".)

Examples

  1. To remove a resource group called resA, enter:
    rmrg resA
  2. To remove resource groups called resA, resB, and
    resC
    , enter:
    rmrg resA resB resC
  3. To prompt before removing resource groups called resA and resB, enter:
    rmrg -i resA resB
  4. To remove a resource group called resA using a select string, enter:
    rmrg -s 'Name=="resA"'
  5. To remove all resource groups containing the word resA as part of its name, enter:
    rmrg -s 'Name ?="resA"'

Files

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

See Also

The addrgmbr, samctrl, chrg, chrgmbr, lsrg, mkrg, rmrgmbr commands.

The rmccli General Information file.