Now with Centos7 after heartbeat using corosync
Now with Centos7 after heartbeat using corosync
Hi to you.
I just upgradet a testenvironment zu Centos 7.
In the past with Centos 6 I used to have 2 centos 6 server with running apache and heartbeat. If one apache was going down - heartbeat switched to the other apache. Both Centos server had 1 internal virtual nic.
node1:192.168.110.10
node2:192.168.110.11
For the apache service I had !ONE! WAN ip on a sepperate virtual nic
WAN: for example 78.22.xx.xx
Now - heartbeat was working so - that the WAN IP was always running on one server. If one apache goes down - he startet the WAN IP on the ohter server.
Now - I saw that heartbeat was depricated and not available at Centos7. So I need to use corosync with pacemaker. But I didn't found a function for my WAN IP problem.
Do you have any idea?
Thank you!
I just upgradet a testenvironment zu Centos 7.
In the past with Centos 6 I used to have 2 centos 6 server with running apache and heartbeat. If one apache was going down - heartbeat switched to the other apache. Both Centos server had 1 internal virtual nic.
node1:192.168.110.10
node2:192.168.110.11
For the apache service I had !ONE! WAN ip on a sepperate virtual nic
WAN: for example 78.22.xx.xx
Now - heartbeat was working so - that the WAN IP was always running on one server. If one apache goes down - he startet the WAN IP on the ohter server.
Now - I saw that heartbeat was depricated and not available at Centos7. So I need to use corosync with pacemaker. But I didn't found a function for my WAN IP problem.
Do you have any idea?
Thank you!
Re: Now with Centos7 after heartbeat using corosync
You need to use the ocfIPaddr2 resource agent in pacemaker.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Now with Centos7 after heartbeat using corosync
Ah - O.K.
Thank you for the hint.
But now I have the problem - that all documentations in the web are "old" or vor an older version.
In nearly every documentation are folders or files wich not exist, or commands where not exists and so on.
Do someone have some documentation wich is working realy with Centos7?
Thank you for the hint.
But now I have the problem - that all documentations in the web are "old" or vor an older version.
In nearly every documentation are folders or files wich not exist, or commands where not exists and so on.
Do someone have some documentation wich is working realy with Centos7?
-
- Posts: 96
- Joined: 2011/11/21 10:19:41
Re: Now with Centos7 after heartbeat using corosync
Hi batmann00,
the pacemaker/corosync commands depends not on CentOS-7, a real good documentation is here:
http://clusterlabs.org/doc/en-US/Pacema ... index.html
Don't try to use - it's NOT included in CentOS-6/7 the new shell tool for configure pacemaker/corosync since CentOS-6 is .
Enjoy,
the pacemaker/corosync commands depends not on CentOS-7, a real good documentation is here:
http://clusterlabs.org/doc/en-US/Pacema ... index.html
Don't try to use
Code: Select all
crmsh
Code: Select all
pcs
Enjoy,
Re: Now with Centos7 after heartbeat using corosync
Thanks for the link.
It's realy good to work with.
But one question I have.
My network looks like:
centosapache01 eth0: inet 192.168.110.17 netmask 255.255.255.0 broadcast 192.168.110.255
centosapacheß1 eth0: inet 192.168.110.18 netmask 255.255.255.0 broadcast 192.168.110.255
But the cluster should be available at eth1!
So I added in the following form the resource:
pcs resource create ClusterIP ocfIPaddr2 ip=78.XX.XX.85 cidr_netmask=25 nic=eth1 op monitor interval=30s
So - when I start the pcs cluster one node get this ip at eth1:
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 78.xx.xx.85 netmask 255.255.255.128 broadcast 0.0.0.0
inet6 fe80::215:5dff:fe71:4a2a prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:71:4a:2a txqueuelen 1000 (Ethernet)
RX packets 23814 bytes 1940999 (1.8 MiB)
RX errors 0 dropped 730 overruns 0 frame 0
TX packets 29 bytes 5093 (4.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
But I have no connection to the internet. I think this is because he don't know his gateway and any dns server.
How can I give this information to the cluster????
Thank you!
It's realy good to work with.
But one question I have.
My network looks like:
centosapache01 eth0: inet 192.168.110.17 netmask 255.255.255.0 broadcast 192.168.110.255
centosapacheß1 eth0: inet 192.168.110.18 netmask 255.255.255.0 broadcast 192.168.110.255
But the cluster should be available at eth1!
So I added in the following form the resource:
pcs resource create ClusterIP ocfIPaddr2 ip=78.XX.XX.85 cidr_netmask=25 nic=eth1 op monitor interval=30s
So - when I start the pcs cluster one node get this ip at eth1:
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 78.xx.xx.85 netmask 255.255.255.128 broadcast 0.0.0.0
inet6 fe80::215:5dff:fe71:4a2a prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:71:4a:2a txqueuelen 1000 (Ethernet)
RX packets 23814 bytes 1940999 (1.8 MiB)
RX errors 0 dropped 730 overruns 0 frame 0
TX packets 29 bytes 5093 (4.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
But I have no connection to the internet. I think this is because he don't know his gateway and any dns server.
How can I give this information to the cluster????
Thank you!
Re: Now with Centos7 after heartbeat using corosync
Suspect you probably want ocfRoute now. You can get details about them by using man ocf_heartbeat_Route or man ocf_heartbeat_IPaddr2
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Now with Centos7 after heartbeat using corosync
So thank you very much. My system is now running perfectly.
What I have done is adding 2 resources:
pcs resource create ClusterIP ocfIPaddr2 ip=78.XX.XX.85 cidr_netmask=25 nic=eth1 op monitor interval=30s
pcs resource create ClusterRoute ocfRoute destination=0.0.0.0/0 gateway=78.XX.XX.1 device=eth1 source=78.XX.XX.85
After this I created a rule, that ClusterRoute is beeing activated after ClusterIP.
And after this Apache is starting.
Wonderfull!
THX!
What I have done is adding 2 resources:
pcs resource create ClusterIP ocfIPaddr2 ip=78.XX.XX.85 cidr_netmask=25 nic=eth1 op monitor interval=30s
pcs resource create ClusterRoute ocfRoute destination=0.0.0.0/0 gateway=78.XX.XX.1 device=eth1 source=78.XX.XX.85
After this I created a rule, that ClusterRoute is beeing activated after ClusterIP.
And after this Apache is starting.
Wonderfull!
THX!