系统:CentOS7.9 问题描述:单实例安装GI,在执行/u01/app/grid/product/11.2.0/grid/root.sh脚本时,报错ohasd failed to start at/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl line 377,<ALERTLOG> line 4,如下所示: [root@leo etc]#/u01/app/grid/product/11.2.0/grid/root.sh Performing root user operation for Oracle11g The following environment variables areset as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/grid/product/11.2.0/grid Enter the full pathname of the local bindirectory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratabfile as needed by Database Configuration Assistant when adatabase is created Finished running generic part of rootscript. Now product-specific root actions will beperformed. Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params Creating trace directory LOCAL ADD MODE Creating OCR keys for user 'grid', privgrp'oinstall'.. Operation successful. LOCAL ONLY MODE Successfully accumulated necessary OCRkeys. Creating OCR keys for user 'root', privgrp'root'.. Operation successful. CRS-4664: Node leo successfully pinned. Adding Clusterware entries to inittab ohasd failed to start Failed to start the Clusterware. Last 20lines of the alert log follow: 2022-06-01 13:28:58.011: [client(6481)]CRS-2101:The OLR wasformatted using version 3. 2022-06-01 13:28:58.270: [client(6508)]CRS-1001:The OCR wasformatted using version 3. ohasdfailed to start at /u01/app/grid/product/11.2.0/grid/crs/install/roothas.plline 377, <ALERTLOG> line 4. /u01/app/grid/product/11.2.0/grid/perl/bin/perl-I/u01/app/grid/product/11.2.0/grid/perl/lib-I/u01/app/grid/product/11.2.0/grid/crs/install/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl execution failed
解决方案: 先执行/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl-deconfig -force -verbose命令,回退root.sh脚本 [root@leo etc]#/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl -deconfig -force-verbose Can't locate Env.pm in @INC (@INCcontains: /usr/local/lib64/perl5 /usr/local/share/perl5/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5/usr/share/perl5 . /u01/app/grid/product/11.2.0/grid/crs/install) at/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_lib.pm line 703. BEGIN failed--compilation aborted at/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_lib.pm line 703. Compilation failed in require at/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl line 166. BEGIN failed--compilation aborted at/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl line 166. 如上,回退root.sh脚本时,报错Can'tlocate Env.pm in @INC (@INC contains,该报错是由bug18650453导致的, 解决方案两个: a、补丁程序18650453:OL7: CLUSTERWARE ROOT SCRIPTS FAIL DUE TO: CAN'T LOCATE ENV.PM IN @INC b、使用gi中绝对路径perl,清空ocr配置和votingdisk 此处采用方案b. [root@leo ~]# /u01/app/grid/product/11.2.0/grid/perl/bin/perl /u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl-deconfig -force Using configuration parameter file:/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params CRS-4639: Could not contact Oracle HighAvailability Services CRS-4000: Command Stop failed, orcompleted with errors. CRS-4639: Could not contact Oracle HighAvailability Services CRS-4000: Command Delete failed, orcompleted with errors. CRS-4544: Unable to connect to OHAS CRS-4000: Command Stop failed, orcompleted with errors. Successfully deconfigured Oracle Restartstack
回到最初问题,当执行root.sh脚本出现“AddingClusterware entries to inittab”字样时,需在另一个session,root用户执行dd if=/var/tmp/.oracle/npohasdof=/dev/null bs=1024 count=1命令 实际操作过程如下: [root@leo ~]#/u01/app/grid/product/11.2.0/grid/root.sh Performing root user operation for Oracle11g The following environment variables areset as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/grid/product/11.2.0/grid Enter the full pathname of the local bindirectory: [/usr/local/bin]: The contents of "dbhome" havenot changed. No need to overwrite. The contents of "oraenv" havenot changed. No need to overwrite. The contents of "coraenv" havenot changed. No need to overwrite. Entries will be added to the /etc/oratabfile as needed by Database Configuration Assistant when adatabase is created Finished running generic part of rootscript. Now product-specific root actions will beperformed. Using configuration parameter file:/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params LOCAL ADD MODE Creating OCR keys for user 'grid', privgrp'oinstall'.. Operation successful. LOCAL ONLY MODE Successfully accumulated necessary OCRkeys. Creating OCR keys for user 'root', privgrp'root'.. Operation successful. CRS-4664: Node leo successfully pinned. AddingClusterware entries to inittab (说明:出现该提示后,立即在另一个session用root用户执行ddif=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1命令) leo 2022/06/01 13:57:50 /u01/app/grid/product/11.2.0/grid/cdata/leo/backup_20220601_135750.olr Successfully configured Oracle GridInfrastructure for a Standalone Server [root@leo ~]# ddif=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
如上所示,root.sh成功执行.
|