Skip to content

GI-PSU Patch on CRS/Grid Home

April 3, 2012

Note : We Applied GI-PSU only For CRS/GRID HOME.

Some Insight on Opatch auto command:
——————————————————
Q1) To confirm Does this patch needs to be executed as root or oracle OS user?
 
Ans) “opatch auto” needs to be executed as root.
 
Q2) If root user is must, then Is there a way where oracle user can execute opatch for GI without root user?
 
Ans) You cannot use “opatch auto” to patch as oracle user, but you can patch it manually. However you will have to ask root user to run the rootcrs.pl -unlock to unlock the GI home so that oracle can apply the patch and after the patch is applied root has to execute rootcrs.pl -patch to lock the binaries.
 
Q3) Does “opatch auto” applies patch only to one host at a time. i.e. if you run opatch on node 1 then only that node is patched?
 
Ans) ‘opatch auto’ applies patches to multiple OHs on a single host (no cross-host patching).
It automatically detects all ORACLE_HOME and ASM_HOME equivalent to CRS version and applies patch only to those home.
 
Q4) Will “opatch auto” takes care of stop/start and no need to bring down anything manually?
 
Ans) Using auto option, there are no manual steps like stopping crs, instance, nodeapps, asm,
running rootprepatch.sh or any other scripts require to be performed by user while applying or rolling back patch.
All this steps are automatically taken care by opatch. 
 
Q5) We generally bring down CRS or DB’s using HA command’s, since CRS and DB’s resource are under the control of VCS (VERITAS).
so does your “opatch auto” will take of bringing the CRS and DB’s down automatically using HA command’s?
1) Do you want us to manually Bring DB’s resource manually using HA Command’s, but not CRS?
2) Even if I bring down DB’s using HA’s commands, I am wondering how “opatch auto” will bring the CRS down while patching as CRS is also under the control of VCS ?
 
Ans) :
opatch uses crsctl and srvctl to stop the crs and resources as applicable so it will be a clean stop if that is your concern it does not use HA commands.
1. We would recommend that you let opatch do it automatically.
2. There should not be an issue for opatch to bring down the crs. Do you have issues stopping crs using crsctl stop crs? If not it should not be a problem.
 
Q6) We have scheduled to apply this GI PSU patch in DEV on Tuesday. However, I saw following note on Metalink and I am concerned if we will face this issue after applying GI PSU patch:
Bug 10224621 – Lots of requests to UISERVER (every sec) after installing GI PSU 2 patch 9655006 [ID 10224621.8] ?
 
Ans) It is not an issue actually only normal messages written to crsd.log the bug was raised because customer wanted to suppress the messages.
The messages means that commands like crs_stat, crsctl or srvctl are being executed.
You can ignore it and go ahead with patching.
 
Q7)  Are PSU’s and CPUS’s cumulative ?
 
 Ans)  Yes the CPU and PSU are cumulative.
That is if you apply the JAN 2012 CPU then all the previous CPU’s will also be applied including the OCT CPU.
But you have to apply either of CPU or PSU as their patching mechanism is different.
Also all the PSU also contain the CPU fixes. SO if you apply the JAN2012 PSU it will contain all the previous PSU fixes plus CPU fixes.
 
So you either apply JAN2012 CPU or JAN 2012 PSU
 
Q8)  As what OS user do we need to take backup of CRS, root or oracle user ?
 
Ans) Backup CRS_HOME as root,As few files are owned by root in CRS_HOME , if you try taking backup using tar as oracle OS user, they will not get backedup and you may receive the error as below.
 
ls -ltR /u01/app/crs |grep “root     root”  => check file owned by root in crs HOME (/u01/app/crs)
 
maldevsrv01:/opt/oracle: ls -ltR /u01/app/crs |grep “root     root”
-rw-r–r–   1 root     root        4361 Apr  1 06:29 oradaemonagent
-rw-r–r–   1 root     root        4361 Apr  1 06:29 oradnssd
-rw——-   1 root     root     6914048 Apr  7 15:21 backup00.ocr
 
tar: crs/log/maldevsrv01/client/ocrconfig_20722.log: Permission denied
tar: crs/cdata/maludev-clustr/backup00.ocr: Permission denied
 
Check IF the specific file is backedupas below:
===================================
tar -tvf maldevsrv01.oraHome_CRS_11.2.0.1.0.bkup.10.04.2012.07.13.44.tar |grep /sqlplus |grep -v /sqlplus/
-rwxr-x–x 104/3001   9536 Feb 19 09:13 2012 crs/bin/sqlplus
 
Extarct single file (Aud_info_D041.28-MAR-12-09.59.24.log_FL)
==================================================
cd /tmp/SR
tar -xvf /opt/oracle/abc.tar Aud_info_D041.28-MAR-12-09.59.24.log_FL
 
 

########################################################################

Down Load GI-PSU Patch e.g. 9655006
———————————————————–
export http_proxy=http://proxy.mycomp.com/
export https_proxy=http://proxy.mycomp.com/
 
/usr/sfw/bin/wget –http-user=malesh_gummula@mycomp.com –http-password=xxxxx –no-check-certificate –output-document=p9655006_112010_SOLARIS64.zip \
https://updates.oracle.com/Orion/Download/process_form/p9655006_112010_SOLARIS64.zip?file_id=30759945&aru=12765490&userid=o-malesh_gummula@mycomp.com&email=malesh_gummula@mycomp.com&patch_password=&patch_file=p9655006_112010_SOLARIS64.zip
 
Things to Backup Before Patching CRS Home (Doc ID 743036.1)
Please make the backup of the following:
——————————————————
1.  Backup CRS_HOME — you can use cpio, tar OS utilities.
2.  Backup central inventory — you can get the location via file /etc/oraInst.loc or /var/opt/oracle/oraInst.loc.
3.  Backup /etc/oracle directory.
4.  Backup /var/opt/oracle directory.
5.  Export ocr by issuing “ocrconfig -export <file_name>”.
6.  Export the voting disk by issuing “dd if=voting_disk_name of=backup_file_name”.
 
Backup the GRID/CRS HOME as Root user :
========================================

As per Readme of GI PSU patch, we need root privileges to apply the patch.

So we need either Pbrun or Su to root, to execute opatch auto.

maldevsrv01:/u01/app: du -hs *
 6.2G   crs
 6.1M   oraInventory
 6.0G   oracle
 
maldevsrv02:/u01/app: du -hs *
 5.5G   crs
  87K   oraInventory
 6.0G   oracle
 
Oracle Inventory Backup as Oracle user:
================================

cd /u01/app

nohup tar -cvf /u01/orasoft/orabin_bkp/`hostname`.oraInv.bkup.`date +\%d”.”\%m”.”\%Y”.”\%H”.”\%M”.”\%S`.tar oraInventory > /u01/orasoft/orabin_bkp/nohup.orainv.`date +\%d”.”\%m”.”\%Y”.”\%H”.”\%M”.”\%S` &

ls -ltrh /u01/orasoft/orabin_bkp

————————————————————————————

Ask Unix/ sysadmin Team for pbrun/su to root for executing opatch using root account

Hi Unix Team,

We need root privileges to apply the patch on CRS HOME for Servers (maldevsrv01,maldevsrv02.

Please provide pbrun or su –  access to run below Command as root users to oracle user.

Our UNIX team Reply/Comments:
———————————————–

OK, I just pushed out the changes.  You must specify the full path to invoke this script:

$ PBTEST=oracle pbrun -h maldevsrv01 -u root /u01/orasoft/opatch/OPatch/opatch

****************************************************************

Module is oracle_access.conf, stanza is #3.

runuser is root, runcommand is ‘/u01/orasoft/opatch/OPatch/opatch’

****************************************************************

Continue to execute runcommand? (default=No)

########################################################################

To Take CRS HOME Backup Root user :
==========================================

cd /u01/app

nohup tar -cvf /u01/orasoft/orabin_bkp/`hostname`.oraHome_CRS_11.2.0.1.0.bkup.`date +\%d”.”\%m”.”\%Y”.”\%H”.”\%M”.”\%S`.tar crs > /u01/orasoft/orabin_bkp/nohup.oraHome_CRS_11.2.0.1.0.bkup.`date +\%d”.”\%m”.”\%Y”.”\%H”.”\%M”.”\%S` &

OR put above in Script as below

maldevsrv01:/u02/orascripts: cat Backup_GridHome.ksh

#!/bin/ksh
cd /u01/app
tar -cvf /u01/orasoft/orabin_bkp/`hostname`.oraHome_CRS_11.2.0.1.0.bkup.`date +\%d”.”\%m”.”\%Y”.”\%H”.”\%M”.”\%S`.tar crs > /u01/orasoft/orabin_bkp/oraHome_CRS_11.2.0.1.0.bkup.log.`date +\%d”.”\%m”.”\%Y”.”\%H”.”\%M”.”\%S`

chmod 755 Backup_GridHome.ksh

As Oracle ID, run below script to backup CRS HOME. Internally it will backup as root.

pbrun -l /u02/orascripts/Backup_GridHome.ksh

maldevsrv01:/u01/orasoft/orabin_bkp: ls -ltrh

-rw-r–r–   1 root     dba         6.5G Mar 30 07:47 maldevsrv01.oraHome_CRS_11.2.0.1.0.bkup.30.03.2012.07.34.36.tar

-rw-r–r–   1 root     dba         1.3M Mar 30 07:47 oraHome_CRS_11.2.0.1.0.bkup.log.30.03.2012.07.34.36

Note : Do not run Above script with pbrun command in Nohup as it does not works :

maldevsrv02:/opt/oracle:

[1] + Stopped (SIGTTOU)        nohup pbrun -l /u02/orascripts/Backup_GridHome.ksh &

JFYI – Not necessary to take ORACLE_HOME Backup as we are applying patch only to CRS/GRID Home.
================================================================================

cd /u01/app/oracle/product

nohup tar -cvf /u01/orasoft/orabin_bkp/`hostname`.oraHome11201g.bkup.`date +\%d”.”\%m”.”\%Y”.”\%H”.”\%M”.”\%S`.tar 11.2.0 > /u01/orasoft/orabin_bkp/oraHome11201g.bkup.log.`date +\%d”.”\%m”.”\%Y”.”\%H”.”\%M”.”\%S` &

maldevsrv01:/u01/app/oracle/product: ls -ltr /u01/app/oracle/product/11.2.0/bin/nmb

-rws–x—   1 root     dba        20704 Feb 27 02:43 /u01/app/oracle/product/11.2.0/bin/nmb

Check backup logs as below:
————————————–
cat nohup.out|grep -i permission
cat nohup.out |grep “file changed size”
cat nohup.out |grep -v K
tar: oracle/product/11.2.0/bin/nmb: Permission denied
tar: oracle/product/11.2.0/bin/nmhs: Permission denied
tar: oracle/product/11.2.0/bin/nmo: Permission denied
tar: oracle/emagent/agent11g/bin/nmb: Permission denied
tar: oracle/emagent/agent11g/bin/nmhs: Permission denied
tar: oracle/emagent/agent11g/bin/nmo: Permission denied

From above error it seems even Oracle Home Should be backup using root.

AS root OCR Backup Manually:
=============================
In 10.2
———-
# ocrconfig -export <OCR export_filename> -s online
In 11.1 and 11.2
———————-
# ocrconfig -manualbackup
node1 2008/08/06 06:11:58 /crs/cdata/crs/backup_20080807_003158.ocr

http://www.idevelopment.info/data/Oracle/DBA_tips/Oracle10gRAC/CLUSTER_65.shtml#OCR Backup: Manual OCR Exports

Please note that an OCR logical export can also be used to restore the OCR from a lost or corrupt OCR file.

maldevsrv01:/u01/app: /u01/app/crs/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2604
         Available space (kbytes) :     259516
         ID                       : 1734542859
         Device/File Name         : /srvctl1/ocr1
                                    Device/File integrity check succeeded
         Device/File Name         : /srvctl2/ocr2
                                    Device/File integrity check succeeded
         Device/File Name         : /srvctl3/ocr3
                                    Device/File integrity check succeeded
                                    Device/File not configured
                                    Device/File not configured
         Cluster registry integrity check succeeded
         Logical corruption check bypassed due to non-privileged user

/u01/app/crs/bin/ocrconfig –showbackup  => this shows OCR is getting backed up on MASTER Node which is maldevsrv01.

maldevsrv01:/u01/app: /u01/app/crs/bin/ocrconfig -showbackup
maldevsrv01     2012/03/30 03:30:56     /u01/app/crs/cdata/maldevsrv-clustr/backup00.ocr
maldevsrv01     2012/03/29 23:30:55     /u01/app/crs/cdata/maldevsrv-clustr/backup01.ocr
maldevsrv01     2012/03/29 19:30:53     /u01/app/crs/cdata/maldevsrv-clustr/backup02.ocr
maldevsrv01     2012/03/29 03:30:46     /u01/app/crs/cdata/maldevsrv-clustr/day.ocr
maldevsrv01     2012/03/22 03:29:37     /u01/app/crs/cdata/maldevsrv-clustr/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
maldevsrv02:/u01/app: /u01/app/crs/bin/ocrconfig -showbackup
maldevsrv01     2012/03/30 03:30:56     /u01/app/crs/cdata/maldevsrv-clustr/backup00.ocr
maldevsrv01     2012/03/29 23:30:55     /u01/app/crs/cdata/maldevsrv-clustr/backup01.ocr
maldevsrv01     2012/03/29 19:30:53     /u01/app/crs/cdata/maldevsrv-clustr/backup02.ocr
maldevsrv01     2012/03/29 03:30:46     /u01/app/crs/cdata/maldevsrv-clustr/day.ocr
maldevsrv01     2012/03/22 03:29:37     /u01/app/crs/cdata/maldevsrv-clustr/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
 
maldevsrv01:/u01/app: /u01/app/crs/bin/ocrcheck -local -config
Oracle Local Registry configuration is :
         Device/File Name         : /u01/app/crs/cdata/maldevsrv01.olr
So take OCR backup from Master node as root.

=====================================

I tried with oracle but it error out.

maldevsrv01:/u01/app: id

uid=104(oracle) gid=3001(dba)

maldevsrv01:/u01/app: ocrconfig -export /u01/orasoft/orabin_bkp/OCRFileBackup.dmp

PROT-20: Insufficient permission to proceed. Require privileged user

maldevsrv01:/u01/app: ocrconfig -manualbackup

PROT-20: Insufficient permission to proceed. Require privileged user

Backup the OCR as root.

As oracle Backup Voting Disk

===================================================

maldevsrv01:/u01/app: /u01/app/crs/bin/crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
—  —–    —————–                ——— ———
 1. ONLINE   2a8a3217fbd84f48bfe75f0819a6fd17 (/srvctl1/vote1) []
 2. ONLINE   80124a7483134f96bf658faaa854bcc0 (/srvctl2/vote2) []
 3. ONLINE   a0621be67b6c4f91bfc5e735ec8be51b (/srvctl3/vote3) []
Located 3 voting disk(s).
 
maldevsrv01:/u01/app: dd if=/srvctl1/vote1 of=/u01/orasoft/orabin_bkp/vote1.bkp
41024+0 records in
41024+0 records out
 
maldevsrv01:/u01/app: dd if=/srvctl2/vote2 of=/u01/orasoft/orabin_bkp/vote2.bkp
41024+0 records in
41024+0 records out
 
maldevsrv01:/u01/app: dd if=/srvctl3/vote3 of=/u01/orasoft/orabin_bkp/vote3.bkp
41024+0 records in
41024+0 records out 

######################################################################

To patch only the GI home as Root user:
==================================

1) OCM Configuration.

Create ocm response file using the following command and provide appropriate values for the prompts.

cd /u01/orasoft/opatch/OPatch/ocm

maldevsrv01:/u01/orasoft/opatch/OPatch/ocm: /u01/orasoft/opatch/OPatch/ocm/bin/emocmrsp

The ORACLE_HOME does not contain java.
The ORACLE_HOME does not contain a valid JDK/JRE.
Redefine JAVA_HOME to refer to a JDK/JRE 1.2.2 or greater.
 
maldevsrv01:/u01/orasoft/opatch/OPatch/ocm: which java
/usr/bin/java
maldevsrv01:/u01/orasoft/opatch/OPatch/ocm: java -version
java version “1.5.0_32”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_32-b05)
Java HotSpot(TM) Server VM (build 1.5.0_32-b05, mixed mode)

maldevsrv01:/u01/orasoft/opatch/OPatch/ocm: export JAVA_HOME=/usr/bin => It did not work same as above error

Specify the java path from CRS / Oracle Home

cd /u01/orasoft/opatch/OPatch/ocm
export JAVA_HOME=/u01/app/crs/jdk
OR
export JAVA_HOME=/u01/app/oracle/product/11.2.0/jdk
 
Execute now:
——————
maldevsrv01:/u01/orasoft/opatch/OPatch/ocm: /u01/orasoft/opatch/OPatch/ocm/bin/emocmrsp
 
OCM Installation Response Generator 10.3.4.0.0 – Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates.  All rights reserved.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.   (Leave This Blank)
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:          (Leave This Blank)
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y
The OCM configuration response file (ocm.rsp) was successfully created.
 
maldevsrv01:/u01/orasoft/opatch/OPatch/ocm: ls -ltr
total 53780
drwxrwxr-x   2 oracle   dba           96 Dec  9  2010 bin
drwxrwxr-x   2 oracle   dba         1024 Dec  9  2010 lib
-rw-rw-r–   1 oracle   dba          638 Nov 10 13:46 ocm_platforms.txt
-rw-rw-r–   1 oracle   dba      27531822 Nov 10 13:46 ocm.zip
-rw-r–r–   1 oracle   dba          623 Mar 13 07:14 ocm.rsp
 
Verify the created file using,
======================
/u01/orasoft/opatch/OPatch/ocm/bin/emocmrsp -verbose ocm.rsp
cd /u01/orasoft/opatch/OPatch/ocm
maldevsrv01:/u01/orasoft/opatch/OPatch/ocm: /u01/orasoft/opatch/OPatch/ocm/bin/emocmrsp -verbose ocm.rsp
OCM Installation Response Generator 10.3.4.0.0 – Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates.  All rights reserved.
Response file created: Mar 13, 2012 7:14:35 AM
Created by: oracle
License agreement: declined
Follow the same on Second Node:
===============================
maldevsrv02:/u01: ls -l /u01/orasoft/opatch/OPatch/ocm/ocm.rsp
-rw-r–r–   1 oracle   dba          623 Mar 13 07:16 /u01/orasoft/opatch/OPatch/ocm/ocm.rsp
 
Check cluster Status :
==================
maldevsrv01:/u01/app: /u01/app/crs/bin/crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host
———————————————————————-
ora….ER.lsnr ora….er.type 0/5    0/     ONLINE    ONLINE    maldevsrv01
ora….11.lsnr ora….er.type 0/5    0/     ONLINE    ONLINE    maldevsrv01
ora….N1.lsnr ora….er.type 0/5    0/0    ONLINE    ONLINE   maldevsrv02
ora.scan1.vip  ora….ip.type 0/0    0/0    ONLINE    ONLINE    maldevsrv02
ora.scan2.vip  ora….ip.type 0/0    0/0    ONLINE    ONLINE   maldevsrv01
ora.scan3.vip  ora….ip.type 0/0    0/0    ONLINE    ONLINE    maldevsrv01
 
maldevsrv01:/u01/app: /u01/app/crs/bin/crs_stat -t -v |grep OFFLINE
ora.asm        ora.asm.type   0/5    0/     OFFLINE   OFFLINE
ora….SM1.asm application    0/5    0/0    OFFLINE   OFFLINE
ora….v01.gsd application    0/5    0/0    OFFLINE   OFFLINE
ora….SM2.asm application    0/5    0/0    OFFLINE   OFFLINE
ora….v02.gsd application    0/5    0/0    OFFLINE   OFFLINE
ora.gsd        ora.gsd.type   0/5    0/     OFFLINE   OFFLINE
ora.oc4j       ora.oc4j.type  0/5    0/0    OFFLINE   OFFLINE
 
maldevsrv01:/u01/app: /u01/app/crs/bin/crsctl status resource -t
——————————————————————————–
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.LISTENER.lsnr
               ONLINE  ONLINE       maldevsrv01
               ONLINE  ONLINE      maldevsrv02
ora.LISTENER_11.lsnr
               ONLINE  ONLINE       maldevsrv01
               ONLINE  ONLINE       maldevsrv02

——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       maldevsrv02
      1        ONLINE  ONLINE       maldevsrv01
ora.d041.db
      1        ONLINE  ONLINE      maldevsrv01               Open
      2        ONLINE  ONLINE       maldevsrv02               Open
ora.maldevsrv01.vip

…….

########################################################################

Start Patching now

——————————-

1)      Start Capturing the Actions as below from now onwards.

cd /u01/orasoft/patches/grid_psu

script  crs_patch_`hostname`.txt

2)      Keep in Handy the location of OCM response file created earlier.

maldevsrv01:/u01/orasoft/patches/grid_psu: /u01/orasoft/opatch/OPatch/ocm/bin/emocmrsp -verbose ocm.rsp

OCM Installation Response Generator 10.3.4.0.0 – Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates.  All rights reserved.
Unable to open the response file (ocm.rsp).
ocm.rsp (No such file or directory)   => My path was incorrect where ocm located
maldevsrv01:/u01/orasoft/patches/grid_psu: cd /u01/orasoft/opatch/OPatch/ocm
maldevsrv01:/u01/orasoft/opatch/OPatch/ocm: /u01/orasoft/opatch/OPatch/ocm/bin/emocmrsp -verbose ocm.rsp
OCM Installation Response Generator 10.3.4.0.0 – Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates.  All rights reserved.
Response file created: Mar 13, 2012 7:16:37 AM
Created by: oracle
License agreement: declined

ls -l /u01/orasoft/opatch/OPatch/ocm/ocm.rsp

-rw-r–r–   1 oracle   dba          623 Mar 13 07:16 /u01/orasoft/opatch/OPatch/ocm/ocm.rsp 

3)      Check the “opatch” version in GI home, If Less then 11.2.0 , Install (download at My Oracle Support patch 6880880)

maldevsrv01:/opt/oracle: /u01/app/crs/OPatch/opatch version
Invoking OPatch 11.1.0.6.6
OPatch Version: 11.1.0.6.6
OPatch succeeded.
 
maldevsrv02:/opt/oracle: /u01/app/crs/OPatch/opatch version
Invoking OPatch 11.1.0.6.6
OPatch Version: 11.1.0.6.6
OPatch succeeded. 

I received Below Error When I started the patch, which says you need to have latest Optach in CRS HOME.

maldevsrv01:/u01/orasoft/patches/grid_psu: pbrun -l /u01/orasoft/opatch/OPatch/opatch auto /u01/orasoft/patches/grid_psu -oh /u01/app/crs

Executing /usr/bin/perl /u01/orasoft/opatch/OPatch/crs/patch112.pl -patchdir /u01/orasoft/patches -patchn grid_psu -oh /u01/app/crs -paramfile /u01/app/crs/crs/install/crsconfig_params
opatch auto log file location is /u01/orasoft/opatch/OPatch/crs/log/opatchauto2012-04-01_05-56-51.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/crs/crs/install/crsconfig_params
The opatch minimum version  check for patch /u01/orasoft/patches/grid_psu/9655006 failed  for /u01/app/crs
The opatch minimum version  check for patch /u01/orasoft/patches/grid_psu/9654983 failed  for /u01/app/crs
Opatch version check failed for oracle home  /u01/app/crs
Opatch version  check failed
update the opatch version for the failed homes and retry
——————————————————————————————————————-
 
In my case Opatch was already down loaded at /u01/orasoft/opatch/OPatch/opatch
Before I overwrite in CRS Home I am trying to backup old opatch:
 
maldevsrv01:/u01/app/crs: mv OPatch OPatch.old
mv: cannot rename OPatch to OPatch.old: Permission denied

Ooops!!! seems oracle OS user do not have Priv’s to rename or backup the existing Opatch folder in CRS Home. Instead I will remove all contents from /u01/app/crs/Opatch and copy back from downloaded location as below steps

cd  /u01/app/crs/OPatch
tar -cvf opatch_old_11.1.0.6.6.tar *
rm -r opatch opatch.pl opatch.ini emdpatch.pl docs jlib ocm opatchprereqs
ls -ltr
 
cd /u01/orasoft/opatch/OPatch    (This is the loc where my New opatch was downloaded and unzipped)
tar -cvf opatch_1120.tar *
 
Copy/move the above tar file to CRS/OPatch folder.
mv opatch_1120.tar /u01/app/crs/OPatch
tar -xvf opatch_1120.tar
 
Now Check the Version :
/u01/app/crs/OPatch/opatch version
OPatch Version: 11.2.0.1.9
OPatch succeeded. 

Now we have latest version of Opatch in CRS Home and good to proceed further.

4)      Check the VCS Resources Status as below , so that we can compare the same after patch is completed.

maldevsrv01:/opt/oracle: pbrun hastatus -sum
— SYSTEM STATE
— System               State                Frozen
A  maldevsrv01           RUNNING              0
A  maldevsrv02           RUNNING              0
— GROUP STATE
— Group           System               Probed     AutoDisabled    State
B  crs_grp         maldevsrv01           Y          N               ONLINE
B  crs_grp         maldevsrv02           Y          N               ONLINE
B  cvm             maldevsrv01           Y          N               ONLINE
B  cvm             maldevsrv02           Y          N               ONLINE
B  mnicb_grp       maldevsrv01           Y          N               ONLINE
B  mnicb_grp       maldevsrv02           Y          N               ONLINE
B  ora_listener_grp maldevsrv01           Y          N               ONLINE
B  ora_listener_grp maldevsrv02           Y          N               ONLINE
B  rac_dev_grp     maldevsrv01           Y          N               ONLINE
B  rac_dev_grp     maldevsrv02           Y          N               ONLINE
 
maldevsrv01:/opt/oracle: pbrun hagrp –dep
#Parent      Child      Relationship
crs_grp      cvm        online local firm
rac_dev_grp  crs_grp    online local firm
 
maldevsrv01:/opt/oracle: pbrun hares –state
#Resource          Attribute              System     Value
LISTENER_11        State                  maldevsrv01 ONLINE
LISTENER_11        State                  maldevsrv02 ONLINE
cvm_clus           State                  gmaldevsrv01 ONLINE
cvm_clus           State                  maldevsrv02 ONLINE
cvm_vxconfigd      State                 maldevsrv01 ONLINE
cvm_vxconfigd      State                  maldevsrv02 ONLINE
d041               State                  maldevsrv01 ONLINE
d041               State                  maldevsrv02 ONLINE
mnicb              State                  maldevsrv01 ONLINE
mnicb              State                  maldevsrv02 ONLINE
mnicb-phantom      State                 maldevsrv01 ONLINE
mnicb-phantom      State                  maldevsrv02 ONLINE
multi_priv         State                  maldevsrv01 ONLINE
multi_priv         State                  maldevsrv02 ONLINE
ocrvote_voldg      State                 maldevsrv01 ONLINE
ocrvote_voldg      State                  maldevsrv02 ONLINE
rac_dev_data01_mnt State                  maldevsrv01 ONLINE
rac_dev_data01_mnt State                  maldevsrv02 ONLINE
rac_dev_data_voldg State                  maldevsrv01 ONLINE
rac_dev_data_voldg State                 maldevsrv02 ONLINE
srvctl1_mnt        State                 maldevsrv01 ONLINE
srvctl1_mnt        State                  maldevsrv02 ONLINE
srvctl2_mnt        State                  maldevsrv01 ONLINE
srvctl2_mnt        State                 maldevsrv02 ONLINE
srvctl3_mnt        State                  maldevsrv01 ONLINE
srvctl3_mnt        State                  maldevsrv02 ONLINE
vxfsckd            State                  maldevsrv01 ONLINE
vxfsckd            State                  maldevsrv02 ONLINE 
 
maldevsrv01:/opt/oracle: pbrun hares -dep
#Group       Parent             Child
crs_grp      srvctl1_mnt        ocrvote_voldg
crs_grp      srvctl2_mnt        ocrvote_voldg
crs_grp      srvctl3_mnt        ocrvote_voldg
cvm          cvm_clus           cvm_vxconfigd
cvm          vxfsckd            cvm_clus
rac_dev_grp  d041               rac_dev_data01_mnt
rac_dev_grp  rac_dev_data01_mnt rac_dev_data_voldg 
 
maldevsrv01:/opt/oracle: pbrun hares -dep d041
#Group       Parent     Child
rac_dev_grp  d041       rac_dev_data01_mnt 

5)      Run Opatch auto:

which opatch
echo $ORACLE_HOME
ls -l /u01/orasoft/opatch/OPatch/ocm/ocm.rsp 
 
Check If patch already applied:
opatch lsinventory -detail -oh /u01/app/crs |grep 9655006
 
OR
 
opatch lsinventory -detail -oh /u01/app/crs -bugs_fixed |sed -n -e ‘/List of/,/—/p’;opatch lsinventory -detail -oh /u01/app/crs -bugs_fixed | grep -i ‘GI PSU’
 

Check If any Patch Conflicts exists:

opatch prereq CheckConflictAgainstOHWithDetail -oh /u01/app/crs -phBaseDir /u01/orasoft/patches/grid_psu/9655006

Run Patch now :

Make sure you provide Proper HOME.  Since we applying patch only to CRS,
I have provided the CRS HOME (/u01/app/crs) as –oh below.

 pbrun -l /u01/orasoft/opatch/OPatch/opatch auto /u01/orasoft/patches/grid_psu -oh /u01/app/crs

Snip output:
==========

maldevsrv01:/u01/orasoft/patches/grid_psu: pbrun -l /u01/orasoft/opatch/OPatch/opatch auto /u01/orasoft/patches/grid_psu -oh /u01/app/crs

Executing /usr/bin/perl /u01/orasoft/opatch/OPatch/crs/patch112.pl -patchdir /u01/orasoft/patches -patchn grid_psu -oh /u01/app/crs -paramfile /u01/app/crs/crs/install/crsconfig_params
opatch auto log file location is /u01/orasoft/opatch/OPatch/crs/log/opatchauto2012-04-01_07-03-58.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/crs/crs/install/crsconfig_params
OPatch  is bundled with OCM, Enter the absolute OCM response file path:
/u01/orasoft/opatch/OPatch/ocm/ocm.rsp
(Here it ask the location for the ocm file)
Unable to determine if /u01/app/crs is shared oracle home
Enter ‘yes’ if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no): yes    (Type yes)
Successfully unlock /u01/app/crs
patch /u01/orasoft/patches/grid_psu/9655006  apply successful for home  /u01/app/crs
patch /u01/orasoft/patches/grid_psu/9654983  apply successful for home  /u01/app/crs
CRS-4123: Oracle High Availability Services has been started.
 

Verify the Patch is applied.

opatch lsinventory -detail -oh /u01/app/crs |grep 9655006 

Check If CRS and DB have come up:
==============================

ps -ef |grep d.bin

ps -ef |grep pmon

ps -ef |grep tns

/u01/app/crs/bin/crsctl stat resource

/u01/app/crs/bin/crsctl check cluster -n maldevsrv01

Make sure all VCS resources are ONLINE use below command.
===============================================
pbrun hastatus -sum
pbrun hares -state
tail -f /var/VRTSvcs/log/engine_A.log
 
I have attached the log for which the patch was applied.

Click me for log file From Node 2:

For all other issues visit

http://learnwithme11g.wordpress.com/2011/05/05/applying-psu-patch-11-2-0-1-2-to-a-two-node-rac/

Advertisements

From → Oracle

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: