比较BT的一个one-off patch
本站文章除注明转载外,均为本站原创: 转载自love wife love life —Roger的Oracle/MySQL/PostgreSQL数据恢复博客
本文链接地址: 比较BT的一个one-off patch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
今天给某客户(买票难的问题,你们懂的)打一个one-off patch(11814167),遇到几个小问题,其中有件怪事, 跟熊哥讨论了一下,他也感觉确实有点奇怪,按理说不应该啊。 首先来看下install patch(11814167)的基本步骤(大家可以参考readme): 1. 首先检查环境,使用了哪种存储方式?opatch 版本,当前集群状态?文件系统空间? 2. 解压patch以及update opatch(readme提到需要11.2.0.1.5以上版本的opatch); unzip p11814167_112010_AIX64-5L.zip unzip p6880880_112000_AIX64-5L.zip -d /grid/11.2 unzip p6880880_112000_AIX64-5L.zip -d /oracle/app/11.2 cluster中所有节点都需要更新. 3. 检查当前opatch信息并保存; ./opatch lsinventory -detail -oh /grid/11.2 ./opatch lsinventory -detail -oh /oracle/app/11.2 4. 停止所有资源(包括crs,db以及em等等) /oracle/app/11.2/bin/srvctl stop home -o /oracle/app/11.2 -s /tmp/morapp1.log -n morapp1-19 /oracle/app/11.2/bin/srvctl stop home -o /oracle/app/11.2 -s /tmp/morapp2.log -n morapp1-19 5. 以root用户执行如下脚本: # <GI_HOME>/crs/install/rootcrs.pl -unlock --用法 node1: /grid/11.2/crs/install/rootcrs.pl -unlock node2: /grid/11.2/crs/install/rootcrs.pl -unlock 6. patch for GI home user by GI home owner: node1: /grid/11.2/OPatch/opatch napply -oh /grid/11.2 -local /oradata1/patch/11814167 node2: /grid/11.2/OPatch/opatch napply -oh /grid/11.2 -local /oradata1/patch/11814167 7. Run the pre script for DB component of the patch user by ORACLE_HOME owner node1: /oradata1/patch/11814167/custom/server/11814167/custom/scripts/prepatch.sh -dbhome /oracle/app/11.2 node2: /oradata1/patch/11814167/custom/server/11814167/custom/scripts/prepatch.sh -dbhome /oracle/app/11.2 8. Apply the patch to DB Home : As the database home owner execute: node1: /oracle/app/11.2/OPatch/opatch napply -oh /oracle/app/11.2 -local /oradata1/patch/11814167/custom/server/11814167 node2: /oracle/app/11.2/OPatch/opatch napply -oh /oracle/app/11.2 -local /oradata1/patch/11814167/custom/server/11814167 9. Run the post script for DB component of the patch As the database home owner execute node1: /oradata1/patch/11814167/custom/server/11814167/custom/scripts/postpatch.sh -dbhome /oracle/app/11.2 node2: /oradata1/patch/11814167/custom/server/11814167/custom/scripts/postpatch.sh -dbhome /oracle/app/11.2 10. Run the post script by root. /grid/11.2/rdbms/install/rootadd_rdbms.sh /grid/11.2/crs/install/rootcrs.pl -patch cluster中所有节点顺序执行。 11. Start the GI managed resources that were earlier running from DB homes user by oracle_home owner. node1: /oracle/app/11.2/bin/srvctl start home -o /oracle/app/11.2 -s /tmp/morapp1.log -n morapp1-19 node2: /oracle/app/11.2/bin/srvctl start home -o /oracle/app/11.2 -s /tmp/morapp1.log -n morapp2-19 12. 检查clsuter是否正常正常,可以使用crs_stat -t查询当前cluster资源使用情况。 如果大家看过readme就知道,oracle其实推荐的方式不是这种,是采取opatch auto的方式, 但是我今天在开始使用这种方式的时候,发现了这种其实不好好,所谓auto的目的其实是将一系列的操作 集成到一起了,虽然这样大大的简化了patch的工作量,但是这整个过程确显得跟黑匣子一样,不可控。 最开始我尝试了一下,发现不太好使,其中遇到了一个小错误,如下:<BR> [Aug 12, 2011 10:40:45 AM] OPatch continues with these patches: 11814167 [Aug 12, 2011 10:40:45 AM] Do you want to proceed? [y|n] [Aug 12, 2011 10:40:45 AM] Start to wait for user-input at Fri Aug 12 10:40:45 CST 2011 [Aug 12, 2011 10:40:57 AM] Finish waiting for user-input at Fri Aug 12 10:40:57 CST 2011 [Aug 12, 2011 10:40:57 AM] User Responded with: Y [Aug 12, 2011 10:40:57 AM] Running prerequisite checks... [Aug 12, 2011 10:40:57 AM] Space Needed : 22327897636 [Aug 12, 2011 10:40:57 AM] <strong><span style="color: #ff0000">Required amount of space(22327897636) is not available</span></strong>. [Aug 12, 2011 10:40:57 AM] Prerequisite check "CheckSystemSpace" failed. The details are: Required amount of space(22327897636) is not available. [Aug 12, 2011 10:40:57 AM] OUI-67073:UtilSession failed: Prerequisite check "CheckSystemSpace" failed. [Aug 12, 2011 10:40:57 AM] Finishing UtilSession at Fri Aug 12 10:40:57 CST 2011 <span style="color: #0000ff"><strong>很明显,从上面的意思来看是说当前的/grid目录太小了,剩余空间不足,大家注意这里的空间需求大小。</strong></span> <span style="color: #0000ff"><strong>22327897636/1024/1024/1024=20.79G,很大的一个数字吧,当时客户也难以理解,怎么打个one-off patch</strong></span> <span style="color: #0000ff"><strong>还需要这么大的空间呢,确实有点让人费解。</strong></span> <span style="color: #0000ff"><strong>这里简单的说明一下,该patch虽然说是one-off patch,其实可以看出一个bundle了,基本上把11.2.0.1的crs组件</strong></span> <span style="color: #0000ff"><strong>都更新了,所以变动非常大,以至于下载这个patch需要993m大小。</strong></span> <span style="color: #0000ff"><strong>说到这里,我觉得这里就是readme的一个失误,因为里面没有提到关于空间的要求。</strong></span> 最后我没有使用patch auto的方式,而是采用了传统的方式,该readme文档中也有详细的过程说明, 下面是在对2节点GI home patch的时候遇到的错误,当时这其实是我的失误,没有认真的看readme文档。 morapp2-19:/grid/11.2/bin$ /grid/11.2/OPatch/opatch napply -oh /grid/11.2 -local /oradata1/patch/11814167 Invoking OPatch 11.2.0.1.6 Oracle Interim Patch Installer version 11.2.0.1.6 Copyright (c) 2011, Oracle Corporation. All rights reserved. UTIL session Oracle Home : /grid/11.2 Central Inventory : /oracle/oraInventory from : /etc/oraInst.loc OPatch version : 11.2.0.1.6 OUI version : 11.2.0.1.0 Log file location : /grid/11.2/cfgtoollogs/opatch/opatch2011-08-12_11-24-50AM.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 11814167 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. 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. Visit <a href="http://www.oracle.com/support/policies.html">http://www.oracle.com/support/policies.html</a> for details. Email address/User Name: 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]: yes Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/grid/11.2') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '11814167' to OH '/grid/11.2' Patching component oracle.crs, 11.2.0.1.0... Copy failed from '/oradata1/patch/11814167/files/lib/libclsra11.so' to '/grid/11.2/lib/libclsra11.so'... Please verify all applications associated with the Oracle Home '/grid/11.2' are shut down. If this is AIX, please perform solution documented in Note 739963.1 on <a href="https://myoraclesupport.oracle.com/">https://myoraclesupport.oracle.com</a>. Do you want to retry copying the file? [y|n] y User Responded with: Y Retry copying the file to '/grid/11.2/lib/libclsra11.so'. Copy failed from '/oradata1/patch/11814167/files/lib/libdbcfg11.so' to '/grid/11.2/lib/libdbcfg11.so'... Please verify all applications associated with the Oracle Home '/grid/11.2' are shut down. If this is AIX, please perform solution documented in Note 739963.1 on <a href="https://myoraclesupport.oracle.com/">https://myoraclesupport.oracle.com</a>. Do you want to retry copying the file? [y|n] y User Responded with: Y Retry copying the file to '/grid/11.2/lib/libdbcfg11.so'. The following actions have failed: Copy failed from '/oradata1/patch/11814167/files/lib/libclsra11.so' to '/grid/11.2/lib/libclsra11.so'... Do you want to proceed? [y|n] n User Responded with: N ApplySession failed in system modification phase... 'ApplySession::apply failed: Copy failed from '/oradata1/patch/11814167/files/lib/libclsra11.so' to '/grid/11.2/lib/libclsra11.so'... ' Restoring "/grid/11.2" to the state prior to running NApply... OPatch failed to restore the files from backup area. Not running "make". NApply was not able to restore the home. Please invoke the following scripts: - restore.[sh,bat] - make.txt (Unix only) to restore the ORACLE_HOME. They are located under "/grid/11.2/.patch_storage/NApply/2011-08-12_11-24-50AM" UtilSession failed: ApplySession failed in system modification phase... 'ApplySession::apply failed: Copy failed from '/oradata1/patch/11814167/files/lib/libclsra11.so' to '/grid/11.2/lib/libclsra11.so'... ' Log file location: /grid/11.2/cfgtoollogs/opatch/opatch2011-08-12_11-24-50AM.log OPatch failed with error code 73 morapp2-19:/grid/11.2/bin$ 在该readme的最后明确提到了Special Instruction for AIX,遇到上诉错误的时候,可以先使用下面的方式来避免。<BR> genld -l | grep /grid/11.2 genkld | grep /grid/11.2 executed by root: slibclean <span style="color: #0000ff">这个属于失误,不多说了,下面来看在对$ORACLE_HOME patch的时候遇到的一件怪事.</span><BR> morapp1-19:/oracle$ /oracle/app/11.2/OPatch/opatch napply -oh /oracle/app/11.2 -local /oradata1/patch/11814167/custom/server/11814167 Invoking OPatch 11.2.0.1.6 Oracle Interim Patch Installer version 11.2.0.1.6 Copyright (c) 2011, Oracle Corporation. All rights reserved. UTIL session Oracle Home : /oracle/app/11.2 Central Inventory : /oracle/oraInventory from : /etc/oraInst.loc OPatch version : 11.2.0.1.6 OUI version : 11.2.0.1.0 Log file location : /oracle/app/11.2/cfgtoollogs/opatch/opatch2011-08-12_12-34-32PM.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 11814167 Do you want to proceed? [y|n] y User Responded with: Y Prerequisite check "CheckApplicable" failed. The details are: Patch 11814167: <span style="color: #0000ff">Copy Action: Source File "/oradata1/patch/11814167/custom/server/11814167/files/bin/rawutl" does not exists or is not readable</span> <span style="color: #000000">'oracle.rdbms, 11.2.0.1.0': <input type="hidden" Cannot copy file from 'rawutl' >to '/oracle/app/11.2/bin/rawutl'</span> <span style="color: #0000ff">Copy Action: Source File "/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/clsrwrap" does not exists or is not readable</span> <span style="color: #000000">'oracle.rdbms, 11.2.0.1.0': Cannot copy file from 'clsrwrap' to '/oracle/app/11.2/crs/sbs/clsrwrap'</span> <span style="color: #0000ff">Copy Action: Source File "/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/diagcollection.sh" does not exists or is not readable</span> <span style="color: #000000">'oracle.rdbms, 11.2.0.1.0': Cannot copy file from 'diagcollection.sh' to '/oracle/app/11.2/crs/sbs/diagcollection.sh'</span> <span style="color: #0000ff">Copy Action: Source File "/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/localconfig" does not exists or is not readable</span> <span style="color: #000000">'oracle.rdbms, 11.2.0.1.0': Cannot copy file from 'localconfig' to '/oracle/app/11.2/crs/sbs/localconfig'</span> <span style="color: #0000ff">Copy Action: Source File "/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/srvctl" does not exists or is not readable</span> <span style="color: #000000">'oracle.rdbms, 11.2.0.1.0': Cannot copy file from 'srvctl' to '/oracle/app/11.2/crs/sbs/srvctl'</span> <span style="color: #0000ff">UtilSession failed: Prerequisite check "CheckApplicable" failed.</span> Log file location: /oracle/app/11.2/cfgtoollogs/opatch/opatch2011-08-12_12-34-32PM.log OPatch failed with error code 73 <strong><span style="color: #0000ff">怎么会包这个patch中文件需要的文件不存在呢?难道说客户下载的patch不全吗?</span></strong> <strong><span style="color: #0000ff">我解压开自己笔记本上下载的patch,到该目录下看了一下,发现居然也不存在,如下是今天的情况:</span></strong> morapp1-19:/oradata1$ ls -ltr /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/diagcollection.sh /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/diagcollection.sh not found morapp1-19:/oradata1$ ls -ltr /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/diagcollection.sh* -rw-r--r-- 1 oracle dba 486 May 06 23:28 /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/diagcollection.sh.sbs morapp1-19:/oradata1$ ls -ltr /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/localconfig* -rwxr-xr-x 1 oracle dba 23825 May 06 23:28 /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/localconfig.sbs morapp1-19:/oradata1$ ls -ltr /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/srvctl* -rwxr-xr-x 1 oracle dba 8073 May 06 23:28 /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs/srvctl.sbs morapp1-19:/oradata1$ ls -ltr /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs* morapp1-19:/oradata1$ ls -ltr /oradata1/patch/11814167/custom/server/11814167/files/crs/sbs* total 70 -rwxr-xr-x 1 oracle dba 8073 May 06 23:28 srvctl.sbs -rwxr-xr-x 1 oracle dba 23825 May 06 23:28 localconfig.sbs -rw-r--r-- 1 oracle dba 486 May 06 23:28 diagcollection.sh.sbs -rwxr-xr-x 1 oracle dba 1498 May 06 23:28 clsrwrap.sbs morapp1-19:/oradata1$ <span style="color: #ff0000"><strong>上面我们可以清楚的看到,所需要的rawutl文件不存在,其他4个文件的文件名不对,patch里面的文件多了一个文件后缀。</strong></span> <span style="color: #ff0000"><strong>这是怎么回事呢?怪哉了,首先我将该如上4个文件进行重命名,如下操作:</strong></span><BR> morapp1-19:/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs# mv srvctl.sbs srvctl morapp1-19:/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs# mv localconfig.sbs localconfig morapp1-19:/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs# mv diagcollection.sh.sbs diagcollection.sh morapp1-19:/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs# mv clsrwrap.sbs clsrwrap morapp1-19:/oradata1/patch/11814167/custom/server/11814167/files/crs/sbs# ls -ltr total 70 -rwxr-xr-x 1 oracle dba 8073 May 06 23:28 srvctl -rwxr-xr-x 1 oracle dba 23825 May 06 23:28 localconfig -rw-r--r-- 1 oracle dba 486 May 06 23:28 diagcollection.sh -rwxr-xr-x 1 oracle dba 1498 May 06 23:28 clsrwrap 由于这是在patch for oracle home时遇到的问题,于是进行如下查找: morapp1-19:/$ find ./oracle/app -name rawutl ./oracle/app/11.2/bin/rawutl 发现$ORACLE_HOME下是有这个文件的,我于是将该文件cp到patch目录中。 morapp1-19:/$ cp /oracle/app/11.2/bin/rawutl /oradata1/patch/11814167/custom/server/11814167/files/bin/rawutl morapp1-19:/$ 最后再次尝试进行patch for $ORACLE_HOME,发现一切正常。 morapp1-19:/oradata1$ /oracle/app/11.2/OPatch/opatch napply -oh /oracle/app/11.2 -local /oradata1/patch/11814167/custom/server/11814167 Invoking OPatch 11.2.0.1.6 Oracle Interim Patch Installer version 11.2.0.1.6 Copyright (c) 2011, Oracle Corporation. All rights reserved. UTIL session Oracle Home : /oracle/app/11.2 Central Inventory : /oracle/oraInventory from : /etc/oraInst.loc OPatch version : 11.2.0.1.6 OUI version : 11.2.0.1.0 Log file location : /oracle/app/11.2/cfgtoollogs/opatch/opatch2011-08-12_12-58-27PM.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 11814167 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. 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. Visit <a href="http://www.oracle.com/support/policies.html">http://www.oracle.com/support/policies.html</a> for details. Email address/User Name: 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 Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/oracle/app/11.2') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '11814167' to OH '/oracle/app/11.2' Patching component oracle.rdbms, 11.2.0.1.0... Patches 11814167 successfully applied. Log file location: /oracle/app/11.2/cfgtoollogs/opatch/opatch2011-08-12_12-58-27PM.log OPatch succeeded. morapp1-19:/oradata1$ 前面提到的怪事,其实就是为啥patch中的文件少了,而且名称不对? 怪异啊 怪异 最近都遇到怪异的事情 tnnd 虽然感觉这个这次one-off patch最后是ok了, 不过不保证以后会不会出啥问题,不过我感觉应该问题不大。 |
6 Responses to “比较BT的一个one-off patch”
Roger 的blog 越来越精彩了。
11.2的BUG太多了,GI的patch打起来太麻烦。“买票难”的系统是这样啊!怕是以后票都卖不出去了。。。
哈哈 不过11.2 确实有些麻烦。。。
请问这里的bug11814167是因为什么原因而打的?我们也遇到了要打这个bug的事~~~谢谢,很焦急的等待~~~
我的联系方式:
maohaihua92@126.com
qq:330864802
谢谢,很着急,请联系下我好么?
[Aug 12, 2011 10:40:45 AM] OPatch continues with these patches: 11814167[Aug 12, 2011 10:40:45 AM] Do you want to proceed? [y|n][Aug 12, 2011 10:40:45 AM] Start to wait for user-input at Fri Aug 12 10:40:45 CST 2011[Aug 12, 2011 10:40:57 AM] Finish waiting for user-input at Fri Aug 12 10:40:57 CST 2011[Aug 12, 2011 10:40:57 AM] User Responded with: Y[Aug 12, 2011 10:40:57 AM] Running prerequisite checks…[Aug 12, 2011 10:40:57 AM] Space Needed : 22327897636[Aug 12, 2011 10:40:57 AM] Required amount of space(22327897636) is not available.[Aug 12, 2011 10:40:57 AM] Prerequisite check “CheckSystemSpace” failed. The details are: Required amount of space(22327897636) is not available.[Aug 12, 2011 10:40:57 AM] OUI-67073:UtilSession failed: Prerequisite check “CheckSystemSpace” failed.[Aug 12, 2011 10:40:57 AM] Finishing UtilSession at Fri Aug 12 10:40:57 CST 2011这就是一个未公开的BUG,unpublished bug 9780505
,详见http://space.itpub.net/9664900/viewspace-720254:
【Oracle升级】AIX 11g RAC11.2.0.3.0安装PSU遭遇unpublished bug9780505
Leave a Reply
You must be logged in to post a comment.