What should I use “srvctl add serverpool” or “crsctl add serverpool”Posted: 30/05/2012
I saw some doubts as to which utility to use and in what situation we should use.
I searched on some sites related to Oracle and saw that the people is still a bit confused about which command we should use.
But before start there is a rule to a Clusterware Envorinment:
The “srvctl” is to be used to managed resources with the prefix ora.* resources and “crsctl” is to be used to query or start/stop resources with prefix ora.*, but crsctl is not supported to modify or edit resources with prefix ora.* .
See this note on MOS:
|Oracle Clusterware and Application Failover Management [ID 790189.1]|
Using crs_* or crsctl commands on resources with the prefix ora.* (resources provided by Oracle) remains unsupported.
So, if you created a resource with “srvctl” this resource should be managed only by “srvctl”. If you create a resource with “crsctl” this resource should be managed using “crsctl” command.
Let’s talk about the concept Policy-Based Cluster.
Oracle Clusterware 11g release 2 (11.2) introduces a different method of managing nodes and resources used by a database called policy-based management.
With Oracle Clusterware 11g release 2 (11.2) and later, resources managed by Oracle Clusterware are contained in logical groups of servers called server pools. Resources are hosted on a shared infrastructure and are contained within server pools. The resources are restricted with respect to their hardware resource (such as CPU and memory) consumption by policies, behaving as if they were deployed in a single-system environment.
- Enables dynamic capacity assignment when needed to provide server capacity in accordance with the priorities you set with policies
- Enables allocation of resources by importance, so that applications obtain the required minimum resources, whenever possible, and so that lower priority applications do not take resources from more important applications
- Ensures isolation where necessary, so that you can provide dedicated servers in a cluster for applications and databases
Applications and databases running in server pools do not share resources. Because of this, server pools isolate resources where necessary, but enable dynamic capacity assignments as required. Together with role-separated management, this capability addresses the needs of organizations that have standardized cluster environments, but allow multiple administrator groups to share the common cluster infrastructure.
This is only a concept.
Therefore Oracle divided this concept to be used for two types of configuration
Policy-Managed Database and Policy-Based Management to non-database.
A database that you define as a cluster resource. Management of the database is defined by how you configure the resource, including on which servers the database can run and how many instances of the database are necessary to support the expected workload.
To configure Policy managed database, Oracle already have pre-defined configuration for that.
So, the options are limited and specific to Database resources (such as Services,Database).
For that reason Oracle provided “srvctl add serverpool”.
$ srvctl add serverpool -h Adds a server pool to the Oracle Clusterware. Usage: srvctl add srvpool -g <pool_name> [-l <min>] [-u <max>] [-i <importance>] [-n "<server_list>"] [-f] -g <pool_name> Server pool name -l <min> Minimum size of the server pool (Default value is 0) -u <max> Maximum size of the server pool (Default value is -1 for unlimited maximum size) -i <importance> Importance of the server pool (Default value is 0) -n "<server_list>" Comma separated list of candidate server names -f Force the operation even though some resource(s) will be stopped -h Print usage
Policy-Based Management to non-database.
To configure Non-Database resources, Oracle provided another command with much more options “crsctl add serverpool”.
This allow the DBA explore all options which Policy Managed can supply.
$ crsctl add serverpool -h Usage: crsctl add serverpool <spName> [[-file <filePath>] | [-attr "<attrName>=<value>[,...]"]] [-i] where spName Add named server pool filePath Attribute file attrName Attribute name value Attribute value -i Fail if request cannot be processed immediately -f Force option
So, we NEVER should not mix the serverpool used by database resource and serverpool used by non-database resource.
Also never use “crsctl” command to change Database Server Pool wich was created by “srvctl”. Never put a database in a serverpool created by using “crsctl” command.
Server Pool to database resource must be created by using “srvctl”.
Server Pool to non-database resource must be created by using “crsctl”
Question: Is possible change ora.* resources with “crsctl”?
Yes, It’s possible but not supported by Oracle.
Hope make this clear.