- 论坛徽章:
- 0
|
本帖最后由 PinkOrient 于 2012-11-06 09:48 编辑
回复 11# gutou888
http://infrastructureadventures.com/tag/fencing/
Heartbeat
Each node in the cluster sends out a multicast heart beat that tells the other member of the cluster that it is alive and healthy. By default a cluster node will consider another node dead if it misses the heartbeat from that node for 10 seconds.
The interface used for heartbeats is configured in the cluster.conf file (see configuration section for more details ). When discussion cluster configuration with Redhat support they highly recommended that a cross-connect between the two nodes is not used and that an interface connected to a switch and a private VLAN be used for heartbeats. They also recommended that this be the same interface used to initiate fencing (See below).
Fencing
One of the strategies used by Redhat clusters to prevent split brain is a concept called fencing.
While there are several different types of fencing, fencing via the HP iLO devices (or similar) built into the servers is the recommended method. With this type of Fencing when the passive node stops receiving heartbeats from the active node it will connect to the iLO of the active node and reboot the active node. Once the passive node reboots (i.e. fences) the active node it will then start the cluster services.
By rebooting the active node the passive node can be sure that the active node is no longer running the cluster services and it is safe to start them.
From a design point of view the NIC used to connect to the iLO of a node’s partner server is the NIC that should also be used for heartbeat. This ensures that the node that lost its connection to the heartbeat network cannot fence its partner server.
可能你的Fence Device的IP和服务IP放到一个VLAN了,脑裂的时候尽管HB断了,但是两边都能通过服务VLAN fence掉对方了,留意红色那段的建议。
Heartbeat不要用直连的方式,和fence放到一个私有vlan,应该就好了,之于为什么是shutdown不是reboot,可以登录到你的fence device看看log,看对方发来的fencing请求是啥。 |
|