RAC 修改IP:
版本信息:
REDHAT AS5
ORACLE 11G R2, 两个节点。
修改如下:
1.修改/etc/host(rac1,rac2)
192.168.3.205 rac-scan --> 192.168.2.205 192.168.3.201 rac1 --> 192.168.2.201 192.168.3.203 rac2 --> 192.168.2.203
192.168.0.201 rac1-private 192.168.0.203 rac2-private
192.168.3.202 rac1-vip --> 192.168.2.202 192.168.3.204 rac2-vip --> 192.168.2.204
1.关闭服务
./crs_stop -all ./crs_stop ora.DATA.dg ./crs_stop ora.RECOVERY.dg
NAME=ora.RECOVERY.dg TYPE=ora.diskgroup.type TARGET=OFFLINE STATE=ONLINE on rac2
NAME=ora.asm TYPE=ora.asm.type TARGET=OFFLINE STATE=ONLINE on rac2
-------------------------------------------------- [grid@rac1 bin]$ ./srvctl stop asm -n rac1 PRCR-1014 : 无法停止资源 ora.asm PRCR-1065 : 无法停止资源 ora.asm CRS-2673: 尝试停止 'ora.asm' (在 'rac1' 上) ORA-15097: 无法对连接有客户机的 ASM 实例执行 SHUTDOWN CRS-2675: 未能停止 'ora.asm' (在 'rac1' 上)
CRS-2675: 未能停止 'ora.asm' (在 'rac1' 上)
ORA-15097: 无法对连接有客户机的 ASM 实例执行 SHUTDOWN CRS-2675: 未能停止 'ora.asm' (在 'rac1' 上) CRS-2675: 未能停止 'ora.asm' (在 'rac1' 上) 11gr2下,asm是cssd下面管理的要把cssd关掉查,才能关闭asm,在root用户下,执行crs命令,关闭整个crs服务。 [root@rac1 init.d]# find / -name crsctl /opt/rac/11.2.0/grid/bin/crsctl [root@rac1 init.d]#/opt/rac/11.2.0/grid/bin/crsctl stop crs
3.修改IP 并重启网络服务
此步省略
4.使用oifcfg修改网卡设置
[root@rac2 bin]# ./oifcfg getif eth0 192.168.3.0 global public eth1 192.168.0.0 global cluster_interconnect
--删除 [oracle@node1 bin]$ oifcfg delif -global eth0
--添加 [oracle@node1 bin]$ oifcfg setif -global eth0/192.168.2.0:public
(只要在一个节点修改即可)
5. 修改VIP
[root@rac1 bin]# ./srvctl modify nodeapps -n rac1 -A 192.168.2.202/255.255.255.0/eth0
[root@rac2 bin]# ./srvctl modify nodeapps -n rac2 -A 192.168.2.204/255.255.255.0/eth0
6.修改SCAN IP
[root@rac1 bin]# ./srvctl config scan SCAN 名称: rac-scan, 网络: 1/192.168.2.0/255.255.255.0/eth0 SCAN VIP 名称: scan1, IP: /192.168.3.205/192.168.3.205 You have new mail in /var/spool/mail/root [root@rac1 bin]# ./srvctl stop scan_listener [root@rac1 bin]# ./srvctl stop scan [root@rac1 bin]# ./srvctl status scan SCAN VIP scan1 已启用 SCAN VIP scan1 未运行 [root@rac1 bin]# ./srvctl modify scan -n 192.168.2.205 [root@rac1 bin]# ./srvctl config scan SCAN 名称: 192.168.2.205, 网络: 1/192.168.2.0/255.255.255.0/eth0 SCAN VIP 名称: scan1, IP: /rac-scan/192.168.2.205 [root@rac1 bin]#
6.检查状态:
[root@rac1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.CRS.dg ora....up.type ONLINE ONLINE rac1
ora.DATA.dg ora....up.type ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type OFFLINE OFFLINE
ora....VERY.dg ora....up.type ONLINE ONLINE rac1
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.eons ora.eons.type ONLINE ONLINE rac1
ora.gsd ora.gsd.type ONLINE ONLINE rac1
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type ONLINE ONLINE rac1
ora.ons ora.ons.type ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
ora.racdb.db ora....se.type ONLINE ONLINE rac1
ora....ry.acfs ora....fs.type ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type OFFLINE OFFLINE
You have new mail in /var/spool/mail/root
看到还有两个服务没有启动,各自启动:
[root@rac1 bin]# ./crs_start ora.scan1.vip
尝试启动 `ora.scan1.vip` (在成员 `rac2` 上)
启动 `ora.scan1.vip` (在成员 `rac2` 上) 成功。
[root@rac1 bin]# ./crs_start ora.scan2.vip
CRS-0210: Could not find resource 'ora.scan2.vip'.
查看还没有启动的服务全名:
[root@rac1 bin]# ./crs_stat
NAME=ora.CRS.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.LISTENER_SCAN1.lsnr
TYPE=ora.scan_listener.type
TARGET=OFFLINE
STATE=OFFLINE
NAME=ora.RECOVERY.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.eons
TYPE=ora.eons.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.gsd
TYPE=ora.gsd.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.net1.network
TYPE=ora.network.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.oc4j
TYPE=ora.oc4j.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.ons
TYPE=ora.ons.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.rac1.ASM1.asm
TYPE=application
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.rac1.LISTENER_RAC1.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.rac1.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.rac1.ons
TYPE=application
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.rac1.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.rac2.ASM2.asm
TYPE=application
TARGET=ONLINE
STATE=ONLINE on rac2
NAME=ora.rac2.LISTENER_RAC2.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on rac2
NAME=ora.rac2.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on rac2
NAME=ora.rac2.ons
TYPE=application
TARGET=ONLINE
STATE=ONLINE on rac2
NAME=ora.rac2.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=ONLINE on rac2
NAME=ora.racdb.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.registry.acfs
TYPE=ora.registry.acfs.type
TARGET=ONLINE
STATE=ONLINE on rac1
NAME=ora.scan1.vip
TYPE=ora.scan_vip.type
TARGET=ONLINE
STATE=ONLINE on rac2
再启动没启动的服务
[root@rac1 bin]# ./crs_start ora.LISTENER_SCAN1.lsnr
尝试启动 `ora.LISTENER_SCAN1.lsnr` (在成员 `rac2` 上)
启动 `ora.LISTENER_SCAN1.lsnr` (在成员 `rac2` 上) 成功。
[root@rac1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.CRS.dg ora....up.type ONLINE ONLINE rac1
ora.DATA.dg ora....up.type ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type ONLINE ONLINE rac2
ora....VERY.dg ora....up.type ONLINE ONLINE rac1
ora.asm ora.asm.type ONLINE ONLINE rac1
ora.eons ora.eons.type ONLINE ONLINE rac1
ora.gsd ora.gsd.type ONLINE ONLINE rac1
ora....network ora....rk.type ONLINE ONLINE rac1
ora.oc4j ora.oc4j.type ONLINE ONLINE rac1
ora.ons ora.ons.type ONLINE ONLINE rac1
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip ora....t1.type ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type ONLINE ONLINE rac2
ora.racdb.db ora....se.type ONLINE ONLINE rac1
ora....ry.acfs ora....fs.type ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type ONLINE ONLINE rac2
来源:https://www.cnblogs.com/zwl715/p/3620963.html