I found it useful to use hb_gui. I did the following. 1. Install heartbeat via RPMs. 2. Configure heartbeat ha.cf and authkeys. I set crm to yes in ha.cr, so I did not need an haresources file. 3. usermod -G haclient hacluster 4. passwd hacluster 5. Start heartbeat on one node. 6. If you are running iptables, open a port for hb_gui.
iptables -I RH-Firewall-1-INPUT -p tcp -m state --state NEW --dport 5560 -j ACCEPT service iptables save Now you can connect to that node with hb_gui using the username hacluster and the password you defined in 4. You will see your cluster does not have quorum, thus you cannot make any changes. Start heartbeat on the second node. You will now have quorum and can add some resources. 1. right click on resources, add IPaddr, define the address. 2. The resource will have target_role stopped by default. This prevents it from immediately starting, giving you a chance to edit it. 3. right click on resources, add httpd, you don't need to define anything else. You can now start your resources using the play button. They may or may not start on the same node. To ensure they start on the same node. You can add a colocation restraint that says httpd + ipaddr should be colocated with a score of INFINITY. Once you add this, you should see that the services migrate to be on the same node. Now you can put that node into standby by right-clicking the node. You can also cut the power or shut it down. Your resources should both fail over. Bring that node back up and your resources will NOT move back. Now fail the other node and your resources will migrate back to the original. You can also add location constraints to make a resource favor a particular node. If you stop both nodes. Then start one and connect with the gui, you will see your cluster does not have quorum and no resources start. Once the second node joins, the resources will start and fail over, that is to say, once the cluster has quorum, it should be all set from then on unless you shut down all nodes and start again without quorum. sample ha.cf: -- debugfile /var/log/ha-debug logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 120 initdead 120 udpport 694 udp eth0 auto_failback on node node1 node node2 crm yes -- On Tue, Mar 10, 2009 at 2:10 PM, Dimitri Yioulos <[email protected]> wrote: > Thanks, Ben. So, if I stop heartbeat on node 1, then node 2 should serve up > node 1's Web pages? From http://192.168.103.6 (the haresources IP)? I've > tried bringing down heartbeat on both nodes, but am not getting the expected > results. > > Dimitri _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
