从11.2开始错误的修改IP导致crs启动不了的解决方法

本文档详细介绍了当在Oracle RAC环境中,从11.2版本开始错误地修改IP地址导致CRS无法启动时,如何通过使用gpnp工具进行修复。首先模拟了错误情况,展示了11.2和12c版本的报错信息,然后逐步解释了如何以排他模式启动CRS,备份和使用gpnptool进行配置文件的修复,最后成功启动CRS并验证修复效果。
摘要由CSDN通过智能技术生成

使用RAC的时候,经常有朋友问如何修改IP,10.2的我就不说了,修改方法成熟的很,出了问题也很好解决。


从11.2开始,修改IP方法和以前差不多,但是出了问题,有些人不知道如何处理,这里介绍一个使用gpnp修复的方法(还可以用重建crs的方法),该方法已经在11.2和12c上都实施成功了。


模拟错误:

使用oifcfg故意设置错误的内部互联网段(其他使用oficfg错误的修改了IP,后果类似)

[root@lunar ~]# oifcfg -help


Name:
        oifcfg - Oracle Interface Configuration Tool. 


Usage:  oifcfg iflist [-p [-n]]
Shows the available interfaces that you can configure with 'setif' by querying the operating system to find which network interfaces are present on this node.


        where -p displays a heuristic assumption of the interface type (PRIVATE, PUBLIC, or UNKNOWN).
        -n displays the netmask.
        oifcfg setif {-node <nodename> | -global} {<if_name>/ <subnet>:<if_type>[,<if_type>...]}[,...]
        oifcfg getif [-node <nodename> | -global] [ -if <if_name>[/<subnet>] [-type <if_type>] ]
        oifcfg delif { {-node <nodename> | -global} [<if_name>[/ <subnet>]] [-force] | -force}
        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>  - one or more comma-separated interface types { cluster_interconnect | public | asm}


[root@lunar ~]# 
这里面尤其要注意,setif中写入的是subnet,我见过不只一次有人这个写错了导致crs不能启动……



[root@lunar ~]# oifcfg getif
eth1  10.10.10.0  global  cluster_interconnect
eth0  192.168.30.0  global  public
[root@lunar ~]# 




[root@lunar ~]# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:0C:29:CE:AC:D2  
          inet addr:10.10.10.66  Bcast:10.10.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:333 errors:0 dropped:0 overruns:0 frame:0
          TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:67992 (66.3 KiB)  TX bytes:18015 (17.5 KiB)


[root@lunar ~]# 

计算ip地址(这是当前的正确的网络配置):
[root@lunar ~]# ipcalc -bnm 10.10.10.66 255.255.255.0
NETMASK=255.255.255.0
BROADCAST=10.10.10.255
NETWORK=10.10.10.0
[root@lunar ~]# 

这是按照子网掩码252计算的网络配置,一会打算使用这个值模拟错误:
[root@lunar ~]# ipcalc -bnm 10.10.10.100 255.255.252.0
NETMASK=255.255.252.0
BROADCAST=10.10.11.255
NETWORK=10.10.8.0
[root@lunar ~]# 

[root@lunar ~]# oifcfg getif
eth1  10.10.10.0  global  cluster_interconnect
eth0  192.168.30.0  global  public
[root@lunar ~]# 
[root@lunar ~]# oifcfg delif -global eth1
PRIF-31: Failed to delete the specified network interface because it is the last private interface
[root@lunar ~]# 


[root@lunar ~]# oifcfg setif -global eth1/10.10.8.0:cluster_interconnect
/proc/net/ipv6_route: No such file or directory
[root@lunar ~]# 
[root@lunar network-scripts]# oifcfg getif
eth1  10.10.10.0  global  cluster_interconnect
eth0  192.168.30.0  global  public
eth1  10.10.8.0  global  cluster_interconnect
[root@lunar network-scripts]# 
[root@lunar network-scripts]# oifcfg delif -global eth1
PRIF-31: Failed to delete the specified network interface because it is the last private interface
[root@lunar network-scripts]# 

[root@lunar ~]# oifcfg delif -global eth1/10.10.10.0
[root@lunar ~]# 
[root@lunar ~]# oifcfg getif
eth0  192
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值