On Tuesday 10 March 2009 3:35 pm, you wrote: > 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
Hi, Ben. Thanks for the great how-to. Based on your input, and Brian's, I think I've got this working, insofar as I can see the failover taking place in the gui. But, being somewhat dense, though, I'm not sure how it should work. Let me explain further: I have apache running on both nodes, If one node goes down, should I still be able to see it's Web pages? How would I get at them? For test purposes, I created a simple html file on each server saying "Test page on node 1" and "test page on node 2". If I put node 1 on standby, how do I see its Web page? Or am I completely not getting what HA is all about? Thanks for your patience with me. Dimitri -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
