- 論壇徽章:
- 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.
個(gè)人從上面的字面翻譯得出一個(gè)論點(diǎn):
cman會(huì)從cluster.conf里登記的節(jié)點(diǎn)上來(lái)尋找所有激活的網(wǎng)絡(luò)接口進(jìn)行通訊,默認(rèn)采用eth0來(lái)做心跳通訊,進(jìn)行mcast多點(diǎn)組播。
如果網(wǎng)卡做bonding,它會(huì)優(yōu)先從哪個(gè)網(wǎng)絡(luò)通訊呢?
呵呵。。。。 |
|