欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

Oracle 10.2.0.4修改RAC的ip

程序员文章站 2024-02-09 23:17:04
...

数据库版本:Oracle 10.2.0.4节点数:2一. 停止oracle相关的所有进程, 包括数据库, asm, node application, crs本身.1.1、关闭所

基本情况

数据库版本:Oracle 10.2.0.4

节点数:2

一. 停止oracle相关的所有进程, 包括数据库, asm, node application, crs本身.

1.1、关闭所有进程,
crs_stop -all
2.2、 关闭crs后台进程, 在操作系统一级中止运行的crs后台进程, 必须在所有节点上运行.
[root@rac1 bin]# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
[root@rac2 ~]# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
1.3、验证进程是否全部关闭
[root@rac2 ~]# crs_stat -t

二、修改操作系统的ip设置
2.1、修改 /etc/hosts文件(所有的节点)
[root@rac1 ~]# vim /etc/hosts
127.0.0.1 rac1 localhost.localdomain localhost
172.20.225.91 rac1
172.20.225.92 rac2
10.73.5.91 rac1-priv
10.73.5.92 rac2-priv
172.20.225.81 rac1-vip
172.20.225.82 rac2-vip
[root@rac2 ~]# vim /etc/hosts
127.0.0.1 rac2 localhost.localdomain localhost
172.20.225.91 rac1
172.20.225.92 rac2
10.73.5.91 rac1-priv
10.73.5.92 rac2-priv
172.20.225.81 rac1-vip
172.20.225.82 rac2-vip

2.2、两个节点上分别修改eth0和eth1地址,重启使ip生效

三、修改存储链接
3.1 清除之前的链接(两个节点执行)
1)停止服务
service iscsi stop
2)去除挂载
iscsiadm -m node --op delete
3)重启服务
[root@rac1 ]# service iscsi restart
Stopping iSCSI daemon:
iscsid is stopped [ OK ]
Starting iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets: iscsiadm: No records found!
[ OK ]
3.2重新链接
1)正确配置openfiler,,请一定要严格按照文档,不要遗漏任何一步。
2)扫描
[root@100-201 ~]# iscsiadm -m discovery -t sendtargets -p 10.73.5.80
172.100.10.100:3260,1 iqn.2006-01.com.openfiler:LUN2
172.100.10.100:3260,1 iqn.2006-01.com.openfiler:LUN1

3)重启服务
service iscsi restart

四、启动crs,设置oracle中ip相关配置
3.1查看服务
[root@rac1 ~]# crs_stat -t 3.2 在两个节点启动crs, 并关闭随crs启动的应用程序
[root@rac1 ~]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
[root@rac2 ~]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.
3.3 使用oifcfg修改网卡设置, oifconfig可以用来设置和查看网卡使用的方式.
注: 如果修改的网段相同,可以不做这一步。
-- 查看当前配置:
[root@rac2 raw]# oifcfg getif -global
eth0 192.168.0.0 global public
eth1 10.10.10.0 global cluster_interconnect
-- 删除当前配置
[root@rac2 raw]# oifcfg delif -global eth0
[root@rac2 raw]# oifcfg delif -global eth1
[root@rac2 raw]# oifcfg getif
[root@rac2 raw]#
--查看当前网段
[root@rac1 ~]# oifcfg iflist
eth0 172.20.0.0
eth1 10.72.0.0
-- 重新添加
[root@rac2 raw]# oifcfg setif -global eth0/172.20.0.0:public
[root@rac2 raw]# oifcfg setif -global eth1/10.72.0.0:cluster_interconnect
[root@rac2 raw]# oifcfg getif
eth0 172.20.0.0 global public
eth1 10.72.0.0 global cluster_interconnect

[root@rac2 raw]# oifcfg iflist
eth0 172.20.0.0
eth1 10.72.0.0

注意: 这里IP 地址最一个为0. 代表的是一个网段。 修改的时候要切记。 否在在启动OCR 时 会报如下错误:
[ CRSOCR][4054413904] OCR context init failure. Error: PROC-44: 网络地址和网络接口操作中出错 网络地址和网络接口操作错误 [7]

Oracle 10.2.0.4修改RAC的ip