About Oracle Cluster Registry
About Oracle Cluster Registry
Oracle Cluster Registry (OCR) is a file that contains information about the cluster node list and instance-to-node mapping information. OCR also contains information about Oracle Clusterware resource profiles for resources that you have customized. The voting disk data is also backed up in OCR.
OCR裡面包含了集群的節點信息還有實例到節點的映射信息等。也包含了自定義的集群資源,voting disk的數據也備份到OCR中
Each node in a cluster also has a local copy of the OCR, called an Oracle Local Registry (OLR), that is created when Oracle Clusterware is installed. Multiple processes on each node have simultaneous read and write access to the OLR particular to the node on which they reside, whether Oracle Clusterware is fully functional. By default, OLR is located at Grid_home/cdata/$HOSTNAME.olr
集群中每一個節點也包括一個本地的OCR備份,叫做OLR,在集群安裝的時候就被創建了.在每一個節點的多個進程同時讀寫本地的OLR.默認情況下,OLR存在於$Grid_home/cdata/$HOSTNAME.olr
Managing the Oracle Clusterware Stack
Note:
Do not use Oracle Clusterware Control (CRSCTL) commands on Oracle entities (such as resources, resource types, and server pools) that have names beginning with ora unless you are directed to do so by Oracle Support. The Server Control utility (SRVCTL) is the correct utility to use on Oracle entities.
不要以crsctl命令去開啟ora開頭的進程名字,除非由oracle support通知.啟動這種進程要使用srvctl
Starting Oracle Clusterware
You use the CRSCTL utility to manage Oracle Clusterware. If the Oracle High Availability Services daemon (OHASD) is running on all the cluster nodes, then you can start the entire Oracle Clusterware stack (all the processes and resources managed by Oracle Clusterware), on all nodes in the cluster by executing the following command on any node:
crsctl start cluster -all
----如果OHASD進程已經在所有節點啟動,那麼就可以使用上面的命令啟動整個集群.
You can start the Oracle Clusterware stack on specific nodes by using the -n option followed by a space-delimited list of node names, for example:
crsctl start cluster -n racnode1 racnode4
----使用上面的命令來啟動集群中的單個節點
To use the previous command, the OHASD process must be running on the specified nodes.
To start the entire Oracle Clusterware stack on a node, including the OHASD process, run the following command on that node:
crsctl start crs
-----使用上面的命令可以啟動包括OHASD進程在內的集群資源,但是只是在一個節點.
Stopping Oracle Clusterware
To stop Oracle Clusterware on all nodes in the cluster, execute the following command on any node:
crsctl stop cluster -all
----停止集群中所有節點的資源
The previous command stops the resources managed by Oracle Clusterware, the Oracle ASM instance, and all the Oracle Clusterware processes (except for OHASD and its dependent processes).
To stop Oracle Clusterware and Oracle ASM on select nodes, include the -n option followed by a space-delimited list of node names, for example:
crsctl stop cluster -n racnode1 racnode3
----停止單個節點
If you do not include either the -all or the -n option in the stop cluster command, then Oracle Clusterware and its managed resources are stopped only on the node where you execute the command.
To completely shut down the entire Oracle Clusterware stack, including the OHASD process, use the crsctl stop crs command. CRSCTL attempts to gracefully stop the resources managed by Oracle Clusterware during the shutdown of the Oracle Clusterware stack. If any resources that Oracle Clusterware manages are still running after executing the crsctl stop crs command, then the command fails. You must then use the -f option to unconditionally stop all resources and stop the Oracle Clusterware stack, for example:
crsctl stop crs -all -f
----強制關閉crs
Note:
When you shut down the Oracle Clusterware stack, you also shut down the Oracle Automatic Storage Management (Oracle ASM) instances. If the Oracle Clusterware files (voting disk and OCR) are stored in an Oracle ASM disk group, then the only way to shut down the Oracle ASM instances is to shut down the Oracle Clusterware stack.