基于IP SAN的Oracle 11gR2 RAC构建(四)

目录

  • 安装前准备工作
  • 安装GI软件
  • 配置GI
  • root.sh脚本调试

GI的安装

我们选择的版本是Oracle Grid Infrastructure 11g Release 2 (11.2.0.3.0) for Linux x86-64
下载,解压完毕,通过VMWare的共享实现对安装文件的访问。

[grid@racnode1 grid]$ cd /mnt/hgfs/grid/
[grid@racnode1 grid]$ pwd
/mnt/hgfs/grid
[grid@racnode1 grid]$ ls
doc  install  readme.html  response  rpm  runcluvfy.sh  runInstaller  sshsetup  stage  welcome.html

切换root用户,先安装cvuqdisk包。

[grid@racnode1 rpm]$ su
Password: 
[root@racnode1 rpm]# rpm -ivh ./cvuqdisk-1.0.9-1.rpm 
Preparing...                          ################################# [100%]
        file /usr/sbin/cvuqdisk from install of cvuqdisk-1.0.9-1.x86_64 conflicts with file from package cvuqdisk-1.0.7-1.x86_64

安装前准备工作:

安装前,我们先进行集群安装前的检查工作。执行脚本runcluvfy.sh.

[grid@racnode1 grid]$ ./runcluvfy.sh stage -pre crsinst -n racnode1,racnode2 -fixup -verbose

检查完,有几处有提示的。

  • shmmax配置偏小。
Check: Kernel parameter for "shmmax"
  Node Name         Current       Configured    Required      Status        Comment
  ----------------  ------------  ------------  ------------  ------------  ------------
  racnode2          536870912     536870912     892413952     failed        Current value too low. Configured value too low.
  racnode1          536870912     536870912     892413952     failed        Current value too low. Configured value too low.
Result: Kernel parameter check failed for "shmmax"

修改 /etc/sysctl.conf中的kernel.shmmax为推荐值。

  • -elfutils-libelf-devel安装了x86_64和 i686两个包。
Check: Package existence for "elfutils-libelf-devel"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  racnode2      elfutils-libelf-devel-0.172-2.el7  elfutils-libelf-devel-0.97  passed
  racnode1      elfutils-libelf-devel-0.172-2.el7  elfutils-libelf-devel-0.97  passed

WARNING:
PRVF-7584 : Multiple versions of package "elfutils-libelf-devel" found on node racnode1: elfutils-libelf-devel(x86_64)-0.172-2.el7,elfutils-libelf-devel(i686)-0.172-2.el7
Result: Package existence check passed for "elfutils-libelf-devel"

这个我们可以卸载一个i686的包。不管它也可以。

[root@racnode1 ~]# rpm -qa |grep elfutils-libelf-devel
elfutils-libelf-devel-0.172-2.el7.x86_64
elfutils-libelf-devel-0.172-2.el7.i686
[root@racnode1 ~]# rpm -e elfutils-libelf-devel-0.172-2.el7.i686
[root@racnode1 ~]# rpm -qa |grep elfutils-libelf-devel
elfutils-libelf-devel-0.172-2.el7.x86_64
  • pdksh没有安装。
Check: Package existence for "pdksh"
  Node Name     Available                 Required                  Status
  ------------  ------------------------  ------------------------  ----------
  racnode2      missing                   pdksh-5.2.14              failed
  racnode1      missing                   pdksh-5.2.14              failed
Result: Package existence check failed for "pdksh"

OL6和 OL7 都没有pdksh了。我们去OL5下载一个安装上。

[root@racnode1 ~]# wget http://yum.oracle.com/repo/OracleLinux/OL5/latest/x86_64                                                       /getPackage/pdksh-5.2.14-37.el5_8.1.x86_64.rpm
--2019-06-07 22:04:14--  http://yum.oracle.com/repo/OracleLinux/OL5/latest/x86_6                                                       4/getPackage/pdksh-5.2.14-37.el5_8.1.x86_64.rpm
Resolving yum.oracle.com (yum.oracle.com)... 23.1.166.131
Connecting to yum.oracle.com (yum.oracle.com)|23.1.166.131|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 210877 (206K) [application/x-rpm]
Saving to: ‘pdksh-5.2.14-37.el5_8.1.x86_64.rpm’

100%[======================================>] 210,877      131KB/s   in 1.6s

2019-06-07 22:04:18 (131 KB/s) - ‘pdksh-5.2.14-37.el5_8.1.x86_64.rpm’ saved [210                                                       877/210877]
[root@racnode1 ~]# rpm -e ksh
[root@racnode1 ~]# rpm -ivh ./pdksh-5.2.14-37.el5_8.1.x86_64.rpm
warning: ./pdksh-5.2.14-37.el5_8.1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key                                                        ID 1e5e0159: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:pdksh-5.2.14-37.el5_8.1          ################################# [100%]

  • unreachable node的DNS响应没有通过

这个是一个bug,OL5系统里面nslookup 查找一个域名超时,返回码是0,OL6和OL7查找一个域名超时时,返回是1.所以这里校验脚本无法正确识别这种情况。我们可以修复它,也可以忽略它。

Checking the file "/etc/resolv.conf" to make sure only one of domain and search entries is defined
File "/etc/resolv.conf" does not have both domain and search entries defined
Checking if domain entry in file "/etc/resolv.conf" is consistent across the nodes...
domain entry in file "/etc/resolv.conf" is consistent across nodes
Checking if search entry in file "/etc/resolv.conf" is consistent across the nodes...
search entry in file "/etc/resolv.conf" is consistent across nodes
Checking DNS response time for an unreachable node
  Node Name                             Status
  ------------------------------------  ------------------------
  racnode2                              failed
  racnode1                              failed
PRVF-5637 : DNS response time could not be checked on following nodes: racnode2,racnod1

我们试图修复下该bug:

[grid@racnode1 grid]$ mv /bin/nslookup /bin/nslookup.origin
[grid@racnode1 grid]$ vim /bin/nslookup
[grid@racnode1 grid]$ cat /bin/nslookup
#!/bin/bash
HOSTNAME=${1}
/bin/nslookup.origin $HOSTNAME
exit 0

看看效果:

Checking the file "/etc/resolv.conf" to make sure only one of domain and search entries is defined
File "/etc/resolv.conf" does not have both domain and search entries defined
Checking if domain entry in file "/etc/resolv.conf" is consistent across the nodes...
domain entry in file "/etc/resolv.conf" is consistent across nodes
Checking if search entry in file "/etc/resolv.conf" is consistent across the nodes...
search entry in file "/etc/resolv.conf" is consistent across nodes
Checking DNS response time for an unreachable node
  Node Name                             Status
  ------------------------------------  ------------------------
  racnode2                              passed
  racnode1                              passed
The DNS response time for an unreachable node is within acceptable limit on all nodes

File "/etc/resolv.conf" is consistent across nodes

没有问题了。

正式进入安装阶段

- 安装GI软件

切换,进入X window模式。

[grid@racnode1 ~]$ xrdb .Xresources
[grid@racnode1 ~]$ xterm &
[1] 96842

在xterm中操作安装。

[grid@racnode1 ~]$ cd /mnt/hgfs/grid/
[grid@racnode1 grid]$ ls
doc      readme.html  rpm           runInstaller  stage
install  response     runcluvfy.sh  sshsetup      welcome.html
[grid@racnode1 grid]$ ./runInstaller 
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 28476 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3071 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-06-07_11-30-43PM. Please wait ...[grid@racnode1 grid]$ 
  • 第一步:选择安装内容。


    image.png
  • 第二步:略过update,下一步。


    image.png
  • 第三步:语言选择,英语就够了。


    image.png
  • 第四步:用户组和管理脚色的选择。


    image.png
  • 第五步:ORACLE-BASE和ORACLE-HOME的选择,我们在环境变量中配置了。保持不变。


    image.png
  • 第六步:安装仓库选择。保持不变。


    image.png
  • 第七步:前置条件检查。


    image.png

    这里提示需要ksh了。不需要pdksh了。按照前面包的提示安装,我们卸载掉pdksh,在安装一次ksh,点击Check Again。通过。

  • 第八步:安装软件开始。


    image.png
  • 第九步:需要用root用户执行脚本了。


    image.png

orainstRoot.sh脚本

[root@racnode1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

root.sh脚本

[root@racnode1 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl


To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/11.2.0/grid/crs/config/config.sh
This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.

节点1安装完毕。同样的步骤在节点2上面安装GI。

- 配置我们的集群服务器。

我们要配置的是集群,所以直接执行以下配置脚本。

[grid@racnode1 grid]$ /u01/app/11.2.0/grid/crs/config/config.sh
  • 第一步:选择配置GI。


    image.png
  • 第二部:填写配置信息。


    image.png

    这里图是旧的,我们不要选择GNS,我们将SCAN Name命名为racnode-cluster-scan.cluster.org

  • 第三步:添加第二个节点到集群中,输入口令,点击setup,检验节点组件ssh的连通性。


    image.png

    image.png

    成功进入下一步。

  • 第四步:选择公网和私网的适配器。


    image.png
  • 第五步:选择OCR和VF的存储类型,我们选择ASM。


    image.png
  • 第六步:选择Disk Group,新装系统我们选择Create。


    image.png
  • 第七步:按照事前规划,选择ORCL:CRS,创建crs磁盘组。


    image.png

    注:这里图示有错误。

  • 第八步:简化管理,我们输入统一口令。


    image.png
  • 第九步:略过IPM安装。


    image.png
  • 第十步:完成基本配置,开始配置安装。


    image.png
- 第十一步:执行root.sh脚本
image.png
  • root.sh脚本的错误调试过程
    创建crs时,如果失败,会出现错误提示:
[root@racnode1 ~]# /u01/app/11.2.0/grid/root.sh
Performing root user operation for Oracle 11g 

The following environment variables are set as:
   ORACLE_OWNER= grid
   ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
CRS-4046: Invalid Oracle Clusterware configuration.
CRS-4000: Command Create failed, or completed with errors.
Failure initializing entries in /etc/oracle/scls_scr/racnode2
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed

出现错误后,我们需要卸载掉刚才的过程,我们会运行rootcrs.pl -deconfig -force -verbose脚本。

重新配置系列的文件,这步可能会有报错。

[root@racnode1 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force -verbose
Can't locate Env.pm in @INC (@INC contains: /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/11.2.0/grid/crs/install) at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 642.
BEGIN failed--compilation aborted at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 642.
Compilation failed in require at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 289.
BEGIN failed--compilation aborted at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 289.

我们需要安装perl的这个模块

[root@racnode1 tmp]# yum install perl-Env

再次卸载掉配置。

[root@racnode1 ~]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force -verbose
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Usage: srvctl <command> <object> [<options>]
    commands: enable|disable|start|stop|status|add|remove|modify|getenv|setenv|unsetenv|config|upgrade
    objects: database|service|asm|diskgroup|listener|home|ons
For detailed help on each command and object and its options use:
  srvctl <command> -h or
  srvctl <command> <object> -h
PRKO-2012 : nodeapps object is not supported in Oracle Restart
CRS-4046: Invalid Oracle Clusterware configuration.
CRS-4000: Command Stop failed, or completed with errors.
################################################################
# You must kill processes or reboot the system to properly #
# cleanup the processes started by Oracle clusterware          #
################################################################
Successfully deconfigured Oracle clusterware stack on this node

杀掉还存在的进程。

[root@racnode1 ~]#  ps -ef| grep "/u01/app/11.2.0/grid/"
root       7602      1  0 Jun07 ?        00:00:24 /u01/app/11.2.0/grid/bin/ohasd.bin reboot
grid     122910      1  0 01:07 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
grid     123020  96845  0 01:07 pts/2    00:00:00 /bin/sh /u01/app/11.2.0/grid/crs/config/config.sh
grid     123023 123020  0 01:07 pts/2    00:00:00 /u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib /u01/app/11.2.0/grid/crs/config/config.pl
grid     123026 123023  2 01:07 pts/2    00:00:40 /u01/app/11.2.0/grid/jdk/jre/bin/java -cp /u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/cvu.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/installcommons_1.0.0b.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/instcommon.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/instcrs.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/jsch.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/ojdbc5.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/orai18n-mapping.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/orai18n-utility.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/OraPrereq.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/OraPrereqChecks.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/prov_fixup.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/remoteinterfaces.jar:/u01/app/11.2.0/grid/inventory/Scripts/ext/jlib/ssh.jar:/u01/app/11.2.0/grid/oui/jlib/Libraries.old:/u01/app/11.2.0/grid/oui/jlib/jlib:/u01/app/11.2.0/grid/oui/jlib/ewt3.jar:/u01/app/11.2.0/grid/oui/jlib/ewt3-nls.jar:/u01/app/11.2.0/grid/oui/jlib/jewt4.jar:/u01/app/11.2.0/grid/oui/jlib/help4.jar:/u01/app/11.2.0/grid/oui/jlib/help4-nls.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_de.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_es.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_fr.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_it.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_ja.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_ko.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_pt_BR.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_zh_CN.jar:/u01/app/11.2.0/grid/oui/jlib/InstHelp_zh_TW.jar:/u01/app/11.2.0/grid/oui/jlib/InstImages.jar:/u01/app/11.2.0/grid/oui/jlib/oracle_ice.jar:/u01/app/11.2.0/grid/oui/jlib/swingaccess.jar:/u01/app/11.2.0/grid/oui/jlib/ewt3-swingaccess.jar:/u01/app/11.2.0/grid/oui/jlib/classes12.jar:/u01/app/11.2.0/grid/oui/jlib/orai18n-collation.jar:/u01/app/11.2.0/grid/oui/jlib/orai18n-mapping.jar:/u01/app/11.2.0/grid/oui/jlib/ojmisc.jar:/u01/app/11.2.0/grid/oui/jlib/xml.jar:/u01/app/11.2.0/grid/oui/jlib/srvm.jar:/u01/app/11.2.0/grid/oui/jlib/srvmasm.jar:/u01/app/11.2.0/grid/oui/jlib/remoteinterfaces.jar:/u01/app/11.2.0/grid/oui/jlib/ssh.jar:/u01/app/11.2.0/grid/oui/jlib/jsch.jar:/u01/app/11.2.0/grid/oui/jlib/filesList.jar:/u01/app/11.2.0/grid/oui/jlib/OraPrereqChecks.jar:/u01/app/11.2.0/grid/oui/jlib/OraInstaller.jar:/u01/app/11.2.0/grid/oui/jlib/xmlparserv2.jar:/u01/app/11.2.0/grid/oui/jlib/oneclick.jar:/u01/app/11.2.0/grid/oui/jlib/OraPrereq.jar:/u01/app/11.2.0/grid/oui/jlib/emCfg.jar:/u01/app/11.2.0/grid/oui/jlib/prov_fixup.jar:/u01/app/11.2.0/grid/oui/jlib/share.jar:/u01/app/11.2.0/grid/oui/jlib/emocmutl.jar:/u01/app/11.2.0/grid/oui/jlib/OraCheckPoint.jar:/u01/app/11.2.0/grid/oui/jlib/http_client.jar:/u01/app/11.2.0/grid/oui/jlib/OraSuiteInstaller.jar:/u01/app/11.2.0/grid/oui/jlib/OraInstallerNet.jar:/u01/app/11.2.0/grid/install/jlib/installcommons_1.0.0b.jar:/u01/app/11.2.0/grid/install/jlib/instcommon.jar:/u01/app/11.2.0/grid/install/jlib/instcrs.jar -Doracle.installer.configWizard=true -Doracle.installer.scratchPath=/u01/app/11.2.0/grid/inventory/Scripts -Xdebug oracle.install.ivw.crs.driver.CRSConfigWizard
root     127813 115930  0 01:37 pts/3    00:00:00 grep --color=auto /u01/app/11.2.0/grid/
[root@racnode1 ~]# kill -9 7602
[root@racnode1 ~]# kill -9 122910
[root@racnode1 ~]# kill -9 123020
[root@racnode1 ~]# kill -9 123023
[root@racnode1 ~]# kill -9 123026
[root@racnode1 ~]#  ps -ef| grep "/u01/app/11.2.0/grid/"
root     127852 115930  0 01:38 pts/3    00:00:00 grep --color=auto /u01/app/11.2.0/grid/

再次执行root.sh

节点还是显示有错误

CRS-2672: Attempting to start 'ora.cssd' on 'racnode2'
CRS-2672: Attempting to start 'ora.diskmon' on 'racnode2'
CRS-2676: Start of 'ora.diskmon' on 'racnode2' succeeded
CRS-2676: Start of 'ora.cssd' on 'racnode2' succeeded

ASM created and started successfully.

Disk Group crs mounted successfully.

clscfg: -install mode specified
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Failed to initialize Oracle Cluster Registry for cluster, rc 105
Oracle Grid Infrastructure Repository configuration failed at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 6769.
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed

一般来讲,可能是11g中的一个bug。ohasd无法启动。
我们看看进程情况,然后跟踪下进程停在什么地方。

[root@racnode2 bin]# ps -ef|grep oha
root      19899      1  0 12:39 ?        00:00:00 /u01/app/11.2.0/grid/bin/ohasd.bin reboot
root      20035  19711  0 12:41 pts/1    00:00:00 grep --color=auto oha
[root@racnode2 bin]# strace -p 19899 -o hem.log
strace: Process 19899 attached

开启另一个窗口,杀掉该进程。然后看看结果。

[root@racnode2 bin]#
[root@racnode2 bin]# tail hem.log
stat("/u01/app/11.2.0/grid/log/racnode2/ohasd/ohasd.log", {st_mode=S_IFREG|0644, st_size=522008, ...}) = 0
access("/u01/app/11.2.0/grid/log/racnode2/ohasd/ohasd.log", F_OK) = 0
statfs("/u01/app/11.2.0/grid/log/racnode2/ohasd/ohasd.log", {f_type=0x58465342, f_bsize=4096, f_blocks=9692545, f_bfree=7352756, f_bavail=7352756, f_files=38789120, f_ffree=38630502, f_fsid={64512, 0}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
open("/u01/app/11.2.0/grid/log/racnode2/ohasd/ohasd.log", O_WRONLY|O_APPEND) = 6
stat("/u01/app/11.2.0/grid/log/racnode2/ohasd/ohasd.log", {st_mode=S_IFREG|0644, st_size=522008, ...}) = 0
stat("/u01/app/11.2.0/grid/log/racnode2/ohasd/ohasd.log", {st_mode=S_IFREG|0644, st_size=522008, ...}) = 0
futex(0x24f13e4, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, 0x24f5f90, 6) = 1
write(1, "Timed out waiting for init.ohasd"..., 67) = 67
open("/var/tmp/.oracle/npohasd", O_WRONLY <unfinished ...>
+++ killed by SIGKILL +++

果然停止在/var/tmp/.oracle/npohasd这个地方。解决办法是在重新运行root.sh脚本同时,开启另一个窗口,运行下面命令。

[root@racnode2 bin]# dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
^C0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.70967 s, 0.0 kB/s

再次启动root.sh脚本,过程顺利了。没有报错了。关闭上面的窗口中的dd命令。

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
OLR initialization - successful
Adding Clusterware entries to inittab
CRS-2672: Attempting to start 'ora.mdnsd' on 'racnode1'

执行root.sh这个步骤要保证两台节点的root.sh脚本执行正确。再接着进行下面的步骤。root.sh成功完成的提示如下:

clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Successful addition of voting disk 010bc334485c4f61bfc36af0d95770d1.
Successfully replaced voting disk group with +crs.
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   010bc334485c4f61bfc36af0d95770d1 (ORCL:CRS) [CRS]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'racnode1'
CRS-2676: Start of 'ora.asm' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.CRS.dg' on 'racnode1'
CRS-2676: Start of 'ora.CRS.dg' on 'racnode1' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded

  • 第十二步:配置完成后的检查。
    如果安装在Oracle Cluster Verification Utility 阶段报错,我们可以看看日志问题在哪里。
    我们这次安装就提示错误,没有通过Verification。查看日志。
Jun 8, 2019 1:48:32 PM oracle.install.commons.util.LogStream log
INFO: PRVG-1101 : SCAN name "racnode-cluster-scan.cluster.org" failed to resolve
Jun 8, 2019 1:48:32 PM oracle.install.commons.util.LogStream log
INFO: ERROR:
Jun 8, 2019 1:48:32 PM oracle.install.commons.util.LogStream log
INFO: PRVF-4657 : Name resolution setup check for "racnode-cluster-scan.cluster.org" (IP address: 192.168.1.22) failed
Jun 8, 2019 1:48:32 PM oracle.install.commons.util.LogStream log
INFO: ERROR:
Jun 8, 2019 1:48:32 PM oracle.install.commons.util.LogStream log
INFO: PRVF-4664 : Found inconsistent name resolution entries for SCAN name "racnode-cluster-scan.cluster.org"
Jun 8, 2019 1:48:32 PM oracle.install.commons.util.LogStream log
INFO: Verification of SCAN VIP and Listener setup failed
Jun 8, 2019 1:48:32 PM oracle.install.commons.util.LogStream log
INFO: Checking OLR integrity...
Jun 8, 2019 1:48:32 PM oracle.install.commons.util.LogStream log

racnode-cluster-scan.cluster.org的域名解析没有通过。如果没有配置域名服务器,我们就采用权宜之计,修改下nslookup内容。

[root@racnode1 crsconfig]# cat /bin/nslookup
#!/bin/bash
HOSTNAME=${1}
if [ $HOSTNAME = "racnode-cluster-scan.cluster.org" ];then
 echo "Server:         192.168.1.1"
 echo "Address:        192.168.1.1#53"
 echo "Non-authoritative answer:"
 echo "Name:   racnode-cluster-scan.cluster.org"
 echo "Address: 192.168.1.22"
else
 /bin/nslookup.origin $HOSTNAME
fi
exit 0
[root@racnode1 crsconfig]# nslookup racnode-cluster-scan.cluster.org
Server:         192.168.1.1
Address:        192.168.1.1#53
Non-authoritative answer:
Name:   racnode-cluster-scan.cluster.org
Address: 192.168.1.22
[root@racnode1 crsconfig]#

retry一下最后一步,再跟踪下日志,没有报错了。

Jun 8, 2019 2:01:44 PM oracle.install.commons.util.LogStream log
INFO: TCP connectivity to SCAN Listeners exists on all cluster nodes
Jun 8, 2019 2:01:44 PM oracle.install.commons.util.LogStream log
INFO: Checking name resolution setup for "racnode-cluster-scan.cluster.org"...
Jun 8, 2019 2:01:44 PM oracle.install.commons.util.LogStream log
INFO: Verification of SCAN VIP and Listener setup passed

root.sh这个脚本执行的内容较多,干扰多,出错的地方也比较多,出错的原因也是各种各样的。如果出错了,通过日志检查原因,修正错误,卸载掉配置,再重新运行root.sh脚本。

/u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force -verbose

至此GI配置成功。


image.png

检查下集群状态:

[grid@racnode1 ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
[grid@racnode1 ~]$

没有问题。

下一节,我们安装Oracle数据库。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 199,636评论 5 468
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 83,890评论 2 376
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 146,680评论 0 330
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 53,766评论 1 271
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,665评论 5 359
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,045评论 1 276
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,515评论 3 390
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,182评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,334评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,274评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,319评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,002评论 3 315
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,599评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,675评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,917评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,309评论 2 345
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,885评论 2 341