共计 19772 个字符,预计需要花费 50 分钟才能阅读完成。
Oracle 10g RAC 修改 public ip、vip 和 private ip
1.IP 地址规划
Hostname | 当前 IP | 修改后 IP | |
---|---|---|---|
Public IP | node1 | 192.168.56.20 | 192.168.100.20 |
Public IP | node2 | 192.168.56.21 | 192.168.100.21 |
VIP | node1-vip | 192.168.56.98 | 192.168.100.98 |
VIP | node2-vip | 192.168.56.99 | 192.168.100.99 |
Private IP | node1-priv | 10.1.1.1 | 10.10.10.1 |
Private IP | node1-priv | 10.1.1.2 | 10.10.10.2 |
2. 实施步骤规划
- 关闭所有 crs 资源,保留 crs 进程
- 备份 OCR
- 修改 Public IP
- 修改 VIP
- 修改 tnsnames.ora 和 listener.ora
- 修改 /etc/hosts
- 修改操作系统 IP
- 重启 crs 及 crs 资源
- 修改 local_listener
3. 详细操作示例
3.1 关闭所有 crs 资源
因为修改 Public IP 和 vip 的命令均依赖于 crs,所以修改修改 Public IP 和 vip 前需要关闭所有的 crs 资源,保留 crs 进程。
-
首先查看集群状态
[root@node1 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.iesdb.db application ONLINE ONLINE node1
ora....b1.inst application ONLINE ONLINE node1
ora....b2.inst application ONLINE ONLINE node2
ora....srac.cs application ONLINE ONLINE node2
ora....db1.srv application ONLINE ONLINE node1
ora....db2.srv application ONLINE ONLINE node2
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
-
关闭所有的 crs 资源
oracle 用户登录节点 1,依次执行以下命令:
[oracle@node1 ~]$ srvctl stop database -d iesdb
[oracle@node1 ~]$ srvctl stop asm -n node1
[oracle@node1 ~]$ srvctl stop asm -n node2
[oracle@node1 ~]$ srvctl stop nodeapps -n node1
[oracle@node1 ~]$ srvctl stop nodeapps -n node2
现在查看 crs 资源已经全部关闭:
[oracle@node1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.iesdb.db application OFFLINE OFFLINE
ora....b1.inst application OFFLINE OFFLINE
ora....b2.inst application OFFLINE OFFLINE
ora....srac.cs application OFFLINE OFFLINE
ora....db1.srv application OFFLINE OFFLINE
ora....db2.srv application OFFLINE OFFLINE
ora....SM1.asm application OFFLINE OFFLINE
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application OFFLINE OFFLINE
ora.node1.vip application OFFLINE OFFLINE
ora....SM2.asm application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application OFFLINE OFFLINE
ora.node2.vip application OFFLINE OFFLINE
3.2 备份 OCR
OCR 相当于 Windows 的注册表。对于 Windows 而言,所有的软件信息,用户,配置,安全等等统统都放到注册表里边。而集群呢,同样如此,所有和集群相关的资源,配置,节点,RAC 数据库统统都放在这个仓库里。如果 OCR 被破坏则导致集群服务启动异常,需要修复 OCR。因此 OCR 的管理与维护对于整个集群而言,是相当重要的。
OCR 中通常包含下列内容
-
节点成员信息
-
数据库实例,节点,以及其他的映射关系
-
ASM
-
资源配置信息 (vip,services 等等)
-
服务特性 (Service characteristics)
-
Oracle 集群中相关进程的信息
-
CRS 控制的第三方应用程序信息
这里进行 OCR 备份,主要是为了在 oracle 集群配置出错时能够通过 OCR 备份进行恢复。
root 用户登录,只需在一个节点进行 OCR 备份即可:
# 首先创建备份文件夹
[root@node1 ~]# mkdir /ocr_backup
# ocr 备份,备份文件任意后缀名均可
[root@node1 ~]# ocrconfig -export /ocr_backup/ocr201706.bak
3.3 修改 Public IP
如果将要修改的 Public IP 和原来的网段相同,则略过此步骤。
oracle 用户登录:
# 查看当前状态
[oracle@node1 ~]$ oifcfg getif
eth0 192.168.56.0 global public
eth1 10.1.1.0 global cluster_interconnect
# 删除 Public IP 配置信息
[oracle@node1 ~]$ oifcfg delif -global eth0
[oracle@node1 ~]$ oifcfg getif
eth1 10.1.1.0 global cluster_interconnect
# 配置新的 Public IP 网段
[oracle@node1 ~]$ oifcfg setif -global eth0/192.168.100.0:public
[oracle@node1 ~]$ oifcfg getif
eth0 192.168.100.0 global public
eth1 10.1.1.0 global cluster_interconnect
# Public IP 配置成功
3.4 修改 VIP
root 用户登录:
# 首先根据 oracle 用户的配置设置 ORACLE_HOME 变量
[root@node1 ~]# export ORACLE_HOME="/oracle/product/10.2.0/db"
#查看当前的 VIP 信息
[root@node1 ~]# srvctl config nodeapps -n node1 -a
VIP 已存在。: /node1-vip/192.168.56.98/255.255.255.0/eth0
[root@node1 ~]# srvctl config nodeapps -n node2 -a
VIP 已存在。: /node2-vip/192.168.56.99/255.255.255.0/eth0
#修改 VIP
[root@node1 ~]# srvctl modify nodeapps -h
用法: srvctl modify nodeapps -n <node_name> [-o <oracle_home>] [-A <new_vip_address>]
-n <node> 节点名
-A <addr_str> 节点级虚拟 IP 地址
-o <oracle_home> ORACLE_HOME 路径
-h 打印用法
[root@node1 ~]# srvctl modify nodeapps -n node1 -A 192.168.100.98/255.255.255.0/eth0
[root@node1 ~]# srvctl modify nodeapps -n node2 -A 192.168.100.99/255.255.255.0/eth0
#查看修改后的 VIP
[root@node1 ~]# srvctl config nodeapps -n node1 -a
VIP 已存在。: /192.168.100.98/192.168.100.98/255.255.255.0/eth0
[root@node1 ~]# srvctl config nodeapps -n node2 -a
VIP 已存在。: /192.168.100.99/192.168.100.99/255.255.255.0/eth0
# VIP 修改成功
3.5 修改 tnsnames.ora 和 listener.ora
oracle 用户登录,所有节点均进行修改:
[oracle@node1 db]$ cd $ORACLE_HOME/network/admin
# 修改前先进行文件备份
[oracle@node1 admin]$ cp -a tnsnames.ora tnsnames.ora.bak
[oracle@node1 admin]$ cp -a listener.ora listener.ora.bak
然后检查者两个文件,文件中 Public IP 和 VIP 为 hostname 的不做修改,文件中 Public IP 和 VIP 为 IP 地址的修改为新的 Public IP 和 VIP。
示例:
# 将文件中的 192.168.56.20 修改为新的 Public IP:192.168.100.20,
# 文件中的 node1-vip 保持不变
[oracle@node1 admin]$ cat listener.ora
# listener.ora.node1 Network Configuration File: /oracle/product/10.2.0/db/network/admin/listener.ora.node1
# Generated by Oracle configuration tools.
SID_LIST_LISTENER_NODE1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/10.2.0/db)
(PROGRAM = extproc)
)
)
LISTENER_NODE1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.20)(PORT = 1521)(IP = FIRST))
)
)
3.6 修改 /etc/hosts
root 用户登录,所有节点均修改:
# 首先备份 hosts 文件
[root@node1 admin]# cp -a /etc/hosts /etc/hosts.bak
#查看当前 hosts 配置文件
[root@node1 admin]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.56.20 node1
192.168.56.21 node2
192.168.56.98 node1-vip
192.168.56.99 node2-vip
10.1.1.1 node1-priv
10.1.1.2 node2-priv
将其中的 Public IP 和 VIP 均修改为新的 IP 地址:
# 修改后的 hosts 文件
[root@node1 admin]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.100.20 node1
192.168.100.21 node2
192.168.100.98 node1-vip
192.168.100.99 node2-vip
10.1.1.1 node1-priv
10.1.1.2 node2-priv
3.7 修改操作系统 IP
root 用户登录,将所有节点的 Public IP 修改为新地址,然后重启网络服务:
[root@node1 ~]# cd /etc/sysconfig/network-scripts/
[root@node1 network-scripts]# vim ifcfg-eth0
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HWADDR=08:00:27:b2:d1:1b
NETMASK=255.255.255.0
IPADDR=192.168.100.20
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
# 重启网络服务
[root@node1 network-scripts]# service network restart
修改成功后,root 用户登录,确保所有节点的 Public IP 和 Private IP 可以相互 ping 通。
3.8 重启 crs 及 crs 资源
root 用户登录,所有节点均执行以下操作:
# 首先关闭 CRS,(所有节点执行完该命令再继续下一步)
[root@node1 ~]# crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
# 开启 CRS(所有节点)
[root@node1 ~]# crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
稍等片刻,所有节点的 crs 资源均会正常启动:
[root@node1 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.iesdb.db application ONLINE ONLINE node1
ora....b1.inst application ONLINE ONLINE node1
ora....b2.inst application ONLINE ONLINE node2
ora....srac.cs application ONLINE ONLINE node2
ora....db1.srv application ONLINE ONLINE node1
ora....db2.srv application ONLINE ONLINE node2
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
网络信息如下:
[root@node1 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:B2:D1:1B
inet addr:192.168.100.20 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8697 errors:0 dropped:0 overruns:0 frame:0
TX packets:28955 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:788771 (770.2 KiB) TX bytes:35854996 (34.1 MiB)
eth0:1 Link encap:Ethernet HWaddr 08:00:27:B2:D1:1B
inet addr:192.168.100.98 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth1 Link encap:Ethernet HWaddr 08:00:27:CB:6A:BB
inet addr:10.1.1.1 Bcast:10.1.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:322721 errors:0 dropped:0 overruns:0 frame:0
TX packets:283490 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:198377998 (189.1 MiB) TX bytes:145057008 (138.3 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:110006 errors:0 dropped:0 overruns:0 frame:0
TX packets:110006 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:55092250 (52.5 MiB) TX bytes:55092250 (52.5 MiB)
3.9 修改 local_listener
最后,还需要修改 oracle 的 local_listener。
oracle 用户登录, 只在一个节点操作即可:
注意:sql 语句中的 IP 地址为新的 VIP,如下:
ALTER SYSTEM SET LOCAL_LISTENER = ‘(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.100.98)(PORT = 1521))’ scope=both SID = ‘iesdb1’;
[root@node1 ~]# su - oracle
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Jun 16 18:31:50 2017
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> show parameter local_listener;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS = (PROTOCOL = TCP)(HO
ST = 192.168.56.98)(PORT = 152
1))
SQL> ALTER SYSTEM SET LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.98)(PORT = 1521))' scope=both SID = 'iesdb1';
System altered.
SQL> ALTER SYSTEM SET LOCAL_LISTENER = '(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.99)(PORT = 1521))' scope=both SID = 'iesdb2';
System altered.
SQL> show parameter local_listener;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS = (PROTOCOL = TCP)(HO
ST = 192.168.100.98)(PORT = 15
21))
SQL>
SQL> conn system/inspur@iesdb2
Connected.
SQL> show parameter local_listener;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS = (PROTOCOL = TCP)(HO
ST = 192.168.100.99)(PORT = 15
21))
SQL>
至此,oracle rac 的 Public IP 和 VIP 修改完毕。
4. 回退流程
如果我们中间修改出错,导致集群无法启动等,可以利用 OCR 回退至初始状态。
-
首先在所有节点关闭 crs
root 用户登录,在所有节点执行:
[root@node1 ~]# crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
-
还原所有节点的配置文件
[root@node2 etc]# cp -a /etc/hosts.bak /etc/hosts
cp:是否覆盖“/etc/hosts”? y
# 2. 还原 tnsnames.ora 和 listener.ora
[root@node2 admin]# cp -a tnsnames.ora.bak tnsnames.ora
cp:是否覆盖“tnsnames.ora”? y
[root@node2 admin]# cp -a listener.ora.bak listener.ora
cp:是否覆盖“listener.ora”? y
# 注意文件权限是否正确
[root@node2 admin]# ll tnsnames.ora
-rw-r--r-- 1 oracle oinstall 1878 06-16 10:21 tnsnames.ora
[root@node2 admin]# ll listener.ora
-rw-r--r-- 1 oracle oinstall 552 06-19 14:35 listener.or
-
还原 OCR
root 用户登录,只需在一个节点还原即可:
# 最初备份的 OCR 文件为:[root@node1 /]# ll /ocr_backup/ocr201706.bak
-rw-r--r-- 1 root root 107241 06-16 16:53 /ocr_backup/ocr201706.bak
# 还原 OCR
[root@node1 /]# ocrconfig -import /ocr_backup/ocr201706.bak
# OCR 还原成功后没有任何输出
-
还原操作系统 IP
编辑 /etc/sysconfig/network-scripts/ 目录下的网卡文件,将之前修改的网卡 IP 地址还原,然后重启网络服务。
-
启动 CRS,查看集群状态
root 用户登录,所有节点执行:
[root@node1 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.iesdb.db application ONLINE ONLINE node1
ora....b1.inst application ONLINE ONLINE node1
ora....b2.inst application ONLINE ONLINE node2
ora....srac.cs application ONLINE ONLINE node2
ora....db1.srv application ONLINE ONLINE node1
ora....db2.srv application ONLINE ONLINE node2
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
此时可以看到 CRS 各资源都从处于 ONLINE 状态,最后,重新修改 local_listener 的 IP 为 oracle VIP 即可。
-
修改 local_listener
orale 用户,只在一个节点操作即可:
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Jul 3 15:17:25 2017
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.98) (PORT = 1521))' sid='iesdb1';
System altered.
SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.99) (PORT = 1521))' sid='iesdb2';
System altered.
SQL>
修改完后,
查看 local_listener 的 IP 地址为:
[oracle@node2 ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Jul 3 15:19:10 2017
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
SQL> conn sys@iesdb1 as sysdba
Enter password:
Connected.
SQL> show parameter local_listener;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS = (PROTOCOL = TCP)(HO
ST = 192.168.56.98) (PORT = 15
21))
SQL> conn sys/inspur@iesdb2 as sysdba
Connected.
SQL> show parameter local_listener;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string (ADDRESS = (PROTOCOL = TCP)(HO
ST = 192.168.56.99) (PORT = 15
21))
至此,oracle 集群恢复完毕。
5. 修改 private ip
这里补充下修改 private ip 的方法。
可以使用 oracle 用户来修改 private ip,操作方法如下:
-
修改心跳网段为 10.10.10.0
oracle 用户登录,只在一个节点操作即可:
# 查看当前的 IP 信息
[oracle@node1 ~]$ oifcfg getif
eth0 192.168.56.0 global public
eth1 10.1.1.0 global cluster_interconnect
# 增加 10.10.10.0 网段为心跳网段
[oracle@node1 ~]$ oifcfg setif -global eth1/10.10.10.0:cluster_interconnect
[oracle@node1 ~]$ oifcfg getif
eth0 192.168.56.0 global public
eth1 10.1.1.0 global cluster_interconnect
eth1 10.10.10.0 global cluster_interconnect
# 删除原来的心跳网段
[oracle@node1 ~]$ oifcfg delif -global eth1/10.1.1.0
[oracle@node1 ~]$ oifcfg getif
eth0 192.168.56.0 global public
eth1 10.10.10.0 global cluster_interconnect
# oifcfg 帮助信息
[oracle@node1 ~]$ oifcfg -help
Name:
oifcfg - Oracle Interface Configuration Tool.
Usage: oifcfg iflist [-p [-n]]
oifcfg setif {-node <nodename> | -global} {<if_name>/<subnet>:<if_type>}...
oifcfg getif [-node <nodename> | -global] [-if <if_name>[/<subnet>] [-type <if_type>] ]
oifcfg delif [-node <nodename> | -global] [<if_name>[/<subnet>]]
oifcfg [-help]
<nodename> - name of the host, as known to a communications network
<if_name> - name by which the interface is configured in the system
<subnet> - subnet address of the interface
<if_type> - type of the interface {cluster_interconnect | public | storage}
-
关闭 CRS
root 用户,所有节点均进行操作:
[root@node1 ~]# crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
-
修改 /etc/hosts 文件中的 private ip 内容
root 用户,所有节点均进行操作:
# 修改前 hosts 文件
[root@node1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.56.20 node1
192.168.56.21 node2
192.168.56.98 node1-vip
192.168.56.99 node2-vip
10.1.1.1 node1-priv
10.1.1.2 node2-priv
# 修改后 hosts 文件
[root@node1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.56.20 node1
192.168.56.21 node2
192.168.56.98 node1-vip
192.168.56.99 node2-vip
10.10.10.1 node1-priv
10.10.10.2 node2-priv
-
修改操作系统 IP
root 用户,所有节点均操作:
[root@node1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
HWADDR=08:00:27:cb:6a:bb
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=10.10.10.1
USERCTL=no
IPV6INIT=no
PEERDNS=yes
#重启网络服务
[root@node1 ~]# service network restart
[root@node1 ~]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 08:00:27:CB:6A:BB
inet addr:10.10.10.1 Bcast:10.10.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:135852 errors:0 dropped:0 overruns:0 frame:0
TX packets:112129 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:84007109 (80.1 MiB) TX bytes:52783613 (50.3 MiB)
[root@node2 network-scripts]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 08:00:27:F6:DB:67
inet addr:10.10.10.2 Bcast:10.10.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:112136 errors:0 dropped:0 overruns:0 frame:0
TX packets:135677 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:52778410 (50.3 MiB) TX bytes:83970669 (80.0 MiB)
# 保证所有节点的心跳可以相互 ping 通
[root@node1 ~]# ping 10.10.10.2
PING 10.10.10.2 (10.10.10.2) 56(84) bytes of data.
64 bytes from 10.10.10.2: icmp_seq=1 ttl=64 time=0.884 ms
64 bytes from 10.10.10.2: icmp_seq=2 ttl=64 time=0.206 ms
-
启动 CRS
root 用户,所有节点均操作:
[root@node1 ~]# crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
[root@node1 ~]# crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.iesdb.db application ONLINE ONLINE node2
ora....b1.inst application ONLINE ONLINE node1
ora....b2.inst application ONLINE ONLINE node2
ora....srac.cs application ONLINE ONLINE node2
ora....db1.srv application ONLINE ONLINE node1
ora....db2.srv application ONLINE ONLINE node2
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
[oracle@node1 ~]$ oifcfg getif
eth0 192.168.56.0 global public
eth1 10.10.10.0 global cluster_interconnect
至此,private ip 修改完成,如果要进行回退工作,请参考“4. 回退流程”。
更多 Oracle 相关信息见 Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-07/145397.htm