mkrg
Name
mkrg - Makes one or more new resource groups.
Synopsis
mkrg [-h] -f data_input_file [-T] [-V]
mkrg [-h] [-l relationship] [-n node_name | -e equiv_name] [-p priority] [-N Owner] [-D Description] [-I InfoLink] [-T] [-V] [-x node1, ...noden] Resource_group [...]
Description
- Where the resource group is allowed to run.
- Relative importance of resource group to other resource groups.
- Location relationship among the member resources of the resource group.
To allow System Automation for Multiplatforms to monitor and control the resource groups, the resource group must be in Online State or condition. See the chrg command to set this or any other option on an existing resource group.
The resource group and its attribute option can be specified on the command line as the syntax indicates, or from a file when the -f option is used. The value must be the same data type that is defined for this resource attribute. Use the lsrsrcdef RMC command to verify the data type and attribute field for each attribute.
Options
- -e equiv_name
- Specifies the equivalency name of the nodes on which the Resource_group can run. This option cannot be combined with the -n option. The default value is ALL, which implies an equivalency of all nodes in the cluster.
- -f data_input_file
- Name of the file, which contains resource group attribute information.
- -h
- Writes the command's usage statement to standard output.
- -l relationship
- Specifies the location relationship among the members of the resource
group. The location relationship value can be:
- 0x0000 or None
- Specifies that member resources of the resource group can be on any node.
- 0x0001 or Collocated
- Specifies that member resources of the resource group are on the same node.
- -n node_name
- Specifies the node on which the Resource_group can run. This option cannot be combined with the -e option. The default value is ALL, which implies all nodes in the cluster.
- -p priority
- Specifies the relative importance of this resource group that is compared to other resource groups. Priority can be any integer from 0 - 200: the higher the integer, the higher the priority. The default priority value is 0.
- -N Owner
- A string with the name of the owner or contact for the group.
- -D Description
- A string describing the purpose of the group.
- -I InfoLink
- A string that contains the URL of an HTML page, which shows additional information about the resource group.
- -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.
- -x node1, ...noden
- Specifies the excluded node list.
Parameters
- Resource_group
- The unique name of the new resource groups to be created. Resource group names cannot contain the Dollar symbol ($).
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 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
- To create resource groups by using the data input file, proceed as follows:
- To generate a template to aid in the defining of these resources in a file, enter:
lsrsrcdef -i IBM.ResourceGroup >& /tmp/RG.rdef
- Edit the file /tmp/RG.rdef with your preferred text editor: Enter values for all of the attributes, substituting the appropriate value for the type, or remove the line with the attribute if you want the default value.
- Run the mkrg command with the file as follows:
mkrg -f /tmp/RG.rdef
Sample Data Input file for mkrg: You can enter values for all of the attributes and thus change the value that is shown in the example, or remove the line with the attribute if you want the default value.PersistentResourceAttributes:: resource 1: Name = "GR1" MemberLocation = "collocated" Priority = "32" resource 2: Name = "GR2" MemberLocation = "none" NominalState = "offline" AllowedNode = "node-name1" resource 3: Name = "GR3" MemberLocation = "none" Priority = "2" NominalState = "offline" Description = "Resource group for managing of apache server"
- To generate a template to aid in the defining of these resources in a file, enter:
- To define a new resource group that is called
resA
with all default values, enter:mkrg resA
- To define new resource groups that are called
resA
andresB
with location relationship "none", and allowed node name "cluster1", enter:mkrg -l none -n cluster1 resA resB
- To define a new resource group that is called
resA
with location relationship "Collocated", priority value of 22, and allowed equivalency name "cluster1", enter:mkrg -l collocated -e cluster1 -p 22 resA
Files
- /usr/sbin/rsct/bin/mkrg
- Location of the mkrg command.
- data_input_file
See Also
The addrgmbr, samctrl, chrg, chrgmbr, lsrg, rmrg, rmrgmbr commands.
The Resource_Data_Input file.
The rmccli general information file.