Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

OpenSolaris 2009.06 - man page for scrgadm (opensolaris section 1m)

scrgadm(1M)						  System Administration Commands					       scrgadm(1M)

NAME
scrgadm - manage registration and unregistration of resource types, resource groups, and resources
SYNOPSIS
scrgadm -p[v[v]] [-t resource_type_name] [-g resource_group_name] [-j resource_name] scrgadm -a -t resource_type_name [-h RT_installed_node_list] [-f registration_file_path] scrgadm -a -g RG_name [-h node-zone-list] [-y property=value...] scrgadm -a -j resource_name -t resource_type_name -g RG_name [-y property=value...] [-x "extension_property[{node_specifier}]=value..."] scrgadm -a -L -g RG_name -l hostnamelist [-j resource_name] [-n netiflist] [-y property=value...] scrgadm -a -S -g RG_name -l hostnamelist [-j resource_name] [-n netiflist] [-X auxnodelist] [-y property=value...] scrgadm -c -t resource_type_name [-h RT_installed_node_list] [-y RT_system={TRUE|FALSE}] scrgadm -c -g RG_name [-h node-zone-list] -y property=value... scrgadm -c -j resource_name [-y property...] [-x "extension_property[{node_specifier}]=value..."] scrgadm -r -t resource_type_name scrgadm -r -g RG_name scrgadm -r -j resource_name
DESCRIPTION
Note - Beginning with the Sun Cluster 3.2 release, Sun Cluster software includes an object-oriented command set. Although Sun Cluster software still supports the original command set, Sun Cluster procedural documentation uses only the object-oriented command set. For more infor- mation about the object-oriented command set, see the Intro(1CL) man page. A resource type specifies common properties and callback methods for all resources of that type. Before you can create a resource of a par- ticular 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 following command: # scrgadm -a -g RG_name 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 scal- able 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 the following command: # 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 the following command: # 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 command to put a resource group in a MANAGED state. To create a resource of a given type in a resource group, use the following 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. The underlying RGM mechanism 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 managed resource group, first remove all resources from that resource group. To remove a resource, first disable it with the scswitch command. Removing a resource causes the RGM to clean up after the resource by calling the FINI method on that resource. You can use some forms of this command in a non-global zone, referred to simply as a zone. For more information about valid uses of this command in zones, see the descriptions of the individual options. For ease of administration, use this command in the global zone.
OPTIONS
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 can use this option only in the global zone. 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 can use this option in a non-global zone if the following conditions are met: o The non-global zone exists in the node list of the specified resource group. o The Global_zone property of the resource type is set to False. Otherwise, you can use this option in only the global zone. For ease of administration, use this form of the command in the global zone. 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 can use this option only in the global zone. 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 can use this option in a non-global zone if the zone exists in the resource group's node list, unless the command mod- ifies the node list. Otherwise, you can use this option only in the global zone. For ease of administration, use this form of the command in the global zone. 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. If you use this option in a non-global zone, this option successfully operates only on resources that can be mastered by that zone. If you use this option in the global zone, this option can operate on any resource. For ease of administration, use this form of the command in the global zone. 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 can use this option only in the global zone. 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 can use this option only in the global zone. 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 can use this option in a non-global zone if the following conditions are met: o The non-global zone exists in the node list of the specified resource group. o The Global_zone property of the resource type is set to False. Otherwise, you can use this option in only the global zone. For ease of administration, use this form of the command in the global zone. 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 can use this option only in the global zone. 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. You can use this option in the global zone or in a non-global zone. For ease of administration, use this form of the command in the global zone. 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 that are cur- rently 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: Note - Property names for resource groups, resources, and resource types are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify property names. -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. Specifies the path name of the resource type registration (RTR) file. By convention, the RTR file resides in the /opt/cluster/lib/rgm/rtreg directory. If the RTR file is not located in this directory, you must specify this option. -h RT_installed_node_list Is valid with -a and -c. Specifies a comma-separated list of node or zone names upon which this resource type is installed. Resources of this type can be instantiated only in resource groups whose node list is a subset of this list. The -h option 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. When used with the -c option, -h must be specified 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 and zones. 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. Placing a valid resource type registration file in the well-known directory where registration files are usually installed (/opt/cluster/lib/rgm/rtreg) enables the 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 the following command: # scrgadm -p 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 dis- tinguish 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 pre- fix, the use of the abbreviated name fails. The scrgadm command fails to register the resource type 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 the Sun Cluster 3.1 release continue to conform to the following syntax: vendor_id.resource_type -y RT_system={TRUE|FALSE} Sets the RT_system property of a resource type either to TRUE or to FALSE. The default value of the RT_system property is FALSE. See rt_properties(5) for a description of the RT_system property. Resource Group-Specific Options The following options are supported: -h node-zone-list Is valid with -a and -c. This option is a shortcut for -y Nodelist=node-zone-list. To specify a non-global zone, use the following syntax: node:zone The node component is the name of the physical node where zone is located. The zone component is the name of the zone that you want to include in Nodelist. For example, to specify the non-global zone zone-1 which is located on the node phys-schost-1, you specify the following text: phys-schost-1:zone-1 -y property=value Is valid with -a and -c. Multiple instances of -y property=value are allowed. The form of the value is dictated by each property. In the following example, property1 takes a single string as the value, while property2 takes a comma-separated string array: -y property1=value1 -y property2=value2a,value2b To set a string property to an empty value, use this option without specifying a value, as follows: -y property= Recognition of -y property names is not case-sensitive. See rg_properties(5) for a description of the resource group properties. Resource-Specific Options The following options are supported: -x extension_property=value -x "extension_property{node_specifier}=value" Is valid with -a and -c. Multiple instances of -x extension_property=value or -x "extension_property{node_specifier}=value" are allowed. node_specifier is an optional qualifier that indicates that the value of extension_property is to be set or changed on only the speci- fied node or nodes or zone or zones. The value for the specified property is not set or changed on other nodes or zones in the cluster. If you do not include node_specifier, the value for the specified property is set or changed on all nodes and zones in the cluster. Examples of the syntax of node_specifier are as follows: -x "myprop{phys-schost-1}=100" You specify the braces ({ }) to indicate the particular node or nodes or zone or zones on which you want to set the property. You can also use the following syntax for node_specifier to specify different values on two different nodes at the same time: -x "myprop{phys-schost-1}=100" -x "myprop{phys-schost-2}=10" Alternately, you can use the following syntax to set or change one value on two different nodes at the same time: -x "myprop{phys-schost-1,phys-schost-2}=100" The form of value is dictated by each extension_property. In the following example, extension_property1 takes a single string as the value, while extension_property2 takes a comma-separated string: -x "extension_property1{node_specifier}=value1" \ -x "extension_property2{node_specifier}=value2a,value2b" For information about the extension properties that are available for a particular data service, see the man page for that data ser- vice. -y property=value Is valid with -a and -c. Multiple instances of -y property=value are allowed. The form of the value is dictated by each property. In the following example, property1 takes a single string as the value, while property2 takes a comma-separated string array: -y property1=value1 -y property2=value2a,value2b To set a property to an empty value, use this option without specifying a value, as follows: -y property= Recognition of -y property names is not case-sensitive. See the r_properties(5) man page for a description of the resource properties. LogicalHostname 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 that is supplied with the optional -j option when you create 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: -j resource_name The -j option is required when you use an IP address rather than a host name as the first argument to the -l hostnamelist option. Use -j 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, the scrgadm command creates the resource and assigns the name of the first host name in hostnamelist to that resource. -L Indicates that the options that are used on the command line apply to a logical host name. If you issue the command when any cluster node is not an active cluster member, you must also use the -n netiflist option. -l hostnamelist Specifies the IPv4 or IPv6 addresses to be shared. Use host names even though you can specify IP addresses. hostnamelist is a comma- separated list of host names that are to be made available by this LogicalHostname resource. -n netiflist Specifies the list of network interfaces. The -L option requires the -n option if the command is issued when any cluster node is not an active cluster member. The netiflist takes the following form: netif@node[,...] 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. Sin- gle-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=value Refer to the Resource-Specific Options section for details. SharedAddress 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 Specifies a comma-separated list of node names or identifiers. Entries on this list must be members of the cluster. These nodes 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.
EXIT STATUS
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).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsczu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+
SEE ALSO
Intro(1CL), clreslogicalhostname(1CL), clresource(1CL), clresourcegroup(1CL), clresourcetype(1CL), clressharedaddress(1CL), ifconfig(1M), scstat(1M), scswitch(1M), r_properties(5), rbac(5), rg_properties(5), rt_properties(5)
NOTES
A network adapter that is not already configured for use cannot be discovered or placed into an IP Network Multipathing group during Logi- calHostname 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 com- plete. Sun Cluster 3.2 18 Jul 2006 scrgadm(1M)