confused with heartbeat setup
i have heartbeat configured on a backup server. i know it's working, but not as it should be. even if the primary server is still up and very much alive, backup takes over the IP. more like forces the primary server to give it up. i'm testing it on httpd and ftp services. this is my setup:
s1 <-- primary with httpd and ftpd
s2 <-- backup with heartbeat and same services
the docs on heartbeat are kinda vague. from what i've read, and i've found different docs on the net but very much alike, it says that you should have heartbeat running on both machines. although it didn't say this directly, i'm assuming that it is since it explicitly said that authkeys and haresources should be identical on both machines.
i was under the impression that s2 should be the only1 running heartbeat, as it's purpose is just to listen to s1 and take over in case of failure. i did this and s2 takes over, forcefully, in a few seconds (30). in this setup only s1 has httpd and ftpd running. s2 httpd and ftpd services are down.
i did another thing, which is have heartbeat run on both machines, with haresources pointing to primary like this:
s2 192.168.0.1 httpd ftpd
i start heartbeat on s2. ok.
i start it on s1 and it warns me that resources are not idle and should be. heartbeat still starts.
after a few seconds the same thing happens above, s2 takes IP from s1 and runs httpd and ftpd. in this case s1 has httpd and ftpd running, while s2 services are down.
i re-read the docs i found again, and this time i found out that in haresources, it is talking of another IP which is neither s1 or s2 (in my case).
so if i have this:
s1 <-- 192.168.0.1, primary
s2 <-- 192.168.0.2, backup
now in the docs' haresources it's like this
s1 192.168.0.3 httpd ftpd
ok, so where did 192.168.0.3 come in? in the first place it was talking about 2 machines with different IPs. is it saying that one machine, the backup maybe, should have another IP assigned to it?
do i need to have heartbeat run on both machines?
i'm really confused on this.
Heartbeat v.2 and scripts
I was just wondering if there was a way to have heartbeat run a particular script/change the script it would normally use when it goes to startup apache?
Any info would help! We have a particualar way that we've compiled apache and I'm not sure how I can get it to work with heartbeat except through running this script that we normally run to start apache...