11gR2 硬件导致重新添加节点
作者:吴伟龙(PrudentWoo)
一、环境描述:
这是一套五年前部署的双节点单柜11g RAC,当时操作系统盘是一块164g的单盘,没有做RAID。
OS: RedHat EnterPrise 5.5 x86_x64
GI : Oracle Grid Infrastructure 11.2.0.3x86_x64
DB: Oracle Database EnterPrise 11.2.0.3x86_64
二、问题现象:
在12月24日的时候用户发现节点一主机名为oradb1数据库服务器操作系统键盘鼠标无响应,随即强行重启了数据库服务器。重启后发现服务器无法正常进入操作系统提示需要fsck –A 或 fsck –f 修复文件系统。实际上在两个月之前也遇到了此问题,当时就采取了fsck命令进行修复。两个月后的现在再次出现相同的问题。
三、问题分析:
从问题现象来看可以判断是节点一因为硬盘坏道(硬件故障)导致的操作体系不可用。
四、问题处理思路:
更换故障节点oradb1服务器硬盘并重装系统,重装GI软件和DB软件,基本步骤如下:
1、 重新更换故障节点oradb1服务器两块硬盘并作RAID1,避免操作系统硬盘单点故障。
2、 重新安装故障节点oradb1操作系统,配置网络信息,环境变量,认存储。
3、 删除现存节点oradb2中的故障节点oradb1集群信息,更新ocr和voting。
4、 在现存节点中删除故障节点oradb1实例信息。
5、 配置新节点和现存节点的互信。
6、 部署新节点集群软件,将新节点添加至现存节点中。
7、 部署新节点的数据库软件,将新节点添加至现存节点中。
8、 检查节点状态,测试新节点和老节点的可用性,切换测试。
五、操作步骤:
5.1重新更换oradb1服务器硬盘重做RAID:略
5.2更换故障服务器oradb1硬盘重装系统:略
5.3在现存节点oradb2中删除故障节点oradb1的集群信息:
登陆到现存节点二:
-
prudentwoos-MacBook-Pro:/ prudentwoo$ ssh root@172.27.90.159
-
The authenticity of host '172.27.90.159 (172.27.90.159)' can't be established.
-
RSA key fingerprint is SHA256:M6s9wKplA6iMgmtDwb2bVAMFPRrMh7b5KmahvwF1BNo.
-
Are you sure you want to continue connecting (yes/no)? yes
-
Warning: Permanently added '172.27.90.159' (RSA) to the list of known hosts.
-
root@172.27.90.159's password:
-
Last login: Thu Dec 22 22:03:10 2016
六、确认节点状态:
6.1实例状态:
-
[root@oradb2 bin]# ./srvctl status database -d tjtvdb
-
实例 tjtvdb1 没有在 oradb1 节点上运行
-
实例 tjtvdb2 正在节点 oradb2 上运行
6.2 节点信息状态:
至此,实例已经删除完毕。
7.3 查看删除后的实例信息:
-
SQL> col instance format a15
-
SQL> select thread#,status,instance from v$thread
-
-
THREAD# STATUS INSTANCE
-
---------- ------ ---------------
-
2 OPEN tjtvdb2
-
-
SQL> select instance_name,status from gv$instance;
-
-
INSTANCE_NAME STATUS
-
---------------- ------------
-
tjtvdb2 OPEN
7.4 查看数据库情况:
-
[root@oradb2 bin]# ./srvctl config database -d tjtvdb
-
数据库唯一名称: tjtvdb
-
数据库名: tjtvdb
-
Oracle 主目录: /opt/app/oracle/product/11.2.0/dbhome_1
-
Oracle 用户: oracle
-
Spfile: +DATAVOL1/tjtvdb/spfiletjtvdb.ora
-
域:
-
启动选项: open
-
停止选项: immediate
-
数据库角色: PRIMARY
-
管理策略: AUTOMATIC
-
服务器池: tjtvdb
-
数据库实例: tjtvdb2
-
磁盘组: DATAVOL1,FRAVOL1
-
装载点路径:
-
服务:
-
类型: RAC
-
数据库是管理员管理的
八、停用节点一的监听并删除
-
[root@oradb2 bin]# ./srvctl config listener -a
-
名称: LISTENER
-
网络: 1, 所有者: grid
-
主目录: <CRS home>
-
PRCN-2037 : 无法检索 LISTENER 的 Oracle 主目录
-
PRCR-1097 : 找不到资源属性: ORACLE_HOME
-
-
[root@oradb2 bin]#./srvctl disable listener -l listener -n oradb01
-
[root@oradb2 bin]# ./srvctl stop listener -l listener -n oradb1
-
PRCC-1017 : LISTENER 已在 oradb1 上停止
-
PRCR-1005 : 资源 ora.LISTENER.lsnr 已停止
九、用Oracle用户更新现存节点oradb2的集群列表:
-
[oracle@oradb2 bin]$ $ORACLE_HOME/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1 "CLUSTER_NODES={oradb2}"
-
正在启动 Oracle Universal Installer...
-
-
检查交换空间: 必须大于 500 MB。 实际为 2920 MB 通过
-
The inventory pointer is located at /etc/oraInst.loc
-
The inventory is located at /opt/app/oraInventory
-
'UpdateNodeList' 成功。
备注:
ORACLE_HOME=$ORACLE_HOME 如果不写完整路径将会导致更新失败,如果更新失败可以尝试如下操作:
--因为oradb1 已经不存在了,所以手工编辑下oradb2的oraInventory删除节点一的信息:
-
[oracle@oradb2 ~]$ cat /opt/app/oraInventory/ContentsXML/inventory.xml
-
<?xml version="1.0" standalone="yes" ?>
-
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
-
<!-- Do not modify the contents of this file by hand. -->
-
<INVENTORY>
-
<VERSION_INFO>
-
<SAVED_WITH>11.2.0.3.0</SAVED_WITH>
-
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
-
</VERSION_INFO>
-
<HOME_LIST>
-
<HOME NAME="Ora11g_gridinfrahome1" LOC="/opt/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true">
-
<NODE_LIST>
-
<NODE NAME="oradb1"/>
-
<NODE NAME="oradb2"/>
-
</NODE_LIST>
-
</HOME>
-
<HOME NAME="OraDb11g_home1" LOC="/opt/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="2">
-
<NODE_LIST>
-
<NODE NAME="oradb1"/>
-
<NODE NAME="oradb2"/>
-
</NODE_LIST>
-
</HOME>
-
</HOME_LIST>
-
<COMPOSITEHOME_LIST>
-
</COMPOSITEHOME_LIST>
-
</INVENTORY>
-
-
-
删除如上所有节点一的信息,修改为如下:
-
[oracle@oradb2 ~]$ cat /opt/app/oraInventory/ContentsXML/inventory.xml
-
<?xml version="1.0" standalone="yes" ?>
-
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
-
<!-- Do not modify the contents of this file by hand. -->
-
<INVENTORY>
-
<VERSION_INFO>
-
<SAVED_WITH>11.2.0.3.0</SAVED_WITH>
-
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
-
</VERSION_INFO>
-
<HOME_LIST>
-
<HOME NAME="Ora11g_gridinfrahome1" LOC="/opt/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true">
-
<NODE_LIST>
-
<NODE NAME="oradb2"/>
-
</NODE_LIST>
-
</HOME>
-
<HOME NAME="OraDb11g_home1" LOC="/opt/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="2">
-
<NODE_LIST>
-
<NODE NAME="oradb2"/>
-
</NODE_LIST>
-
</HOME>
-
</HOME_LIST>
-
<COMPOSITEHOME_LIST>
-
</COMPOSITEHOME_LIST>
-
</INVENTORY>
九、删除故障节点VIP:
#查看vip信息:
-
[root@oradb2 bin]# ./crsctl status res -t |grep oradb1
-
ora.oradb1.vip
-
[root@oradb2 bin]# ./crs_stat -t |grep oradb1
-
ora.oradb1.vip ora....t1.type ONLINE ONLINE oradb2
#停止vip:
-
[root@oradb2 bin]# ./crs_stop -f ora.oradb1.vip
-
Attempting to stop `ora.oradb1.vip` on member `oradb2`
-
Stop of `ora.oradb1.vip` on member `oradb2` succeeded.
-
[root@oradb2 bin]# ./crs_stat -t |grep oradb1
-
ora.oradb1.vip ora....t1.type OFFLINE OFFLINE
#删除vip
-
[root@oradb2 bin]# ./srvctl remove vip -i ora.oradb1.vip -f
-
PRKO-2313 : VIP ora.oradb1.vip 不存在。
-
[root@oradb2 bin]# ./crsctl delete resource ora.oradb1.vip -f
-
[root@oradb2 bin]# ./crs_stat -t |grep oradb1
十、删除故障节点:
#查看节点信息
-
[root@oradb2 bin]# ./olsnodes -t -s
-
oradb1 Inactive Unpinned
-
oradb2 Active Unpinned
#删除故障节点
-
[root@oradb2 bin]# ./crsctl delete node -n oradb1
-
CRS-4661: Node oradb1 successfully deleted.
#查看删除后的故障节点信息
-
[root@oradb2 bin]# ./olsnodes -t -s
-
oradb2 Active Unpinned
十一、验证节点是否已被删除:
#cluvfy验证
-
[grid@oradb2 ~]$ cluvfy stage -post nodedel -n oradb1
-
-
执行 删除节点 的后期检查
-
正在检查 CRS 完整性...
-
集群件版本一致性测试已通过
-
CRS 完整性检查已通过
-
删除节点检查通过
-
删除节点 的后期检查成功。
#crs_stat 验证
-
[grid@oradb2 ~]$ crs_stat -t
-
Name Type Target State Host
-
------------------------------------------------------------
-
ora.DATACRS.dg ora....up.type ONLINE ONLINE oradb2
-
ora....VOL1.dg ora....up.type ONLINE ONLINE oradb2
-
ora.FRAVOL1.dg ora....up.type ONLINE ONLINE oradb2
-
ora....ER.lsnr ora....er.type ONLINE ONLINE oradb2
-
ora....N1.lsnr ora....er.type ONLINE ONLINE oradb2
-
ora.asm ora.asm.type ONLINE ONLINE oradb2
-
ora.cvu ora.cvu.type ONLINE ONLINE oradb2
-
ora.gsd ora.gsd.type OFFLINE OFFLINE
-
ora....network ora....rk.type ONLINE ONLINE oradb2
-
ora.oc4j ora.oc4j.type ONLINE ONLINE oradb2
-
ora.ons ora.ons.type ONLINE ONLINE oradb2
-
ora....SM2.asm application ONLINE ONLINE oradb2
-
ora....B2.lsnr application ONLINE ONLINE oradb2
-
ora.oradb2.gsd application OFFLINE OFFLINE
-
ora.oradb2.ons application ONLINE ONLINE oradb2
-
ora.oradb2.vip ora....t1.type ONLINE ONLINE oradb2
-
ora....ry.acfs ora....fs.type ONLINE ONLINE oradb2
-
ora.scan1.vip ora....ip.type ONLINE ONLINE oradb2
-
ora.tjtvdb.db ora....se.type ONLINE ONLINE oradb2
-
-
[grid@oradb2 ~]$ crsctl status res -t
-
--------------------------------------------------------------------------------
-
NAME TARGET STATE SERVER STATE_DETAILS
-
--------------------------------------------------------------------------------
-
Local Resources
-
--------------------------------------------------------------------------------
-
ora.DATACRS.dg
-
ONLINE ONLINE oradb2
-
ora.DATAVOL1.dg
-
ONLINE ONLINE oradb2
-
ora.FRAVOL1.dg
-
ONLINE ONLINE oradb2
-
ora.LISTENER.lsnr
-
ONLINE ONLINE oradb2
-
ora.asm
-
ONLINE ONLINE oradb2 Started
-
ora.gsd
-
OFFLINE OFFLINE oradb2
-
ora.net1.network
-
ONLINE ONLINE oradb2
-
ora.ons
-
ONLINE ONLINE oradb2
-
ora.registry.acfs
-
ONLINE ONLINE oradb2
-
--------------------------------------------------------------------------------
-
Cluster Resources
-
--------------------------------------------------------------------------------
-
ora.LISTENER_SCAN1.lsnr
-
1 ONLINE ONLINE oradb2
-
ora.cvu
-
1 ONLINE ONLINE oradb2
-
ora.oc4j
-
1 ONLINE ONLINE oradb2
-
ora.oradb2.vip
-
1 ONLINE ONLINE oradb2
-
ora.scan1.vip
-
1 ONLINE ONLINE oradb2
-
ora.tjtvdb.db
-
2 ONLINE ONLINE oradb2 Open
-
SQL> select thread#,status,instance from v$thread
-
-
THREAD# STATUS INSTANCE
-
---------- ------ --------------------
-
2 OPEN tjtvdb2
-
[root@oradb2 bin]# ./srvctl status database -d tjtvdb
-
实例 tjtvdb2 正在节点 oradb2 上运行
-
-
[root@oradb2 bin]# ./srvctl status nodeapps
-
VIP oradb2-vip 已启用
-
VIP oradb2-vip 正在节点上运行: oradb2
-
网络已启用
-
网络正在节点上运行: oradb2
-
GSD 已禁用
-
GSD 没有运行的节点: oradb2
-
ONS 已启用
-
ONS 守护程序正在节点上运行:oradb2
第二部分:将节点一添加至RAC
十二、在服务器节点一oradb1上创建用户及用户组:
#查看oradb2的uid和gid:
-
[root@oradb2 ~]# id oracle
-
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)
-
-
[root@oradb2 ~]# id grid
-
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)
#参照节点二的信息在节点一上创建用户和组
-
[root@oradb1 ~]# groupadd -g 1000 oinstall
-
[root@oradb1 ~]# groupadd -g 1300 dba
-
[root@oradb1 ~]# groupadd -g 1301 oper
-
[root@oradb1 ~]# groupadd -g 1200 asmadmin
-
[root@oradb1 ~]# groupadd -g 1201 asmdba
-
[root@oradb1 ~]# groupadd -g 1202 asmoper
-
[root@oradb1 ~]# useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper grid
-
[root@oradb1 ~]# useradd -u 1101 -g oinstall -G asmdba,dba,oper oracle
-
[root@oradb1 ~]# id oracle
-
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1300(dba),1301(oper),1201(asmdba)
-
-
[root@oradb1 ~]# id grid
-
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)
-
-
[root@oradb1 ~]# passwd oracle
-
Changing password for user oracle.
-
New UNIX password:
-
BAD PASSWORD: it is based on a dictionary word
-
Retype new UNIX password:
-
passwd: all authentication tokens updated successfully.
-
-
[root@oradb1 ~]# passwd grid
-
Changing password for user grid.
-
New UNIX password:
-
BAD PASSWORD: it is based on a dictionary word
-
Retype new UNIX password:
-
passwd: all authentication tokens updated successfully.
十三、修改oracle/grid用户.bash_profile文件并创建相应的目录:
-
[root@oradb1 ~]# chown -R oracle:oinstall /home/oracle/.bash_profile
-
[root@oradb1 ~]# chown -R grid:oinstall /home/oracle/.bash_profile
-
-
[oracle@oradb1 ~]# vi .bash_profile
-
[grid@oradb1 ~]# vi .bash_profile
-
-
[root@oradb1 ~]# mkdir -p /opt/app/grid
-
[root@oradb1 ~]# mkdir -p /opt/app/11.2.0/grid
-
[root@oradb1 ~]# mkdir -p /opt/app/oracle/product/11.2.0/dbhome_1
-
-
[root@oradb1 ~]# chown -R grid:oinstall /opt
-
[root@oradb1 ~]# chown -R oracle:oinstall /opt/app/oracle
十四、#配置ssh信任关系
oracle:
-
ssh-keygen -t rsa
-
ssh-keygen -t dsa
-
ssh oradb1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
-
scp ~/.ssh/authorized_keys ayu2:~/.ssh/authorized_keys
oradb1:
-
[oracle@oradb1 ~]$ ssh-keygen -t rsa
-
Generating public/private rsa key pair.
-
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
-
Created directory '/home/oracle/.ssh'.
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /home/oracle/.ssh/id_rsa.
-
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
-
The key fingerprint is:
-
63:f5:c5:66:ae:37:6b:ca:79:2b:2e:52:a7:1c:da:99 oracle@oradb1
-
-
[oracle@oradb1 ~]$ ssh-keygen -t dsa
-
Generating public/private dsa key pair.
-
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /home/oracle/.ssh/id_dsa.
-
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
-
The key fingerprint is:
-
41:87:12:2a:3b:1f:62:ad:0b:c4:b9:b7:a6:d0:52:1b oracle@oradb1
-
-
[oracle@oradb1 ~]$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
-
[oracle@oradb1 ~]$ cat .ssh/id_dsa.pub >> .ssh/authorized_keys
oradb2:
-
[oracle@oradb2 ~]$ ssh-keygen -t rsa
-
Generating public/private rsa key pair.
-
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
-
Created directory '/home/oracle/.ssh'.
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /home/oracle/.ssh/id_rsa.
-
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
-
The key fingerprint is:
-
8a:33:96:c0:8f:b8:5e:0d:84:05:d9:9d:02:ce:6b:b7 oracle@oradb2
-
-
[oracle@oradb2 ~]$ ssh-keygen -t dsa
-
Generating public/private dsa key pair.
-
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /home/oracle/.ssh/id_dsa.
-
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
-
The key fingerprint is:
-
1d:e3:75:60:b7:df:a4:00:1b:b7:27:03:4a:ae:c4:10 oracle@oradb2
-
-
[oracle@oradb2 ~]$ scp oradb1:/home/oracle/.ssh/authorized_keys .ssh/
-
The authenticity of host 'oradb1 (172.27.90.158)' can't be established.
-
RSA key fingerprint is e4:98:0f:bd:d8:5e:7c:d2:d8:bf:20:05:d3:34:c8:8e.
-
Are you sure you want to continue connecting (yes/no)? yes
-
Warning: Permanently added 'oradb1,172.27.90.158' (RSA) to the list of known hosts.
-
oracle@oradb1's password:
-
authorized_keys 100% 998 1.0KB/s 00:00
-
-
[oracle@oradb2 ~]$ ll .ssh/authorized_keys
-
-rw-r--r-- 1 oracle oinstall 998 12-24 21:10 .ssh/authorized_keys
-
-
[oracle@oradb2 ~]$ cat .ssh/authorized_keys
-
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7ccTcH0c8vnqec0E3BZZTkWQWv6m/lQmePMHAFyw4+d3yWNPdEBJ9u0rOu5J81dJ53IDijLxQ1ivG6M6/WXIJ42e9PY4iFHXQZ7jk38dS6dBR4mYpl9EXPYlfgEInXTBazRbVU0HhlH0AyArVuSwYORy/7Hjr9QUQlV4RyGUaBuLxnvXSxErSjBtDsLGt6/RW5/PKQiBkglxmqOMl1F6XqaS6pQElcR2LPwaBQwqF8HpwL/wPwJS26B+04jZyzepZLgvzlbT9Obcdi7WBTkAAkXhY3l3Pgbf+XS3juf5tCw2RJmWRtBMa6DM8yIbuiLx3jE54GbcnXbs1zOyAoMOMQ== oracle@oradb1
-
ssh-dss AAAAB3NzaC1kc3MAAACBANLZ+KFhZtKYlfEp+x/dhCcS6lnHdED4nWRFC25InQy6kKWRStOolzMWH130F6tb2kIefokyMBEXeMY1kjiJrtQkGXx4nBxs6vCb/JJkkhoNPnPNwYNT9ZanHn0l04ujjGfLWNCHEir4kWpXR5hfARVju6yuIxcaWWN4P5T6BQzVAAAAFQCntH+h1HzejTbJ0XeIDPBX5JPHvwAAAIB481LOeg9qYgKSctIUsE8TsvyjUF3lzy8M4PuaJQ0NUMZ/lR9Es+Ui/o+rI1l6nMg1ssTVznONSXEAG5W+tsXhaOuL9JbFJ8yo25FpZbU8kHMMqsstEseT7uroKN41KfT0gt+TonBN2s2OWBD2txrGt6X/W03fxw6EJnX3qSUxKQAAAIApERIbelwdGGTfNH4yuwybxnLTGF2SRDczPnZlQwJg0sL6EhMy3fUdu0ITPC9BVxAcgvlHARIdryh0B43BvEPkXZe4Mbx6FiHKXNBxBV9Qd0m5x8rvAj8P2X6rEtTVOK4arumRHp63alxSFA7A5pkZwxRS4ry1QQ/b+HoMvdzQjA== oracle@oradb1
-
-
[oracle@oradb2 ~]$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
-
[oracle@oradb2 ~]$ cat .ssh/id_dsa.pub >> .ssh/authorized_keys
-
[oracle@oradb2 ~]$ cat .ssh/authorized_keys
-
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7ccTcH0c8vnqec0E3BZZTkWQWv6m/lQmePMHAFyw4+d3yWNPdEBJ9u0rOu5J81dJ53IDijLxQ1ivG6M6/WXIJ42e9PY4iFHXQZ7jk38dS6dBR4mYpl9EXPYlfgEInXTBazRbVU0HhlH0AyArVuSwYORy/7Hjr9QUQlV4RyGUaBuLxnvXSxErSjBtDsLGt6/RW5/PKQiBkglxmqOMl1F6XqaS6pQElcR2LPwaBQwqF8HpwL/wPwJS26B+04jZyzepZLgvzlbT9Obcdi7WBTkAAkXhY3l3Pgbf+XS3juf5tCw2RJmWRtBMa6DM8yIbuiLx3jE54GbcnXbs1zOyAoMOMQ== oracle@oradb1
-
ssh-dss AAAAB3NzaC1kc3MAAACBANLZ+KFhZtKYlfEp+x/dhCcS6lnHdED4nWRFC25InQy6kKWRStOolzMWH130F6tb2kIefokyMBEXeMY1kjiJrtQkGXx4nBxs6vCb/JJkkhoNPnPNwYNT9ZanHn0l04ujjGfLWNCHEir4kWpXR5hfARVju6yuIxcaWWN4P5T6BQzVAAAAFQCntH+h1HzejTbJ0XeIDPBX5JPHvwAAAIB481LOeg9qYgKSctIUsE8TsvyjUF3lzy8M4PuaJQ0NUMZ/lR9Es+Ui/o+rI1l6nMg1ssTVznONSXEAG5W+tsXhaOuL9JbFJ8yo25FpZbU8kHMMqsstEseT7uroKN41KfT0gt+TonBN2s2OWBD2txrGt6X/W03fxw6EJnX3qSUxKQAAAIApERIbelwdGGTfNH4yuwybxnLTGF2SRDczPnZlQwJg0sL6EhMy3fUdu0ITPC9BVxAcgvlHARIdryh0B43BvEPkXZe4Mbx6FiHKXNBxBV9Qd0m5x8rvAj8P2X6rEtTVOK4arumRHp63alxSFA7A5pkZwxRS4ry1QQ/b+HoMvdzQjA== oracle@oradb1
-
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAmOK1TdZ25EsVFStQZsp2HOSmxteB4tBTa2zgDA9d0SX4H5EXcWYIGlb4SY1Abwsl5jVwxn8+Db67VoiO3bpi/JIF/w9IYqKfa4E0POt2UARO2SqDkgGr03N0wcp61njs11w8LnsZ/JY3lwt5oDlyS57jUUmhCtr8PlcGrHPvCgdbJfxfRkDsgiHfzJWQ1/JfvWVYRZuRsNFdzgUozmZlxFuD3KWRiPQGhVHC+q812jIyG8TUYR7XggBh8WGQ31gD++e39VSbbTmCafXz+eCgdoKDdHo/4SNtSMn0aEeMnbnkKUfgi/sixgXnvWM/s/42klIbuDRMbbAvT5eawmE/EQ== oracle@oradb2
-
ssh-dss AAAAB3NzaC1kc3MAAACBAKe94w7bMo3UOtVcjWppsdAgwRygrZ9cs4TVk1huNdKmuubIDAgmzm0yL+WKWK6+of9zPUiiCh03DAa0nJao3vtME9y/U2FiwNfxNtuS9Rrogrgb2qSvHuu28blfPoVS7pG8vaSlXrUN/zK4NbHawg3Gtinf6qVmYDKJWPxkKJPhAAAAFQDltlsPpYGAdVWEPkUOe8RpwlAe/QAAAIAqwQP3yOAHv5h8mM4WQqxfV/2pKu6qPlg9O1kZboUuHl0VvfATFxmjFoA8SNVyGgl+AzoeNgdck4isJZhP2Sj1+AxD/z+GNwFkmSH1SIaEDAY8mtNTTGioQpkj3vnQRvhd9KqtHQ7+aGrdl3vzbkJCGACeU+g7SANJvnh2dc5h+gAAAIEAjnAk4wOM19HlkAHnKPh0q2kWz+SvsJWnsWNvgf5Gk8vb1OR+G/e1twxhlvFCtF+MLXQQUthNDD80ic3axQQ0juhsS9JVffe4DvNtnVM8Qu1ZKLn7SrE7dJ6ASHaynAXXULZdtyEqVS8LmLIarly3DEByh79B6ZN4w3f/BXAVlKQ= oracle@oradb2
[oracle@oradb2 ~]$ scp .ssh/authorized_keys oradb1:/home/oracle/.ssh/
oracle@oradb1's password:
authorized_keys 100% 1996 2.0KB/s 00:00
[oracle@oradb2 ~]$ ssh oradb1
Last login: Sat Dec 24 21:31:03 2016
[oracle@oradb1 ~]$ ssh oradb2
Last login: Sat Dec 24 21:13:54 2016 from oradb1
grid:
-
ssh-keygen -t rsa
-
ssh-keygen -t dsa
-
ssh oradb1 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
-
scp ~/.ssh/authorized_keys ayu2:~/.ssh/authorized_keys
grid:
-
[grid@oradb1 ~]$ ssh-keygen -t rsa
-
Generating public/private rsa key pair.
-
Enter file in which to save the key (/home/grid/.ssh/id_rsa):
-
Created directory '/home/grid/.ssh'.
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /home/grid/.ssh/id_rsa.
-
Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
-
The key fingerprint is:
-
a7:62:15:e9:58:b4:a7:6f:c4:33:e9:26:d8:79:4d:ca grid@oradb1
-
-
[grid@oradb1 ~]$ ssh-keygen -t dsa
-
Generating public/private dsa key pair.
-
Enter file in which to save the key (/home/grid/.ssh/id_dsa):
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /home/grid/.ssh/id_dsa.
-
Your public key has been saved in /home/grid/.ssh/id_dsa.pub.
-
The key fingerprint is:
-
35:f9:d3:24:1c:f9:11:39:03:3a:40:02:55:a4:1b:cf grid@oradb1
-
-
[grid@oradb1 ~]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
-
[grid@oradb1 ~]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
-
-
-
[grid@oradb2 ~]$ rm -rf .ssh/
-
[grid@oradb2 ~]$ ssh-keygen -t rsa
-
Generating public/private rsa key pair.
-
Enter file in which to save the key (/home/grid/.ssh/id_rsa): Created directory '/home/grid/.ssh'.
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /home/grid/.ssh/id_rsa.
-
Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
-
The key fingerprint is:
-
3c:6b:a2:d6:95:ff:25:59:9f:88:a2:77:81:07:24:ae grid@oradb2
-
-
[grid@oradb2 ~]$ ssh-keygen -t dsa
-
Generating public/private dsa key pair.
-
Enter file in which to save the key (/home/grid/.ssh/id_dsa):
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /home/grid/.ssh/id_dsa.
-
Your public key has been saved in /home/grid/.ssh/id_dsa.pub.
-
The key fingerprint is:
-
72:a0:05:67:64:bd:68:bf:8f:a3:3b:ef:59:40:13:89 grid@oradb2
-
-
[grid@oradb2 ~]$ scp oradb1:/home/grid/.ssh/authorized_keys .ssh/
-
The authenticity of host 'oradb1 (172.27.90.158)' can't be established.
-
RSA key fingerprint is e4:98:0f:bd:d8:5e:7c:d2:d8:bf:20:05:d3:34:c8:8e.
-
Are you sure you want to continue connecting (yes/no)? yes
-
Warning: Permanently added 'oradb1,172.27.90.158' (RSA) to the list of known hosts.
-
grid@oradb1's password:
-
authorized_keys 100% 994 1.0KB/s 00:00
-
[grid@oradb2 ~]$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys
-
[grid@oradb2 ~]$ cat .ssh/id_dsa.pub >> .ssh/authorized_keys
-
[grid@oradb2 ~]$ scp .ssh/authorized_keys oradb1:.ssh/
-
grid@oradb1
十五、oradb1安装必须rpm包,略过:
十六、安装asmlib包:
-
[root@oradb1 asm]# ls -rtl
-
total 244
-
-rwxr-xr-x 1 root root 14176 Dec 24 22:13 oracleasmlib-2.0.4-1.el5.x86_64.rpm
-
-rwxr-xr-x 1 root root 85464 Dec 24 22:16 oracleasm-support-2.1.4-1.el5.i386.rpm
-
-rw-r--r-- 1 root root 137486 Dec 24 22:39 oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm
-
-
[root@oradb1 asm]# rpm -ivh oracleasm-support-2.1.4-1.el5.i386.rpm
-
warning: oracleasm-support-2.1.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
-
Preparing... ########################################### [100%]
-
1:oracleasm-support ########################################### [100%]
-
-
[root@oradb1 asm]# rpm -ivh oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm
-
warning: oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
-
Preparing... ########################################### [100%]
-
1:oracleasm-2.6.18-194.el########################################### [100%]
-
-
-
[root@oradb1 asm]# rpm -ivh oracleasmlib-2.0.4-1.el5.x86_64.rpm
-
warning: oracleasmlib-2.0.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
-
Preparing... ########################################### [100%]
-
1:oracleasmlib ########################################### [100%]
-
-
[root@oradb1 asm]# rpm -qa|grep oracleasm
-
oracleasm-2.6.18-194.el5-2.0.5-1.el5
-
oracleasmlib-2.0.4-1.el5
-
oracleasm-support-2.1.4-1.el5
十七、初始化ASMLib并认盘:
-
[root@oradb1 asm]# /etc/init.d/oracleasm configure
-
Configuring the Oracle ASM library driver.
-
-
This will configure the on-boot properties of the Oracle ASM library
-
driver. The following questions will determine whether the driver is
-
loaded on boot and what permissions it will have. The current values
-
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
-
answer will keep that current value. Ctrl-C will abort.
-
-
Default user to own the driver interface [grid]:
-
Default group to own the driver interface [asmadmin]:
-
Start Oracle ASM library driver on boot (y/n) [y]:
-
Scan for Oracle ASM disks on boot (y/n) [y]:
-
Writing Oracle ASM library driver configuration: done
-
Initializing the Oracle ASMLib driver: [ OK ]
-
Scanning the system for Oracle ASMLib disks: [ OK ]
-
-
[root@oradb1 asm]# /etc/init.d/oracleasm listdisks
-
CRSVOL1
-
DATAVOL1
-
FRAVOL1
-
-
[root@oradb1 ~]# ls -rtl /dev/oracleasm/disks/
-
total 0
-
brw-rw---- 1 grid asmadmin 8, 17 Dec 24 22:43 CRSVOL1
-
brw-rw---- 1 grid asmadmin 8, 33 Dec 24 22:43 DATAVOL1
-
brw-rw---- 1 grid asmadmin 8, 49 Dec 24 22:43 FRAVOL1
十八、安装CVUqdisk包:
-
[root@oradb1 rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm
-
Preparing... ########################################### [100%]
-
Using default group oinstall to install package
-
1:cvuqdisk ########################################### [100%]
十九、cluvfy验证检查部署条件是否满足:
-
[grid@oradb2 ~]$ cluvfy stage -post hwos -n oradb1
-
-
执行 硬件和操作系统设置 的后期检查
-
-
正在检查节点的可访问性...
-
节点 "oradb2" 的节点可访问性检查已通过
-
-
-
正在检查等同用户...
-
用户 "grid" 的等同用户检查已通过
-
-
正在检查节点连接性...
-
-
正在检查主机配置文件...
-
-
主机配置文件的验证成功
-
-
含有节点 oradb1 的子网 "172.27.90.0" 的节点连接性检查已通过
-
子网 "172.27.90.0" 的 TCP 连接性检查通过
-
-
含有节点 oradb1 的子网 "10.10.1.0" 的节点连接性检查已通过
-
子网 "10.10.1.0" 的 TCP 连接性检查通过
-
-
-
在子网 "172.27.90.0" 上找到的很可能是用于 VIP 的候选接口的接口为:
-
oradb1 eth0:172.27.90.158
-
-
在子网 "10.10.1.0" 上找到的很可能是用于专用互连的候选接口的接口为:
-
oradb1 eth1:10.10.1.1
-
-
节点连接性检查已通过
-
-
正在检查多点传送通信...
-
-
正在检查子网 "172.27.90.0" 是否能够与多点传送组 "230.0.1.0" 进行多点传送通信...
-
子网 "172.27.90.0" 是否能够与多点传送组 "230.0.1.0" 进行多点传送通信的检查已通过。
-
-
正在检查子网 "10.10.1.0" 是否能够与多点传送组 "230.0.1.0" 进行多点传送通信...
-
子网 "10.10.1.0" 是否能够与多点传送组 "230.0.1.0" 进行多点传送通信的检查已通过。
-
-
多点传送通信检查已通过。
-
对 UID 值为 0 的多个用户进行的检查已通过
-
时区一致性 检查已通过
-
-
正在检查共享存储的可访问性...
-
-
Disk 共享节点 (1 个)
-
------------------------------------ ------------------------
-
/dev/sda oradb1
-
-
Disk 共享节点 (1 个)
-
------------------------------------ ------------------------
-
/dev/sdb oradb1
-
-
Disk 共享节点 (1 个)
-
------------------------------------ ------------------------
-
/dev/sdc oradb1
-
-
Disk 共享节点 (1 个)
-
------------------------------------ ------------------------
-
/dev/sdd oradb1
-
-
-
节点 "oradb1" 上的共享存储检查成功
-
-
硬件和操作系统设置 的后期检查成功。
二十、执行addNode.sh将节点一添加至RAC:
-
[grid@oradb2 bin]$ cd $ORACLE_HOME/oui/bin
-
[grid@oradb2 bin]$ ls
-
addLangs.sh* attachHome.sh* filesList.bat* filesList.sh* resource/ runInstaller* runSSHSetup.sh*
-
addNode.sh* detachHome.sh* filesList.properties* lsnodes* runConfig.sh* runInstaller.sh*
-
[grid@oradb2 bin]$ ./addNode.sh "CLUSTER_NEW_NODES={oradb1}"
-
-
./addNode.sh -
-
silent "CLUSTER_NEW_NODES={oradb1}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={oradb1-vip}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={oradb1-priv}"
-
-
-
执行 添加节点 的预检查
-
-
ERROR:
-
PRVF-7610 : 无法在现有集群节点上验证等同用户/可访问性
-
验证无法继续
-
-
#在所有节点上预检查 添加节点 失败。
-
[grid@oradb2 bin]$ export IGNORE_PREADDNODE_CHECKS=Y
-
[grid@oradb2 bin]$ ./addNode.sh -silent "CLUSTER_NEW_NODES={oradb1}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={oradb1-vip}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={oradb1-priv}"
-
-
-
./addNode.sh "CLUSTER_NEW_NODES={oadb1};
-
-
2.节点1上grid用户执行
-
$ORACLE_HOME/oui/bin/addNode.sh "CLUSTER_NEW_NODES={rac2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={rac2-vip}
一些无关紧要的小问题检查不通过,在图形界面安装时是可以忽略的,这里是不能直接忽略的,需要修改一下addNode.sh文件
-
#!/bin/sh
-
OHOME=/u01/app/11.2.0/grid
-
INVPTRLOC=$OHOME/oraInst.loc
-
EXIT_CODE=0
-
ADDNODE="$OHOME/oui/bin/runInstaller -addNode -invPtrLoc $INVPTRLOC ORACLE_HOME=$OHOME $*"
-
if [ "$IGNORE_PREADDNODE_CHECKS" = "Y" -o ! -f "$OHOME/cv/cvutl/check_nodeadd.pl" ]
-
then
-
$ADDNODE
-
EXIT_CODE=$?;
-
else
-
CHECK_NODEADD="$OHOME/perl/bin/perl $OHOME/cv/cvutl/check_nodeadd.pl -pre ORACLE_HOME=$OHOME $*"
-
$CHECK_NODEADD
-
EXIT_CODE=$?;
-
<span style="color:#ff0000;">EXIT_CODE=0 ##在这里添加一行,用于忽略一些小错误</span>
-
if [ $EXIT_CODE -eq 0 ]
-
then
-
$ADDNODE
-
EXIT_CODE=$?;
-
fi
-
fi
-
exit $EXIT_CODE ;
#重新执行
-
[grid@oradb2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/opt/app/11.2.0/grid "CLUSTER_NODES={oradb2}"
-
正在启动 Oracle Universal Installer...
-
-
检查交换空间: 必须大于 500 MB。 实际为 3002 MB 通过
-
The inventory pointer is located at /etc/oraInst.loc
-
The inventory is located at /opt/app/oraInventory
-
'UpdateNodeList' 成功。
#在节点一执行root脚本:
-
[root@oradb1 app]# /opt/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= /opt/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.
-
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
-
Creating trace directory
-
OLR initialization - successful
-
Adding Clusterware entries to inittab
-
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node oradb2, number 2, and is terminating
-
An active cluster was found during exclusive startup, restarting to join the cluster
-
clscfg: EXISTING configuration version 5 detected.
-
clscfg: version 5 is 11g Release 2.
-
Successfully accumulated necessary OCR keys.
-
Creating OCR keys for user 'root', privgrp 'root'..
-
Operation successful.
-
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
二十一:检查添加后的集群节点是否正确:
-
[grid@oradb1 ~]$ crsctl check cluster -all
-
**************************************************************
-
oradb1:
-
CRS-4537: Cluster Ready Services is online
-
CRS-4529: Cluster Synchronization Services is online
-
CRS-4533: Event Manager is online
-
**************************************************************
-
oradb2:
-
CRS-4537: Cluster Ready Services is online
-
CRS-4529: Cluster Synchronization Services is online
-
CRS-4533: Event Manager is online
-
**************************************************************
-
[grid@oradb1 ~]$ crsctl stat res -t
-
--------------------------------------------------------------------------------
-
NAME TARGET STATE SERVER STATE_DETAILS
-
--------------------------------------------------------------------------------
-
Local Resources
-
--------------------------------------------------------------------------------
-
ora.DATACRS.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.DATAVOL1.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.FRAVOL1.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.LISTENER.lsnr
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.asm
-
ONLINE ONLINE oradb1 Started
-
ONLINE ONLINE oradb2 Started
-
ora.gsd
-
OFFLINE OFFLINE oradb1
-
OFFLINE OFFLINE oradb2
-
ora.net1.network
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.ons
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.registry.acfs
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
--------------------------------------------------------------------------------
-
Cluster Resources
-
--------------------------------------------------------------------------------
-
ora.LISTENER_SCAN1.lsnr
-
1 ONLINE ONLINE oradb2
-
ora.cvu
-
1 ONLINE ONLINE oradb2
-
ora.oc4j
-
1 ONLINE ONLINE oradb2
-
ora.oradb1.vip
-
1 ONLINE ONLINE oradb1
-
ora.oradb2.vip
-
1 ONLINE ONLINE oradb2
-
ora.scan1.vip
-
1 ONLINE ONLINE oradb2
-
ora.tjtvdb.db
-
2 ONLINE ONLINE oradb2 Open
-
[root@oradb1 app]# ps -ef|grep asm|grep -v grep
-
grid 23133 1 0 04:36 ? 00:00:00 asm_pmon_+ASM1
-
grid 23135 1 0 04:36 ? 00:00:00 asm_psp0_+ASM1
-
grid 23137 1 0 04:36 ? 00:00:00 asm_vktm_+ASM1
-
grid 23141 1 0 04:36 ? 00:00:00 asm_gen0_+ASM1
-
grid 23143 1 0 04:36 ? 00:00:00 asm_diag_+ASM1
-
grid 23145 1 0 04:36 ? 00:00:00 asm_ping_+ASM1
-
grid 23147 1 0 04:36 ? 00:00:00 asm_dia0_+ASM1
-
grid 23149 1 0 04:36 ? 00:00:00 asm_lmon_+ASM1
-
grid 23151 1 0 04:36 ? 00:00:00 asm_lmd0_+ASM1
-
grid 23153 1 0 04:36 ? 00:00:00 asm_lms0_+ASM1
-
grid 23157 1 0 04:36 ? 00:00:00 asm_lmhb_+ASM1
-
grid 23159 1 0 04:36 ? 00:00:00 asm_mman_+ASM1
-
grid 23161 1 0 04:36 ? 00:00:00 asm_dbw0_+ASM1
-
grid 23163 1 0 04:36 ? 00:00:00 asm_lgwr_+ASM1
-
grid 23165 1 0 04:36 ? 00:00:00 asm_ckpt_+ASM1
-
grid 23167 1 0 04:36 ? 00:00:00 asm_smon_+ASM1
-
grid 23169 1 0 04:36 ? 00:00:00 asm_rbal_+ASM1
-
grid 23171 1 0 04:36 ? 00:00:00 asm_gmon_+ASM1
-
grid 23173 1 0 04:36 ? 00:00:00 asm_mmon_+ASM1
-
grid 23175 1 0 04:36 ? 00:00:00 asm_mmnl_+ASM1
-
grid 23177 1 0 04:36 ? 00:00:00 asm_lck0_+ASM1
-
grid 23215 1 0 04:36 ? 00:00:00 asm_asmb_+ASM1
-
grid 23217 1 0 04:36 ? 00:00:00 oracle+ASM1_asmb_+asm1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
-
grid 23219 1 0 04:36 ? 00:00:00 asm_o000_+ASM1
-
grid 23221 1 0 04:36 ? 00:00:00 oracle+ASM1_o000_+asm1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
-
[grid@oradb2 bin]$ crs_stat -t -v -c oradb1
-
Name Type R/RA F/FT Target State Host
-
----------------------------------------------------------------------
-
ora.DATACRS.dg ora....up.type 0/5 0/ ONLINE ONLINE oradb1
-
ora....VOL1.dg ora....up.type 0/5 0/ ONLINE ONLINE oradb1
-
ora.FRAVOL1.dg ora....up.type 0/5 0/ ONLINE ONLINE oradb1
-
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE oradb1
-
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE oradb1
-
ora....network ora....rk.type 0/5 0/ ONLINE ONLINE oradb1
-
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE oradb1
-
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE oradb1
-
ora....B1.lsnr application 0/5 0/0 ONLINE ONLINE oradb1
-
ora.oradb1.ons application 0/3 0/0 ONLINE ONLINE oradb1
-
ora.oradb1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE oradb1
-
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE oradb1
二十一、通过addNode.sh添加数据库软件:
-
[oracle@oradb2 bin]$ cd $ORACLE_HOME/oui/bin
-
[oracle@oradb2 bin]$ ./addNode.sh "CLUSTER_NEW_NODES={oradb1}"
-
-
执行 添加节点 的预检查
-
-
正在检查节点的可访问性...
-
节点 "oradb2" 的节点可访问性检查已通过
-
-
-
正在检查等同用户...
-
用户 "oracle" 的等同用户检查已通过
-
-
WARNING:
-
节点 "oradb1" 已显示为集群的一部分
-
-
添加节点 的预检查成功。
-
正在启动 Oracle Universal Installer...
-
-
检查交换空间: 必须大于 500 MB。 实际为 2920 MB 通过
-
Oracle Universal Installer, 版本 11.2.0.3.0 Production
-
版权所有 (c) 1999, 2011, Oracle。保留所有权利。
-
-
-
执行测试以检查节点 oradb1,oradb1 是否可用
-
............................................................... 100% 已完成。
-
-
SEVERE:新节点 'oradb1' 已属于集群。
#执行如下脚本更新节点信息:
-
[oracle@oradb2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1 "CLUSTER_NODES={oradb2}"
-
正在启动 Oracle Universal Installer...
-
-
检查交换空间: 必须大于 500 MB。 实际为 2920 MB 通过
-
The inventory pointer is located at /etc/oraInst.loc
-
The inventory is located at /opt/app/oraInventory
-
'UpdateNodeList' 成功。
#继续执行添加节点操作:
#执行root.sh脚本:
-
[root@oradb1 app]# /opt/app/oracle/product/11.2.0/dbhome_1/root.sh
-
Performing root user operation for Oracle 11g
-
-
The following environment variables are set as:
-
ORACLE_OWNER= oracle
-
ORACLE_HOME= /opt/app/oracle/product/11.2.0/dbhome_1
-
-
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.
-
Finished product-specific root actions.
二十二:检查数据库添加情况:
-
[grid@oradb1 ~]$ crsctl status res -t
-
--------------------------------------------------------------------------------
-
NAME TARGET STATE SERVER STATE_DETAILS
-
--------------------------------------------------------------------------------
-
Local Resources
-
--------------------------------------------------------------------------------
-
ora.DATACRS.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.DATAVOL1.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.FRAVOL1.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.LISTENER.lsnr
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.asm
-
ONLINE ONLINE oradb1 Started
-
ONLINE ONLINE oradb2 Started
-
ora.gsd
-
OFFLINE OFFLINE oradb1
-
OFFLINE OFFLINE oradb2
-
ora.net1.network
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.ons
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.registry.acfs
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
--------------------------------------------------------------------------------
-
Cluster Resources
-
--------------------------------------------------------------------------------
-
ora.LISTENER_SCAN1.lsnr
-
1 ONLINE ONLINE oradb2
-
ora.cvu
-
1 ONLINE ONLINE oradb2
-
ora.oc4j
-
1 ONLINE ONLINE oradb2
-
ora.oradb1.vip
-
1 ONLINE ONLINE oradb1
-
ora.oradb2.vip
-
1 ONLINE ONLINE oradb2
-
ora.scan1.vip
-
1 ONLINE ONLINE oradb2
-
ora.tjtvdb.db
-
1 ONLINE ONLINE oradb1 Open
-
2 ONLINE ONLINE oradb2 Open
二十三、手工执行dbca添加实例:
二十四、检查实例是否已经成功添加
-
[grid@oradb1 ~]$ crsctl status res -t
-
--------------------------------------------------------------------------------
-
NAME TARGET STATE SERVER STATE_DETAILS
-
--------------------------------------------------------------------------------
-
Local Resources
-
--------------------------------------------------------------------------------
-
ora.DATACRS.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.DATAVOL1.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.FRAVOL1.dg
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.LISTENER.lsnr
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.asm
-
ONLINE ONLINE oradb1 Started
-
ONLINE ONLINE oradb2 Started
-
ora.gsd
-
OFFLINE OFFLINE oradb1
-
OFFLINE OFFLINE oradb2
-
ora.net1.network
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.ons
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
ora.registry.acfs
-
ONLINE ONLINE oradb1
-
ONLINE ONLINE oradb2
-
--------------------------------------------------------------------------------
-
Cluster Resources
-
--------------------------------------------------------------------------------
-
ora.LISTENER_SCAN1.lsnr
-
1 ONLINE ONLINE oradb2
-
ora.cvu
-
1 ONLINE ONLINE oradb2
-
ora.oc4j
-
1 ONLINE ONLINE oradb2
-
ora.oradb1.vip
-
1 ONLINE ONLINE oradb1
-
ora.oradb2.vip
-
1 ONLINE ONLINE oradb2
-
ora.scan1.vip
-
1 ONLINE ONLINE oradb2
-
ora.tjtvdb.db
-
1 ONLINE ONLINE oradb1 Open
-
2 ONLINE ONLINE oradb2 Open
二十五、我们可以看到实例已经成功添加,至此整个RAC的节点替换已经完成。