- 论坛徽章:
- 1
|
# What's the "right" way to get cman to use a different NIC, say, eth2
rather than eth0?
There are several reasons for doing this. You may want to do this in cases
where you want the cman heartbeat messages to be on a dedicated network so
that a heavily used network doesn't cause heartbeat messages to be missed
(and nodes in your cluster to be fenced). Second, you may have security
reasons for wanting to keep these messages off of an Internet-facing
network.
First, you want to configure your alternate NIC to have its own IP address,
and the settings that go with that (subnet, etc).
Next, add an entry into /etc/hosts (on all nodes) for the ip address
associated with the NIC you want to use. In this case, eth2. One way to do
this is to append a suffix to the original host name. For example, if your
node is "node-01" you could give it the name "node-01-p" (-p for private
network). For example, your /etc/hosts file might look like this:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.0.0.1 node-01
192.168.0.1 node-01-p
If you're using RHEL4.4 or above, or 5.1 or above, that's all you need to
do. There is code in cman to look at all the active network interfaces on
the node and find the one that corresponds to the entry in cluster.conf.
Note that this only works on ipv4 interfaces.
个人从上面的字面翻译得出一个论点:
cman会从cluster.conf里登记的节点上来寻找所有激活的网络接口进行通讯,默认采用eth0来做心跳通讯,进行mcast多点组播。
如果网卡做bonding,它会优先从哪个网络通讯呢?
呵呵。。。。 |
|