Oracle 11.2.0.4 RAC修改VIP(虚拟IP)

      本实验是在Redhat 6.5 && Oracle 11.2.0.4 RAC 环境下做的,生产中有时会需要修改RAC的VIP(虚拟IP),往往

一些Oracle 学习爱好者或者相关管理人员在进行修改时遇到各类问题,这里我将自己的实验过程展示出来,希望能给

更多的Oracle 学习爱好者一些帮助。

本次实验是要将节点2的VIP(虚拟IP):192.168.80.13   修改成:192.168.80.16 
具体操作步骤如下:

以root用户执行

[root@vastdata2 ~]# cd /u01/app/11.2.0/grid/bin/

[root@vastdata2 bin]# ./srvctl config vip -n vastdata2
VIP exists: /vastdata2-vip/192.168.80.13/192.168.80.0/255.255.255.0/eth0, hosting node vastdata2
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

查看VIP状态

[root@vastdata2 bin]# ./srvctl status vip -n vastdata2
VIP vastdata2-vip is enabled
VIP vastdata2-vip is running on node: vastdata2
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

查看监听状态

[root@vastdata2 bin]# ./srvctl status listener -n vastdata2
Listener LISTENER is enabled on node(s): vastdata2
Listener LISTENER is running on node(s): vastdata2
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

停止监听

[root@vastdata2 bin]# ./srvctl stop listener -n vastdata2
  • 1
  • 1

查看停掉监听后的状态

[root@vastdata2 bin]# ./srvctl status listener -n vastdata2
Listener LISTENER is enabled on node(s): vastdata2
Listener LISTENER is not running on node(s): vastdata2
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

停止VIP

[root@vastdata2 bin]# ./srvctl stop vip -n vastdata2
  • 1
  • 1

查看停止VIP后的状态

[root@vastdata2 bin]# ./srvctl status vip -n vastdata2
VIP vastdata2-vip is enabled
VIP vastdata2-vip is not running
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

修改hosts文件

[root@vastdata2 bin]# vi /etc/hosts

192.168.80.2       vastdata1.us.oracle.com           vastdata1
192.168.80.12      vastdata1-vip.us.oracle.com       vastdata1-vip
10.0.0.2           vastdata1-priv1.us.oracle.com     vastdata1-priv1

192.168.80.3       vastdata2.us.oracle.com           vastdata2
192.168.80.16      vastdata2-vip.us.oracle.com       vastdata2-vip
10.0.0.3           vastdata2-priv1.us.oracle.com     vastdata2-priv1
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

修改VIP地址–该命令给出了新的VIP地址“192.168.80.16”、网络掩码“255.255.255.0”和VIP使用的网卡“eth0”。

[root@vastdata2 bin]# ./srvctl modify nodeapps -n vastdata2 -A 192.168.80.16/255.255.255.0/eth0
  • 1
  • 1

开启监听

[root@vastdata2 bin]# ./srvctl start listener -n vastdata2
  • 1
  • 1

查看开启监听后的状态

[root@vastdata2 bin]# ./srvctl status listener -n vastdata2
Listener LISTENER is enabled on node(s): vastdata2
Listener LISTENER is running on node(s): vastdata2
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

验证

[root@vastdata2 bin]# ./srvctl config vip -n vastdata2
VIP exists: /vastdata2-vip/192.168.80.16/192.168.80.0/255.255.255.0/eth0, hosting node vastdata2
  • 1
  • 2
  • 1
  • 2

获取当前VIP信息

[root@vastdata2 bin]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 08:00:27:18:E6:C8 
          inet addr:192.168.80.3  Bcast:192.168.80.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe18:e6c8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13045 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1411664 (1.3 MiB)  TX bytes:1413666 (1.3 MiB)

eth0:1    Link encap:Ethernet  HWaddr 08:00:27:18:E6:C8 
          inet addr:192.168.80.16  Bcast:192.168.80.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:2    Link encap:Ethernet  HWaddr 08:00:27:18:E6:C8 
          inet addr:192.168.80.22  Bcast:192.168.80.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1      Link encap:Ethernet  HWaddr 08:00:27:D8:FA:69 
          inet addr:10.0.0.3  Bcast:10.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::a00:27ff:fed8:fa69/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:593752 errors:0 dropped:0 overruns:0 frame:0
          TX packets:701220 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:336092144 (320.5 MiB)  TX bytes:507839384 (484.3 MiB)

eth1:1    Link encap:Ethernet  HWaddr 08:00:27:D8:FA:69 
          inet addr:169.254.24.28  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:126962 errors:0 dropped:0 overruns:0 frame:0
          TX packets:126962 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:66228834 (63.1 MiB)  TX bytes:66228834 (63.1 MiB)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值