今天升級Oracle Rac 一個11.2.0.4.0 到 11.2.0.4.1
系統為:HP-UX 11.31 IA64
首先的語句為:
./opatch auto /oracle/software/11.2.0.4.1 -oh /oracle/app/oracle/product/11.2.0/dbhome_1,/oracle/app/grid -ocmrf ocm.rsp
同時對ORACLE_HOME,GI_HOME同時升級
對ORACLE_HOME的升級,成功了。
但是對GI_HOME升級,卻報了failed!
首先懷疑 補丁目錄以及其所屬檔案的屬主,屬組 是否是 grid:oinstall ,檢查結果卻是一切正常
很奇怪,再次單獨對GI_HOME進行升級
./opatch auto /oracle/software/11.2.0.4.1 -oh /oracle/app/grid -ocmrf ocm.rsp
之後報錯ERROR: This patch is not applicable to GI home.
從字面理解,我瞬間傻了,我之前對RHEL系統操作的時候,是可以的呀,難道對HP-UX有什麼特別設定麼?
而且11gR2的PSU(不再分ORACLE_HOME的PSU,以及GI的PSU)只有一個,對GI和ORACLE目錄都適用
檢索metalink。發現了一篇文件 1580746.1
SYMPTOMS
Opatch failed with the following error:
The patch is not applicable for /opt/oracle/app/oracle/product/11.2.0/grid_2
patch /var/opt/data/patch/16619898 apply failed for home /opt/oracle/app/oracle/product/11.2.0/grid_2
The /opt/oracle/app/oracle/product/11.2.0/grid_2 is GI_HOME.
The same error can occur when a patch is getting applied to the RDBMS_HOME. The error message will point to the RDBMS_HOME in that case.
CAUSE
The opatch log shows
[Aug 30, 2013 11:21:37 AM] OPatch was not able to create .patch_storage directory
Unable to get Environent variables for Stand Alone home
[Aug 30, 2013 11:21:37 AM] Please delete .patch_storage directory ONLY IF NO PATCH IS APPLIED
This is because OPatch was not able to delete this directory which
was only created to run script for getting environment variables
No manual deletion may result in OPatch wrongly detecting irregular inventory for future invocation.
The same opatch log also shows the following error after above error:
[Aug 30, 2013 11:21:37 AM] /opt//oracle/app/oracle/product/11.2.0/grid_2/OPatch/jlib/etc/config path does not exist or is not a directory
[Aug 30, 2013 11:21:37 AM] OUI-67075:Failed to load the patch object. Possible causes are:
The specified path is not an interim Patch shiphome
Meta-data files are missing from the patch area
Patch location = /opt/oracle/app/oracle/product/11.2.0/grid_2/OPatch/jlib
Details = Input metadata files are missing.
[Aug 30, 2013 11:21:37 AM] Stack Description: java.lang.RuntimeException: Patch Location "/opt//oracle/app/oracle/product/11.2.0/grid_2/OPatch/jlib" doesn't point to a valid patch area.
SOLUTION
Check GI_HOME/.patch_storage directory or ORACLE_HOME/.patch_storage directory.
1) if the patch is getting applied to RDBMS_HOME, make sure ORACLE_HOME/.patch_storage directory is readable, writable, and accessible by the user who is applying the patch
2) if the patch is getting applied to GRID_HOME, make sure GI_HOME/.patch_storage directory is owned by the owner of GI HOME
我檢視兩個目錄的.patch_storage
發現許可權都為drwx------ ,說明 除了屬主以外,其他任何人都不能對這個目錄進行操作。
而Opatch auto 卻是使用root 賬戶來執行的,我抱著試試的想法
對目錄的許可權進行了修改(ORACLE_HOME,GI_HOME下的這個目錄都修改了)
chmod -R 777 .patch_storage
之後再次執行./opatch auto /oracle/software/11.2.0.4.1 -oh /oracle/app/grid -ocmrf ocm.rsp
結果為:
Stopping CRS... Stopped CRS successfullypatch /oracle/software/11.2.0.4.1/17478514 apply successful for home /oracle/app/grid Starting CRS... CRS-4123: Oracle High Availability Services has been started.opatch auto succeeded. #