首页 > 数据库 > Oracle > CLUSTER 安装内容介绍及补丁安装方法
| 主题: | Oracle Clusterware: Patch installation | |||
| 文档 ID: | 557934.1 | 类型: | REFERENCE | |
| Modified Date: | 30-JUL-2009 | 状态: | PUBLISHED | |
In this Document
Purpose
Scope
Oracle Clusterware: Patch installation
How Oracle Clusterware is Different from the RDBMS
Types of patches
Applying PatchSets
Applying Bundle Patches (CRSBP/MLR)
Conclusion
References
This document explains the considerations and concepts needed to apply a patch (bundle patch or patch set). It also documents the generic steps followed when Oracle Clusterware (CRS) is patched.
This note also describes the different components present when CRS is installed and how these are updated while patching.
This note is intended for patch installation on Unix. Please check Note 743126.1 for patch installations on Windows platforms.
This note lists the generic steps to apply a patch and clarifies how the Oracle Clusterware components are updated through patching.
Please note that this article is meant as a supplement and not as a replacement for the README for any patch. This information should prove helpful for troubleshooting potential issues encountered while patching.
Before going to the main topic, lets take some time to understand which parts or components are included in a typical Oracle Clusterware installation on Unix. Included is just a brief explanation for those components that will be touched when a patch is installed. For more details please consult Note 556976.1.
When Oracle Clusterware is installed, there are some components (such as daemons, files, or directories) that belong to root and others that belong to the user under which CRS has been installed (referred to as the Oracle user for the remainder of this document). Here are those components:
|
Component |
Purpose/Location |
Owner |
|---|---|---|
| Daemons | These are the processes providing the different services, all of them are located under $CRS_HOME | crsd* is the only file that belongs to root |
| Wrappers (or Scripts) | Those are shell scripts used to run the real executables,daemons and other commands like crs_* , mainly to set the correct environment. These files are located under the $CRS_HOME/bin. | Some of them belongs to root and others to the oracle user |
| Scripts init.* (init.cssd, init.crsd, etc) | The location depends on the Unix flavor,on Linux they are located under /etc/init.d. These files are used to start the daemons (aka CRS stack). | root is the owner of the files |
| inittab entries | Here is where the scripts init.* are registered. Oracle Clusterware is started by init. | /etc/inittab belongs to root |
| libraries and executables | As any other Oracle installation we have libraries and some other executables. The former are under $CRS_HOME/lib and the later under $CRS_HOME/bin | Most of the libraries are owned by oracle, but some by root. |
| oraInventory and inventory | For any Oracle product we have those two parts. The oraInventory can be under any location. But the inventory is located under $CRS_HOME | Both are owned by oracle. |
It is worth reiterating that there are components of CRS that belong to root and others that belong to oracle. Also, note that we have some parts of the Oracle Clusterware installation contained elsewhere than in the $CRS_HOME.
This is a significant difference compared to the RDBMS (or RAC) home and is the main reason why we need additional steps when patching Oracle Clusterware. Traditionally, the Oracle Universal Installer (OUI) and OPatch can only operate on files which are owned by oracle.
Related to Oracle Clusterware we have the following types of patches:
This is a consolidated set of patches provided on top of a base release (Eg. 10.2.0.1 or 11.1.0.6). The patch set currently includes the fixes relevant for both the RDBMS (or RAC) and CRS homes.
Note that patch sets are cumulative (each patchset contains its own fixes plus the fixes of any patchsets that precede it). Application of a patchset increments the fourth digit of the release.
Since 10.1.0.4, bundle patches have been provided for CRS. Since 10.2.0.3 there are two types of bundle patches provided which may cause some confusion.
First and foremost these bundle patches for Oracle Clusterware (or CRS) are fixes for the Oracle Clusterware (CRS) only. Having said that, when the RDBMS (or RAC) home is the same version as the Oracle Clusterware, then there is a component in the bundle patch that can be applied to the RDBMS ORACLE_HOME. Therefore, if we have a mixed configuration where the Oracle Clusterware is on release X and the RDBMS is on release Y, then the bundle patch should not be applied to the RDBMS installation.
Another important feature of these bundle patches is that they are applied using the OPatch patching utility, therefore, in order to apply bundle patches successfully, we will need to take additional steps to prepare the components listed above owned by root, to allow the oracle user to modify them.
It is advisable to use the latest opatch version available (see the opatch faq Note 242993.1).
Currently, if a customer needs a patch for Oracle Clusterware, the request will be grouped with others, made around the same time, and the patch will be merged with the previous bundle patch (either CRSBP# MLR# or MLR#).
We can find these type of bundle patches:
You need to keep in mind that a MLR#n patch cannot be merged with a CRSBP#.At this point you may ask which one you need to install. Well, as many other things, this depends. Here is some information about those:
How components will be modified
When
the patchset is installed, initially the installer (runInstaller or
OUI) will only copy the new binaries and libraries under the directory
$CRS_HOME:/install/patch
Note that the correct values for the variables in the wrappers (or shell scripts) are also updated at this time.
At the end of the OUI session, a screen is presented, prompting you to stop CRS and execute root102.sh (located under $CRS_HOME/install) on each node in turn. Running this script will:
As you can see, the root102.sh script will update the current installation. If this script is not executed, then Oracle Clusterware will remain in the previous release, even if OPatch or OUI reports that the patchset has been successfully installed.
Patchset installation StepsThe required steps when applying a patchset are:Remember that if root102.sh is not executed, then CRS will continue running on the older version. One way to confirm that you're using the new version is by running 'crsctl query crs activeversion':
[oracle@mbrac1 ~]$ crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.3.0] Or check the version for the daemons as per their log files located under $CRS_HOME/log/
Special Considerations
Here are some important point to keep in mind when a Bundle Patch is installed:
How Components are updated
As mentioned before, we need to run some scripts before and after the OPatch execution. Remember that the oraInventory belongs to the Oracle user. Thus the scripts are needed, so that the patch can be installed. Here is a brief description of these scripts, which help to modify the different Oracle Clusterware components, listed in the same order as they are listed in the Bundle Patch README:
If for some reason, the patch needs to be deinstalled (which requires OPatch execution) then the same scripts must be run. For further details, refer to the Bundle Patch README.
@ If the patch fails for any reason, it's fine to execute it again.
Patch Installation
This section provides a general outline of the patching steps, most of which were already mentioned above. For additional details about the parameters mentioned, check the README included in the Bundle Patch:
To verify that the installation was successful, you can execute OPatch and list the oraInventory for the ORACLE_HOME(s) you have patched.
An Oracle Clusterware installation is different than the RDBMS installation; in the way the software is installed and the different components created, etc. Because of this, patchset installations and/or bundle patch applications require additional steps.
This note discussed different Oracle Clusterware components and mentioned special considerations aimed at providing a clear idea of the whole patch installation process.
Note 259301.1 - CRS and 10g Real Application Clusters
Note 399031.1 - Step by step installation of Oracle Clusterware one-off and bundle patches for 10.1 and 10.2
Note 405820.1 - 10.2.0.X CRS Bundle Patch Information
Note 556976.1 - Oracle Clusterware: Components installed.
Note 743126.1 - RAC on Windows: How to Apply Oracle Windows Mini Patch Bundles in a Rolling Fashion
Note 242993.1 - OPATCH FAQ
安装的组件介绍:
主题:
Oracle Clusterware: Components installed.
文档 ID:
556976.1
类型:
REFERENCE
Modified Date:
19-DEC-2008
状态:
PUBLISHED
In this Document
Purpose
Scope
Oracle Clusterware: Components installed.
What is the Oracle Clusterware?
Components.
Components creation.
Conclusion.
References
This document is aimed to explain the different parts of the Oracle Clusterware (sometimes also referred to as Cluster Ready Services or CRS) created during a typical installation on Unix. This note can be considered as an introduction for other available notes that deal with Oracle Clusterware.
This document is meant as a supplement to and not a replacement of the installation documentation for Oracle Clusterware.
The Oracle Clusterware was introduced in 10.1 (initially called CRS ) and is the product that lies under RAC. Oracle Clusterware provides different services to RAC including:
- Group Services
- Node Monitor
- Locking services
- HA Resource management
- Event framework, etc
Oracle Clusterware is different compared to RAC (or RDBMS) and thus its components are different as well.
Several components are needed to have CRS running on Unix machine. Here is a brief description of each:
1. Daemons and init.* scripts
Oracle Clusterware is formed of several daemons, each one of which have a special function
inside the stack. The daemons are located inside the directory $CRS_HOME/bin. Here is a list of the
daemons,
for 10.2.0.3 and later, note that depending on the platform and whether
or not there is a 3rd-party vendor clusterware installed, some of the
following processes may not be present:
- ocssd.bin
- crsd.bin
- evmd.bin
- ocslsvmon.bin
- oclsomon.bin
- oprocd
When the daemons are running, we can say that CRS is fully started. Daemons are executed via the init.* scripts (init.cssd,
init.crsd and init.evmd). Note that we do not have as many init.* scripts as we have daemons, this is because init.cssd starts more than one daemon:
- init.cssd starts ocssd.bin, olcsomon, oclsvmon and oprocd (CSS family)
- init.crsd starts crsd.bin
- init.evmd starts evmd.bin
Note that some links for the scripts exist under rc.d which are used to manipulate the control files (see point 3), which
at the end will help to start and stop the whole stack.
2. Oracle Cluster Registry (OCR) and Voting Disk (VD)
The
OCR contains the configuration information for the clusterware, like
the network endpoints where the daemons (ocssd.bin, crsd.bin,etc) will
be listening, cluster interconnect information for RAC, location for
VD, etc.
The
VD is a communication mechanism where every node reads and writes its
heartbeat information. The VD is also used to kill the node(s) when the
network communication is lost between one or several nodes in the
cluster to prevent a split-brain and protect the database information.
3. Control files (also know as SCLS_SRC files)
These files are used to control some aspects of Oracle Clusterware like:
- enable/disable processes from the CSSD family (Eg. oprocd, oslsvmon)
- stop the daemons (ocssd.bin, crsd.bin, etc).
-
prevent Oracle Clusterware from being started when the machine boots.
- etc.In a Linux installation those files are located as follows:
[oracle@mbrac1 scls_scr]$ ls -lR
.:
total 4
drwxr-xr-x 4 root root 4096 Oct 28 10:17 mbrac1
./mbrac1:
total 8
drwxr-xr-x 2 oracle root 4096 Oct 28 10:17 oracle
drwxr-xr-x 2 root root 4096 Oct 28 10:19 root
./mbrac1/oracle:
total 4
-rw-r--r-- 1 oracle root 7 Oct 28 10:32 cssfatal
./mbrac1/root:
total 12
-rw-r--r-- 1 root root 39 Oct 28 10:19 crsdboot
-rw-r--r-- 1 root root 7 Oct 28 10:17 crsstart
-rw-r--r-- 1 root root 39 Oct 28 10:17 cssrun
-rw-r--r-- 1 root root 0 Oct 28 10:19 noclsmon
-rw-r--r-- 1 root root 0 Oct 28 10:19 nooprocd
The control files must not be manipulated manually, some files are changed via init.cssd or crsctl and
the location can differ depending on the Unix OS (Linux, Solaris, etc).
4. inittab entries
In
order to start the Oracle Clusterware daemons, the init.* scripts first
need to be run. These scripts are executed by the daemon init. To
accomplish this some entries must be created in the file /etc/inittab.
These are:
h1:35:respawn:/etc/init.d/init.evmd run >/dev/null 2>&1 h2:35:respawn:/etc/init.d/init.cssd fatal >/dev/null 2>&1 h3:35:respawn:/etc/init.d/init.crsd run >/dev/null 2>&1 5. Wrappers.
The wrappers are shell scripts created under the $CRS_HOME/bin, which are used to set the correct environment variables such as: CRS_HOME, LD_LIBRARY_PATH, etc, and run the real executables.
The daemons and other tools are executed in such a way. One example is ocssd:
#!/bin/sh
ORA_CRS_HOME=/u01/64bit/A203/crs
ORACLE_HOME=$ORA_CRS_HOME
export ORA_CRS_HOME ORACLE_HOME
case `/bin/uname` in
Linux) LD_LIBRARY_PATH=$ORA_CRS_HOME/lib
export LD_LIBRARY_PATH
;;
..
case $0 in
*.bin) exec $ORA_CRS_HOME/bin/`basename $0 .bin` "$@" ;;
*) exec $0.bin "$@" ;;
esacAs can be seen, ocssd sets the environment and will call ocssd.bin. During the installation, these scripts are parsed and the correct values for the variables are set.
When exactly during the installation process are these components created? The Installation manual contains a complete list
of installation requirements that must be fulfilled even before invoking the Installer
(runInstaller). This can prevent a lot of potential issues with installation.
After fulfilling the pre-installation requirements, the basic installation steps to follow are:
1. Invoke the Oracle Universal
Installer (OUI)
2. Enter the different information for some components like:
- name of the cluster
- public
and private node names
- location for OCR and Voting Disk
- network interfaces used for RAC instances
-etc.
3.
After the Summary screen, OUI will start copying under the $CRS_HOME
(this is the $ORACLE_HOME for Oracle Clusterware) in the local node the
libraries and executables.
- here we will have the daemons and scripts init.* created and configured properly.
- note that for CRS only some client libraries are recreated, but not all the executables (as for the RDBMS).
4.
Later the software is propagated to the rest of the nodes in the cluster and the oraInventory is updated.
5.
The installer will ask to execute root.sh on each node. Until this step
the software for Oracle Clusterware is inside the $CRS_HOME. Running
root.sh will create several components outside the $CRS_HOME:
- OCR and VD will be formated
- control files (or SCLS_SRC
files ) will be created with the correct contents to start Oracle Clusterware.
- /etc/inittab will be updated and the init
process is notified
- the different processes init.* (init.cssd, init.crsd, etc) will start the daemons (ocssd.bin, crsd.bin,
etc). When all the daemons are running then we can say that the installation was successful
- On 10.2 and later, running
root.sh on the last node in the cluster also will create the nodeapps (VIP, GSD and ONS). On 10.1, VIPCA is executed as part of
the RAC installation.
Note that root.sh MUST be executed on each node at a time and after the installation is finished successfully
root.sh must not be executed again. If an error is produced and
Oracle Clusterware is not fully started then is valid to execute
root.sh again.
6.
After running root.sh on each node, we need to continue with the OUI
session. After pressing the 'OK' button OUI will include the
information for the public and cluster_interconnect interfaces. Also
CVU (Cluster Verification Utility) will be executed.
Oracle Clusterware is different than the RDBMS and as such it's important to keep in mind the different parts needed and created during a typical installation on a Unix OS. Note that this document is not a replacement for the Installation manual, which includes the complete information for the installation of the product. Anyone preparing to install Oracle Clusterware must follow the Installation Manual and ensure that the requirements are in place, before starting the OUI.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9225895/viewspace-1027462/ ,如需转载,请注明出处,否则将追究法律责任。