AIX7环境上一次艰难的Oracle打补丁经历

系统环境

AIX :7200-05-03-2148 Oracle:11.2.0.4 PSU: 11.2.0.4.201020(31718723) perl:5.28

问题一:AUTO patch

#/u01/app/11.2.0/grid/OPatch/opatch auto /tmp/31718723 错误信息如下:匹配mos 2516761.1 进行下一步relink操作

出师未捷,做relink,失败。

问题二:手工打补丁失败

执行perl rootcrs.pl -unlock出现报错。

复制代码
/usr/opt/perl5/lib/5.28.1/aix-thread-multi/POSIX.pm line 185.
 Unimplemented: POSIX::tmpnam() at crsconfig_lib.pm line 712.
 BEGIN failed--compilation aborted at crsconfig_lib.pm line 712.
 Compilation failed in require at ./rootcrs.pl line 305.

根据MOS文档Rootcrs.pl -Unlock Fails With Error Unimplemented: POSIX::tmpnam(): Use File::Temp Instead At /usr/perl5/5.26/lib/sun (文档 ID 2697590.1) 中说明在perl 5.22版本之后tmpnam() interface以及被删除,导致打补丁报错。

MOS解决办法 根据mos的建议,需要安装补丁27212837,不过由于也需要调用perl,也会出现/usr/opt/perl5/lib/5.28.1/aix-thread-multi/POSIX.pm line 185.的报错,出现了一个死循环,那么需要首先解决perl的问题。

复制代码
Apply patch 27212837
Download Link: https://updates.oracle.com/download/27212837.html
Request for patch if not available for particular platform/release.	

临时解决: 用File::Temp替换qw(tmpnam),包括crsgpnp.pmcrsinstall.pmcrsupgrade.pm、s_crsutils.pm,不过试了后发现crs无法启动。

复制代码
use File::Temp in the scripts instead of POSIX::tmpnam().
Replace use POSIX qw(tmpnam); with use File::Temp; in all the files, Then re-try
These are the files which have pragma use POSIX qw(tmpnam);
crsgpnp.pm
crsinstall.pm
crsupgrade.pm
s_crsutils.pm

问题三:降级perl版本无效

IBM厂商要来5.10版本的perl尝试手动应用补丁,发现补丁程序并没有使用我们指定的perl版本。 然后我们也尝试用oracle自带的perl,写入环境变量,发现报错一样,也就是环境变量也没生效。 ++注:从小机厂商处了解到perl脚本因依赖比较多,无法直接卸载,也无降级一说。但是不同版本的perl脚本可以共存。没有影响。我们的例子中原本高版本的perl脚本没动。重新装了一个低版本5.10的perl。++

另辟蹊径:

既然环境变量不管用,那就使用oracle自带的perl并且强制写死路径,绕过操作系统的perl。

复制代码
/u01/app/11.2/grid/perl/bin/perl /u01/app/11.2.0//grid/crs/install/rootcrs.pl -unlock

rootcrs.pl -unlock这一步通过。

问题四:rootcrs.pl -patch报错

在最后一步rootcrs.pl -patch的时候报错install/crsconfig_lib.pm line 11821。

查看install/crsconfig_lib.pm 的11821代码,提示集群启动失败。

ASM没有启动成功,进程状态为Abnormal Termination,CLEANING

ASM的alert日志报错SMR is corrupted. Shut down and restart the instance to recreate it。

显然这是触发了BUG:AIX:11.2.0.4 :ASM&DB Instance Not Starting Up Due to SMR Corrupt After OCT 2020 PSU (文档 ID 2732507.1)

复制代码
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
IBM AIX on POWER Systems (32-bit)
IBM AIX on POWER Systems (64-bit)
SYMPTOMS
The following errors reported in the ASM&DB alert logs while starting the ASM/DB instance after applying the OCT 2020 PSU.

ASM alert log:

Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Initial number of CPU is 32

Autotune of undo retention is turned on.

IMODE=BR
ILAT =0
LICENSE_MAX_USERS = 0
SYS auditing is disabled
NOTE: Volume support enabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option.
ORACLE_HOME = <grid home>
System name: AIX
Node name: <node>
Release: 1
Version: 7
Machine: <Machine ID>
Using parameter settings in server-side spfile +DATA01/asm/asmparameterfile/registry.253.801309187
System parameters with non-default values:
large_pool_size = 12M
instance_type = "asm"
remote_login_passwordfile= "EXCLUSIVE"
asm_diskgroups = "FRA"
asm_diskgroups = "DATA01"
asm_power_limit = 1
diagnostic_dest = "<oracle base>"
Fri Nov 06 00:59:39 2020
WARNING: process PMON (ospid: 27132378) was unable to attach SMR.
SMR is corrupted. Shut down and restart the instance to recreate it.
PMON started with pid=2, OS id=27132378
Fri Nov 06 00:59:39 2020
WARNING: process PSP0 (ospid: 20512830) was unable to attach SMR.
SMR is corrupted. Shut down and restart the instance to recreate it.

Instance terminated by USER, pid = 20512820
Fri Nov 06 00:59:39 2020
Instance shutdown complete

在 AIX7 中应用 2020 年 10 月 DBPSU 后,SMR 文件不断损坏导致实例不能正常启动。

复制代码
BUG 32123313 - SMR FILE KEEPS GETTING CORRUPTED AFTER APPLYING OCT 2020 DBPSU IN AIX7
Bug 32109594 - ASM IS UNABLE TO START WITH SMR CORRUPTED ERROR POST OCT 2020 PSU APPLY

官方建议Download and apply the patch for bug 32109594 to GI/RDBMS homes.

复制代码
SOLUTION
Download and apply the patch for bug 32109594 to GI/RDBMS homes. In case the patch doesn't exist for your version, contact Oracle Support for the patch.

但是32109594是扩展服务,需要收费,很多客户没有权限下载。

解决办法:

其实有个变通的方法,既然官方说安装OCT 2020 DBPSU IN AIX7有问题,那我们我们尝试下安装上一个psu版本 JUL2020 (11.2.0.4.200714)。

安装成功。

作者介绍:云和恩墨资深Oracle dba,专注于数据库运维、架构和行业发展,有12年左右的金融、保险、政府、地税、运营商等业务关键型系统的运维经验,曾担任公司异常恢复东区接口人,负责紧急异常恢复工作,技术二线专家。目前负责PG、openGauss/MogDB运维、国产化MogDB数据库的推广工作。

本文由mdnice多平台发布

相关推荐
码农习箫录4 小时前
吹箫笔记第 12 篇:把「情绪控制」当成一次资源调度
程序人生·生活
涵美女程序猿2 天前
ChatCut online 剪 CI 流水线复盘录屏:提交、日志与修复验证怎样对应
程序人生·电脑
政企项目老覃2 天前
边缘 AI 推理部署:安防零售场景下的模型裁剪与端侧落地实践
人工智能·程序人生·算法·性能优化·vllm
郝学胜-神的一滴2 天前
C++20模板元编程 04:变量模板 别名模板与模板Lambda实战
服务器·开发语言·数据结构·c++·程序人生
可爱系程序猿2 天前
libeay32.dll 入口点错误排查:旧版 OpenSSL 依赖、PATH 顺序与程序位数
程序人生·电脑
可爱系程序猿2 天前
Windows 11 PrintIsolationHost.exe 崩溃后无法打印:驱动隔离、事件日志与队列引用排查
程序人生·电脑
这个DBA有点耶2 天前
异构数据集成方案:跨平台同步的完整指南与工具选型(含实测)
数据库·sql·程序人生·架构·数据库架构·dba
政企项目老覃2 天前
批流一体架构演进:数据中台实时化改造的落地复盘
程序人生·数据分析·自动化
湘-枫叶情缘3 天前
为什么你通过AI学了很多,却感觉自己没变强? ——从“知识输入”到“能力形成”的认知转化工程
人工智能·程序人生
可爱系程序猿4 天前
WSD 打印机时好时坏:从发现服务、地址变化到 Standard TCP/IP 端口的迁移记录
网络·网络协议·tcp/ip·程序人生·电脑