1. HAIP简介
Oracle从11.2.0.2开始引入了一个新特性网络冗余技术HAIP。HAIP的目的用来代替操作系统级别的网卡绑定以实现Active-Active的模式进行数据传输。一来可以实现传统操作系统网卡绑定带来的故障转移的功能,另一方面则可以更加充分利用其负载均衡的特性最大程度的减少因为gc等待带来的性能问题。
如果更多的网络适配器被指定,clusterware可以一次激活最多4个专用网络适配器。ora.cluster_interconnect.haip 将为Oracle RAC、Oracle ASM、Oracle ACFS等启用一至四个连接本地HAIP的互联通信网络适配器,注意,如果存在sun cluster,HAIT特性将在11.2.0.2中禁用。
Grid将自动选择连接本地保留地址169.254.*.*作为HAIP子网,并且不会尝试适用任何169.254.*.*地址,如果它已经被在用于其它目的使用。由于HAIP,在默认情况下,网络流量将被所有活动的网络接口负载均衡。并且如果其中一个失败或者变成不可连接状态,相应的HAIP地址将透明的转移到相对的其它网络适配器。
当Grid中启动集群中的第一个节点,HAIP地址数量是由有多少个私有网络适配器是活动状态所决定的。如果只有一个活跃的私有网络,那么Grid将创建一个,如果有两个,Grid将创建两个,如果大于两个,Grid将创建4个HAIPs.即使更多的私有网络适配器随后被激活,HAIPs的数量是不会改变的,要使得新的网络适配器变成活动状态,则要重启集群所有的节点。
[参考 http://blog.csdn.net/ora_unix/article/details/9420393 ]
[参考 MetaLink 1210883.1]
2. HAIP服务
由于HAIP是默认开启的,使用169.254.*.*私有地址,可以通过oifcfg和ifconfig来查看:
在数据库和ASM实例的启动阶段,可以从alert_
.log中找到:
Cluster communication is configured to use the following interface(s) for this instance
169.254.151.97
在数据库中通过gv$cluster_interconnects视图可以显示haip的信息
而集群架构中的相关结构:
3. 添加新的专用网络适配器
下面我们对racdb01, racdb02, racdb03三个节点继续添加一块网卡eth02(地址分配192.168.1.211,192.168.1.213,192.168.1.215),然后通过oifcfg将这块网卡添加到ocr中。
然后分别重启三个节点的集群服务,HAIP会自动生效:
在三个节点分别做完配置,重启集群,HAIP自动生效。
4. 模拟网络故障
断开racdb03的eth1:
# ifconfig eth1 down
数据库和ASM的alert中并未出现任何报错,说明IP地址已经进行了透明的偏移。
[参考 http://www.luocs.com/archives/281.html]
查看ohasd的日志$GRID_HOME/log/ohasd/ohasd.log
查看agent日志$GRID_HOME/log/racdb03/agent/ohasd/orarootagent_root,可以看到moving ip ‘169.254.79.164’ from inf ‘eth1′ to inf ‘eth2’:
这时打开eth1网卡来模拟地址恢复
ifconfig eth1 up
查看日志$GRID_HOME/log/racdb03/agent/ohasd/orarootagent_root,可以看到IP地址飘回:Moving ip ‘169.254.79.164’ from inf ‘eth2′ to inf ‘eth1′
而cssd.log日志中有相应的adding interface information等内容。
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
|
2013
-
08
-
12
14
:
19
:
49.936
:
[
GIPCHGEN
]
[
821774080
]
gipchaNodeAddInterface
:
adding
interface
information
for
inf
0x7fe11021bdf0
{
host
''
,
haName
'CSS_racdb-cluster'
,
local
(
nil
)
,
ip
'192.168.1.205'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
'00-50-56-b2-2f-ee'
,
ifname
'eth1'
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1841
}
2013
-
08
-
12
14
:
19
:
49.996
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
local
interface
for
node
'racdb03'
,
haName
'CSS_racdb-cluster'
,
inf
'udp://192.168.1.205:27507'
2013
-
08
-
12
14
:
19
:
49.996
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
local
bootstrap
multicast
interface
for
node
'racdb03'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://224.0.0.251:42424/192.168.1.205'
2013
-
08
-
12
14
:
19
:
50.000
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
local
bootstrap
multicast
interface
for
node
'racdb03'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://230.0.1.0:42424/192.168.1.205'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
local
bootstrap
broadcast
interface
for
node
'racdb03'
,
haName
'CSS_racdb-cluster'
,
inf
'udp://192.168.1.255:42424'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHGEN
]
[
602371840
]
gipchaNodeAddInterface
:
adding
interface
information
for
inf
0x7fe118099610
{
host
'racdb02'
,
haName
'CSS_racdb-cluster'
,
local
(
nil
)
,
ip
'192.168.1.215:20838'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1842
}
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHGEN
]
[
602371840
]
gipchaNodeAddInterface
:
adding
interface
information
for
inf
0x7fe118098c40
{
host
'racdb02'
,
haName
'CSS_racdb-cluster'
,
local
(
nil
)
,
ip
'192.168.1.205:27507'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1842
}
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHGEN
]
[
602371840
]
gipchaNodeAddInterface
:
adding
interface
information
for
inf
0x7fe118098fa0
{
host
'racdb01'
,
haName
'CSS_racdb-cluster'
,
local
(
nil
)
,
ip
'192.168.1.215:20838'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1842
}
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHGEN
]
[
602371840
]
gipchaNodeAddInterface
:
adding
interface
information
for
inf
0x7fe118073d00
{
host
'racdb01'
,
haName
'CSS_racdb-cluster'
,
local
(
nil
)
,
ip
'192.168.1.205:27507'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1842
}
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
multicast
interface
for
node
'racdb02'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://224.0.0.251:42424/192.168.1.215:20838'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
multicast
interface
for
node
'racdb02'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://230.0.1.0:42424/192.168.1.215:20838'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
broadcast
interface
for
node
'racdb02'
,
haName
'CSS_racdb-cluster'
,
inf
'udp://192.168.1.255:42424'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHGEN
]
[
602371840
]
gipchaWorkerAttachInterface
:
Interface
attached
inf
0x7fe118099610
{
host
'racdb02'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.215:20838'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1846
}
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
multicast
interface
for
node
'racdb02'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://224.0.0.251:42424/192.168.1.205:27507'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
multicast
interface
for
node
'racdb02'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://230.0.1.0:42424/192.168.1.205:27507'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
broadcast
interface
for
node
'racdb02'
,
haName
'CSS_racdb-cluster'
,
inf
'udp://192.168.1.255:42424'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHGEN
]
[
602371840
]
gipchaWorkerAttachInterface
:
Interface
attached
inf
0x7fe118098c40
{
host
'racdb02'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.205:27507'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1846
}
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
multicast
interface
for
node
'racdb01'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://224.0.0.251:42424/192.168.1.215:20838'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
multicast
interface
for
node
'racdb01'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://230.0.1.0:42424/192.168.1.215:20838'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
broadcast
interface
for
node
'racdb01'
,
haName
'CSS_racdb-cluster'
,
inf
'udp://192.168.1.255:42424'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHGEN
]
[
602371840
]
gipchaWorkerAttachInterface
:
Interface
attached
inf
0x7fe118098fa0
{
host
'racdb01'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.215:20838'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1846
}
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
multicast
interface
for
node
'racdb01'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://224.0.0.251:42424/192.168.1.205:27507'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
multicast
interface
for
node
'racdb01'
,
haName
'CSS_racdb-cluster'
,
inf
'mcast://230.0.1.0:42424/192.168.1.205:27507'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHTHR
]
[
602371840
]
gipchaWorkerCreateInterface
:
created
remote
bootstrap
broadcast
interface
for
node
'racdb01'
,
haName
'CSS_racdb-cluster'
,
inf
'udp://192.168.1.255:42424'
2013
-
08
-
12
14
:
19
:
50.001
:
[
GIPCHGEN
]
[
602371840
]
gipchaWorkerAttachInterface
:
Interface
attached
inf
0x7fe118073d00
{
host
'racdb01'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.205:27507'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1846
}
2013
-
08
-
12
14
:
19
:
50.002
:
[
GIPCHGEN
]
[
602371840
]
gipchaInterfaceDisable
:
disabling
interface
0x7fe118098fa0
{
host
'racdb01'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.215:20838'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1846
}
2013
-
08
-
12
14
:
19
:
50.002
:
[
GIPCHGEN
]
[
602371840
]
gipchaInterfaceDisable
:
disabling
interface
0x7fe118073d00
{
host
'racdb01'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.205:27507'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1846
}
2013
-
08
-
12
14
:
19
:
50.002
:
[
GIPCHALO
]
[
602371840
]
gipchaLowerCleanInterfaces
:
performing
cleanup
of
disabled
interface
0x7fe118098fa0
{
host
'racdb01'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.215:20838'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1866
}
2013
-
08
-
12
14
:
19
:
50.002
:
[
GIPCHALO
]
[
602371840
]
gipchaLowerCleanInterfaces
:
performing
cleanup
of
disabled
interface
0x7fe118073d00
{
host
'racdb01'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.205:27507'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1866
}
2013
-
08
-
12
14
:
19
:
50.934
:
[
GIPCHGEN
]
[
602371840
]
gipchaInterfaceDisable
:
disabling
interface
0x7fe118099610
{
host
'racdb02'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.215:20838'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1846
}
2013
-
08
-
12
14
:
19
:
50.934
:
[
GIPCHGEN
]
[
602371840
]
gipchaInterfaceDisable
:
disabling
interface
0x7fe118098c40
{
host
'racdb02'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.205:27507'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1846
}
2013
-
08
-
12
14
:
19
:
50.934
:
[
GIPCHALO
]
[
602371840
]
gipchaLowerCleanInterfaces
:
performing
cleanup
of
disabled
interface
0x7fe118099610
{
host
'racdb02'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.215:20838'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1866
}
2013
-
08
-
12
14
:
19
:
50.934
:
[
GIPCHALO
]
[
602371840
]
gipchaLowerCleanInterfaces
:
performing
cleanup
of
disabled
interface
0x7fe118098c40
{
host
'racdb02'
,
haName
'CSS_racdb-cluster'
,
local
0x7fe11021bdf0
,
ip
'192.168.1.205:27507'
,
subnet
'192.168.1.0'
,
mask
'255.255.255.0'
,
mac
''
,
ifname
''
,
numRef
0
,
numFail
0
,
idxBoot
0
,
flags
0x1866
}
|
^^