Oracle RAC错误之--oifcfg错误案例
系统环境:
操作系统:RedHat EL5
Cluster: Oracle GI(Grid Infrastructure)
Oracle: Oracle 11.2.0.1.0
如图所示:RAC 系统架构
错误现象:
[root@zhangqn1 ~]# oifcfg delif -global eth0/192.168.6.0:public
PRIF-26: Error in update the profiles in the cluster
RAC修改ip信息出错!
解决方法:
1、检查网络配置
[root@zhangqn1 ~]# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 08:00:27:F4:11:8F inet addr:192.168.8.231 Bcast:192.168.8.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fef4:118f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:18175 errors:0 dropped:0 overruns:0 frame:0 TX packets:2965 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1653589 (1.5 MiB) TX bytes:460593 (449.7 KiB)
[root@zhangqn1 ~]# 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 192.168.8.231 zhangqn1 192.168.8.232 zhangqn2 10.10.10.101 zhangqn1-priv 10.10.10.102 zhangqn2-priv 192.168.8.235 zhangqn1-vip 192.168.8.236 zhangqn2-vip 192.168.8.230 zhangqn-scan
2、检查RAC配置
[root@zhangqn1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2936 Available space (kbytes) : 259184 ID : 1655283749 Device/File Name : +OCR_VOTE Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check succeeded
[root@zhangqn1 ~]# crsctl query css votedisk
## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 6ba76ea8b6c04f9cbfeeaa13e9d6fab0 (ORCL:OCR_VOTE1) [OCR_VOTE] 2. ONLINE 7b8307d585724fd8bfe3d1b415c2c0aa (ORCL:OCR_VOTE2) [OCR_VOTE] 3. ONLINE 619d624c79d34fbdbfe2bb4d0cf488c2 (ORCL:OCR_VOTE3) [OCR_VOTE] Located 3 voting disk(s).
[root@zhangqn1 ~]# crs_stat -t
Name Type Target State Host ------------------------------------------------------------ ora.DATA.dg ora....up.type OFFLINE OFFLINE ora.DG1.dg ora....up.type OFFLINE OFFLINE ora.DG2.dg ora....up.type OFFLINE OFFLINE ora.DG3.dg ora....up.type OFFLINE OFFLINE ora.DG4.dg ora....up.type OFFLINE OFFLINE ora....ER.lsnr ora....er.type OFFLINE OFFLINE ora....N1.lsnr ora....er.type OFFLINE OFFLINE ora....VOTE.dg ora....up.type ONLINE ONLINE zhangqn1 ora.RCY.dg ora....up.type OFFLINE OFFLINE ora.asm ora.asm.type ONLINE ONLINE zhangqn1 ora.eons ora.eons.type ONLINE ONLINE zhangqn1 ora.gsd ora.gsd.type OFFLINE OFFLINE ora....network ora....rk.type ONLINE OFFLINE ora.oc4j ora.oc4j.type OFFLINE OFFLINE ora.ons ora.ons.type ONLINE ONLINE zhangqn1 ora.proddb.db ora....se.type OFFLINE OFFLINE ora....ry.acfs ora....fs.type ONLINE ONLINE zhangqn1 ora.scan1.vip ora....ip.type OFFLINE OFFLINE ora....SM1.asm application ONLINE ONLINE zhangqn1 ora....N1.lsnr application OFFLINE OFFLINE ora....qn1.gsd application OFFLINE OFFLINE ora....qn1.ons application ONLINE ONLINE zhangqn1 ora....qn1.vip ora....t1.type OFFLINE OFFLINE ora....SM2.asm application ONLINE ONLINE zhangqn2 ora....N2.lsnr application OFFLINE OFFLINE ora....qn2.gsd application OFFLINE OFFLINE ora....qn2.ons application ONLINE ONLINE zhangqn2 ora....qn2.vip ora....t1.type OFFLINE OFFLINE
发现ons服务仍处于online状态,ons和RAC网络配置服务有关。
附注:
Oracle Notification Service,分主节点ONS和子节点ONS,就是Oracle分布式集群系统中各服务器上发布和上报因为用户手工初始化、依赖服务失败、运行失败,自动重启等原因产生的"UP,DOWN,Not_restart,Restart_failed,Node_Down,preConn_Up,preConn_Down"事件的进程,是构成高可用性的心跳服务。 ps -ef |grep ons只能看到ONS服务是否在运行中,onsctl ping才能确认ORC服务运行是否正常。
4、停止ons服务
[root@zhangqn1 ~]# crs_stat |grep ons
NAME=ora.eons TYPE=ora.eons.type NAME=ora.ons TYPE=ora.ons.type NAME=ora.zhangqn1.ons NAME=ora.zhangqn2.ons
[root@zhangqn1 ~]# crs_stop -f ora.zhangqn1.ons Attempting to stop `ora.ons` on member `zhangqn1` Stop of `ora.ons` on member `zhangqn1` succeeded. [root@zhangqn1 ~]# crs_stop -f ora.zhangqn2.ons Attempting to stop `ora.ons` on member `zhangqn2` Stop of `ora.ons` on member `zhangqn2` succeeded.
[root@zhangqn1 ~]# crs_stat -t
Name Type Target State Host ------------------------------------------------------------ ora.DATA.dg ora....up.type OFFLINE OFFLINE ora.DG1.dg ora....up.type OFFLINE OFFLINE ora.DG2.dg ora....up.type OFFLINE OFFLINE ora.DG3.dg ora....up.type OFFLINE OFFLINE ora.DG4.dg ora....up.type OFFLINE OFFLINE ora....ER.lsnr ora....er.type OFFLINE OFFLINE ora....N1.lsnr ora....er.type OFFLINE OFFLINE ora....VOTE.dg ora....up.type ONLINE ONLINE zhangqn1 ora.RCY.dg ora....up.type OFFLINE OFFLINE ora.asm ora.asm.type ONLINE ONLINE zhangqn1 ora.eons ora.eons.type ONLINE ONLINE zhangqn1 ora.gsd ora.gsd.type OFFLINE OFFLINE ora....network ora....rk.type ONLINE OFFLINE ora.oc4j ora.oc4j.type OFFLINE OFFLINE ora.ons ora.ons.type OFFLINE OFFLINE ora.proddb.db ora....se.type OFFLINE OFFLINE ora....ry.acfs ora....fs.type ONLINE ONLINE zhangqn1 ora.scan1.vip ora....ip.type OFFLINE OFFLINE ora....SM1.asm application ONLINE ONLINE zhangqn1 ora....N1.lsnr application OFFLINE OFFLINE ora....qn1.gsd application OFFLINE OFFLINE ora....qn1.ons application OFFLINE OFFLINE ora....qn1.vip ora....t1.type OFFLINE OFFLINE ora....SM2.asm application ONLINE ONLINE zhangqn2 ora....N2.lsnr application OFFLINE OFFLINE ora....qn2.gsd application OFFLINE OFFLINE ora....qn2.ons application OFFLINE OFFLINE ora....qn2.vip ora....t1.type OFFLINE OFFLINE
5、重新通过oifcfg修改网络配置
[root@zhangqn1 ~]# oifcfg setif -global eth0/192.168.8.0:public [root@zhangqn1 ~]# ifcfg getif Missing IP address argument. [root@zhangqn1 ~]# oifcfg getif eth0 192.168.6.0 global public eth1 10.10.10.0 global cluster_interconnect eth0 192.168.8.0 global public [root@zhangqn1 ~]# oifcfg delif -global eth0/192.168.6.0 [root@zhangqn1 ~]# oifcfg getif eth1 10.10.10.0 global cluster_interconnect eth0 192.168.8.0 global public
@配置成功!