ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RAC Failover测试及VIP漂移观察

RAC Failover测试及VIP漂移观察

原创 Linux操作系统 作者:jifei0611 时间:2010-11-05 15:39:53 0 删除 编辑

1.      连接到数据库

C:\>sqlplus system/password@oakdb

 

SQL*Plus: Release 10.2.0.1.0 - Production on 星期五 11月 5 11:05:41 2010

 

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

 

 

联机到:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

 

2. 确认当前联机实例

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

--------------------------------

oakdb1

 

3.      查看rac2主机网络配置

login as: root

root@10.182.4.35's password:

Last login: Fri Nov  5 10:56:10 2010 from 10.182.28.130

[root@rac2 ~]# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:06:A5:1C

          inet addr:10.182.4.35  Bcast:10.182.4.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:fe06:a51c/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:464918 errors:0 dropped:0 overruns:0 frame.:0

          TX packets:555967 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:62524654 (59.6 MiB)  TX bytes:304928105 (290.8 MiB)

          Interrupt:185 Base address:0x1480

 

eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:06:A5:1C

          inet addr:10.182.4.37  Bcast:10.182.4.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          Interrupt:185 Base address:0x1480

 

eth1      Link encap:Ethernet  HWaddr 00:0C:29:06:A5:26

          inet addr:10.182.4.36  Bcast:10.182.4.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:fe06:a526/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:750457 errors:0 dropped:0 overruns:0 frame.:0

          TX packets:601 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:330409755 (315.1 MiB)  TX bytes:25410 (24.8 KiB)

          Interrupt:193 Base address:0x1800

 

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:16436  Metric:1

          RX packets:179286 errors:0 dropped:0 overruns:0 frame.:0

          TX packets:179286 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:13195921 (12.5 MiB)  TX bytes:13195921 (12.5 MiB)

 

[root@rac2 ~]#

 

4.      将rac1关机

login as: root

root@10.182.4.31's password:

Last login: Thu Nov  4 17:07:23 2010 from 10.182.28.130

[root@rac1 ~]# shutdown -h now

 

Broadcast message from root (pts/0) (Fri Nov  5 11:00:24 2010):

 

The system is going down for system halt NOW!

[root@rac1 ~]#

 

5.      再次确认当前連接实例

SQL> select instance_name from v$instance;

select instance_name from v$instance

*

 ERROR 在行 1:

ORA-25408: 无法安全地重放呼叫

 

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

--------------------------------

oakdb2

 

SQL>

 

6. 确认vip已漂移,在eth0上可以看到节点rac1的vip:10.182.15.33

[root@rac2 ~]# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:06:A5:1C

          inet addr:10.182.4.35  Bcast:10.182.4.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:fe06:a51c/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:467462 errors:0 dropped:0 overruns:0 frame.:0

          TX packets:560834 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:62770572 (59.8 MiB)  TX bytes:308565535 (294.2 MiB)

          Interrupt:185 Base address:0x1480

 

eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:06:A5:1C

          inet addr:10.182.4.37  Bcast:10.182.4.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          Interrupt:185 Base address:0x1480

 

eth0:2    Link encap:Ethernet  HWaddr 00:0C:29:06:A5:1C

          inet addr:10.182.4.33  Bcast:10.182.4.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          Interrupt:185 Base address:0x1480

 

eth1      Link encap:Ethernet  HWaddr 00:0C:29:06:A5:26

          inet addr:10.182.4.36  Bcast:10.182.4.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:fe06:a526/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:756160 errors:0 dropped:0 overruns:0 frame.:0

          TX packets:606 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:333702259 (318.2 MiB)  TX bytes:25620 (25.0 KiB)

          Interrupt:193 Base address:0x1800

 

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:16436  Metric:1

          RX packets:181003 errors:0 dropped:0 overruns:0 frame.:0

          TX packets:181003 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:13435655 (12.8 MiB)  TX bytes:13435655 (12.8 MiB)

 

7.      测试完成启动rac1

节点rac1启动后通过ifconfig可以看到vip已漂移回节点rac1

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7419833/viewspace-677571/,如需转载,请注明出处,否则将追究法律责任。

下一篇: RAC实验 新增节点
请登录后发表评论 登录
全部评论

注册时间:2008-01-12

  • 博文量
    143
  • 访问量
    273350