| |
NAME
| | scrgadm - manage registration and unregistration of resource types, resource
groups, and resources |
| |
Show Current Configuration
| | scrgadm -p[v[v]] [-t resource_type_name] [-g resource_group_name] [-j resource_name] |
Resource Type Commands
| | scrgadm -a -t resource_type_name [-h RT_installed_node_list] [-f registration_file_path] |
| | scrgadm -c -t resource_type_name -h RT_installed_node_list |
| | scrgadm -r -t resource_type_name |
Resource Group Commands
| | scrgadm -a -g RG_name [-h nodelist] [-y property [...]] |
| | scrgadm -c -g RG_name [-h nodelist] -y property [-y property [...]] |
Resource Commands
| | scrgadm -a -j resource_name -t resource_type_name -g RG_name [-y property [...]] [-x extension_property [...]] |
| | scrgadm -c -j resource_name [-y property [...]] [-x extension_property [...]] |
| | scrgadm -r -j resource_name |
Logical Host Name Resource Commands
| | scrgadm -a -L -g RG_name [-j resource_name] -l hostnamelist [-n netiflist] [-y property [...]] |
Shared Address Resource Commands
| | scrgadm -a -S -g RG_name -l hostnamelist [-j resource_name] [-n netiflist] [-X auxnodelist] [-y property [...]] |
|
| |
A resource type specifies common properties and callback methods for
all resources of that type. Before you can create a resource of a particular
type, you must first register the resource type using the following form of
the command:
| |
# scrgadm -a -t resource_type_name
|
A resource group contains a set of resources, all of which are brought
online or offline together on a given node or set of nodes. You first create
an empty resource group before placing any resources in it. To create a resource
group, use the command:
There are two types of resource groups: failover and scalable.
A failover resource group is online on only one node at a time. A failover
resource group can contain resources of any type although scalable resources
that are configured in a failover resource group run on only one node at a
time.
To create a failover resource group named MyDatabaseRG,
use:
| |
# scrgadm -a -g MyDatabaseRG
|
A scalable resource group can be online on several nodes at once. A
scalable resource group can contain only resources that support scaling and
cannot contain resources that are constrained, by their resource type definition,
to only failover behavior.
To create a scalable resource group named MyWebServerRG,
use:
| |
# scrgadm -a -g MyWebServerRG \\
-y Maximum_primaries=integer \\
-y Desired_primaries=integer
|
A newly created resource group is in an UNMANAGED state. After creating
resources in the group, use the scswitch(1M)
command to put a resource group in a MANAGED state.
To create a resource of a given type in a resource group, use the command:
| |
# scrgadm -a -j resource_name -t resource_type_name -g RG_name
|
Creating a resource causes the underlying RGM mechanism to take several
actions. It calls the VALIDATE method on the resource to
verify that the property settings of the resource are valid. If the VALIDATE method completes successfully and the resource group has
been put in a MANAGED state, the RGM initializes the resource by calling the INIT method on the resource. The RGM then brings the resource online
if it is enabled and its resource group is online.
To remove a resource group, first remove all resources from that resource
group. To remove a resource, first disable it with the scswitch(1M)
command. Removing a resource causes the RGM to clean up
after the resource by calling the FINI method on that resource.
|
| |
Action Options
| |
Action options specify the actions performed by the command. Only one
action option is allowed on the command line.
The following action options are supported:
- -a
- Adds a new configuration.
Use with these options:
- -g
- Creates a resource
group.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -j
- Creates a resource.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -t
- Adds a resource
type.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -c
- Modifies an
existing configuration. Only values of the specified properties are set. Other
properties retain their current values. Use with these options:
- -g
- Modifies a resource
group.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -j
- Modifies a resource.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -t
- Modifies a resource
type.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -r
- Removes configuration.
Use with these options:
- -g
- Removes a resource
group.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -j
- Removes a resource.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -t
- Removes a resource
type.
You need solaris.cluster.resource.modify RBAC authorization
to use this command option with -a, -c, or -r. See rbac(5).
- -p
- Displays existing
configuration information. Use with these options:
- -g resource_group_name
- Displays specific resource group configuration information.
You need solaris.cluster.resource.read RBAC authorization
to use this command option with -p. See rbac(5).
- -j resource_name
- Displays specific resource configuration information.
You need solaris.cluster.resource.read RBAC authorization
to use this command option with -p. See rbac(5).
- -t resource_type_name
- Displays specific resource type configuration information.
You need solaris.cluster.resource.read RBAC authorization
to use this command option with -p. See rbac(5).
- -v[v]
- Displays more verbose output.
You need solaris.cluster.resource.read RBAC authorization
to use this command option with -p. See rbac(5).
If you do not specify any -g, -j, or -t options, information about all resource
types, resource groups, and resources currently configured on the cluster
are provided by default.
Multiple -g, -j, and -t
options are supported and can be combined with any combination of -v options.
You can use up to two -v options on a single command
line.
|
Target Options
| |
Target options identify the target object. The following target options
are supported:
- -g RG_name
- Resource group.
- -j resource_name
- Resource. When used with the -a option, the -t and -g target options must be specified in the
command to indicate the type of the resource that is to be instantiated and
the name of the containing resource group.
- -t resource_type_name
- Resource type.
|
Resource Type-Specific Options
| |
The following options are supported:
- -f registration_file_path
- Is valid with -a. It
is the path name of the resource type registration file and is required if
the file is not in the well-known directory (usually /usr/cluster/lib/rgm/rtreg).
- -h RT_installed_node_list
- Is valid with -a and -c. It is a comma-separated list of node names upon which this resource
type is installed. Resources of this type can be instantiated only in resource
groups whose nodelist is a subset of this list.
-h is optional with the -a option. If -h is not specified, it implies that the resource type has been installed
on all nodes. Doing so permits resources of this type to be instantiated in
any resource group.
-h is required with the -c option. In
this case, you must specify -h with either a new installed
node list or with an escaped wildcard character (\\*). The wildcard character
indicates that the resource type has been installed on all nodes. If you do
not specify an installed node list or the wildcard character (*), the wildcard
character is used by default.Note A comma is not allowed in a node name.
- -t resource_type_name
- Is valid with -a, -c, and -r. A resource type is defined by a resource type registration file
that specifies standard and extension property values for the resource type.
The registration file name is expected to be the same as the resource_type_name. This name is expected to be present in the
well-known directory where registration files are usually installed (/usr/cluster/lib/rgm/rtreg). Making the file name the same as the resource_type_name enables this shorthand notation:
| |
# scrgadm -a -t SUNW.rt:2.0
|
As a result, you
do not need to use the following notation:
| |
# scrgadm -a -t rtn -f full_path_to_SUNW.rt:2.0
|
To view the names of the currently registered resource types, use:
Starting in Sun Cluster 3.1, the syntax of a resource type name is as
follows:
| |
vendor_id.resource_type:version
|
The three components of the resource type name are properties specified
in the RTR file as Vendor_id, Resource_type, and RT_version. The scrgadm command inserts the period and colon delimiters. The optional Vendor_id prefix is necessary only if it is required to distinguish
between two registration files of the same name provided by different vendors.
The RT_version is used for upgrading from one version
of a data service to another version of the data service.
To ensure that the Vendor_id is unique, use
the stock symbol for the company that is creating the resource type. The resource_type_name that is used with the -t
option can either be the full resource type name or an abbreviation that omits
the Vendor_id. For example, both -t SUNW.iws and -t iws are valid.
If there are two resource types in the cluster with names that differ only
in the Vendor_id prefix, the use of the abbreviated
name will fail.
The scrgadm command fails to register the resource
if the RT_version string includes a blank, tab,
slash, backslash, asterisk, question mark, left square bracket, or right square
bracket character.
When you specify the resource_type_name with
the -t option, you can omit the version component if only
one version is registered.
Resource type names that you created before Sun Cluster 3.1 continue
to conform to the following syntax:
|
Resource Group-Specific Options
| |
The following options are supported:
- -h nodelist
- Is valid with -a and -c. This
option is a shortcut for -y Nodelist=nodelist.
- -y property
- Is valid with -a and -c. property is defined as a name=value
pair. Multiple instances of -y property
are allowed.
To set a string property to an empty value, use this option without
specifying a value, as follows:
Recognition of -y property names is case-insensitive.
See the rg_properties(5)
man page for a description of the resource group properties.
|
Resource Specific Options
| |
The following options are supported:
- -x extension_property
- Is valid with -a and -c. An extension_property is defined as name=value
pair applicable only to a given resource type. Multiple
instances of -x extension_property
are allowed.
For information on the extension properties that are available for a
particular data service, see the man page for that data service.
- -y property
- Is valid with -a and -c. property is defined as a name=value
pair. Multiple instances of -y property
are allowed.
To set a property to an empty value, use this option without specifying
a value, as follows:
Recognition of -y property names is case-insensitive.
|
Logical Host Name-Specific Options
| |
These options apply to logical host name resources. There are no special
commands for removing a LogicalHostname resource:
| |
# scrgadm -r -j resource_name
|
resource_name is the same name supplied with
the optional -j option when creating the LogicalHostname resource. If the -j option and resource_name are omitted when the LogicalHostname resource
is created, then the name is generated by scrgadm.
The following options are supported:
- -L
- Indicates that
the options that are used on the command line apply to a logical host name.
- -l hostnamelist
- Specifies the addresses to be shared. Use host names even
though dotted IP addresses may be specified. hostnamelist
is a comma-separated list of host names that are to be made available by this LogicalHostname resource. All host names in the same hostnamelist must be on the same subnet.
- -j resource_name
(not optional when using an IP address rather than a host name as the first
argument to the -l hostnamelist)
- Use this with -a to explicitly name
a LogicalHostname resource when the resource is created
and with -r to remove a resource from a resource group. If
you do not use the -j option to explicitly name the resource, scrgadm creates the resource and assigns the name of the
first host name in hostnamelist to that resource.
- -n netiflist
(optional)
-
netiflist takes
the following form:
netif may be given as network
adapter name, such as le0, or as an IP Network Multipathing
group name, such as sc_ipmp. The node
may be a node name or node identifier. All nodes in the nodelist of the resource group must be represented in netiflist. If -n netiflist
is omitted, an attempt is made to discover a net adapter on the subnet identified
by the hostnamelist for each node in the nodelist. Single adapter IP Network Multipathing groups are
created for discovered network adapters not already in an IP Network Multipathing
group. Similarly, a single adapter IP Network Multipathing group is created
for a named adapter, if a group does not already exist.
Refer to the NOTES section for more information.
- -y property
-
Refer to the "Resource Specific Options"
section for details.
|
Shared Address-Specific Options
| |
All of the LogicalHostname-specific options also
apply to SharedAddress resources with the following changes
and additions:
- -S
- Indicates that
the options that are used on the command line apply to a shared address.
- -X auxnodelist
- Is a comma-separated list of node names or identifiers. Entries
on this list must be members of the cluster. These are nodes that may host
the specified shared addresses, but never serve as the primary node in the
case of failover.
This list is mutually exclusive with nodelist.
See the description of nodelist under "Resource
Group-Specific Options."
|
|
| |
The following exit values are returned:
-
0
- The command completed successfully.
A warning message might be written to the standard error even when this
command completes successfully.
- nonzero
- An error has occurred.
Writes an error message to standard error when it exits with nonzero
status.
Some operations are not permitted on resource types whose RT_System property is TRUE. Similarly, some operations
are not permitted on a resource group (and its resources) whose RG_System property is TRUE. See rt_properties(5)
and rg_properties(5).
|
| |
See attributes(5)
for descriptions of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| Availability | SUNWcsu |
| Interface Stability | Evolving |
|
| |
A network adapter that is not already configured for use cannot be discovered
or placed into an IP Network Multipathing group during LogicalHostname and SharedAddress add operations. See ifconfig(1m).
If scrgadm exits nonzero with the error message cluster is reconfiguring, the requested operation might have completed
successfully, despite the error status. If you doubt the result, you can execute scrgadm again with the same arguments after the reconfiguration
is complete.
|
| Sun Cluster 3.1 | Go To Top | Last Changed 6 May 2003 |
| |