Changes

Jump to: navigation, search

HA cluster with DRBD and Heartbeat

2,168 bytes added, 08:54, 4 August 2006
Setting up Heartbeat
== Setting up Heartbeat ==
(IInstall the neccessary Heartbeat rpms on both nodes:<pre>[root@ovz-node1 ~]# rpm -ihv heartbeat-1.2.4-1.i386.rpm heartbeat-pils-1.2.4-1.i386.rpm heartbeat-stonith-1.2.4-1.i386.rpmPreparing... ########################################### [100%] 1:heartbeat-pils ########################################### [ 33%] 2:heartbeat-stonith ########################################### [ 67%] 3:heartbeat ########################################### [100%][root@ovz-node1 ~]#</pre>Create the Heartbeat configuration file ha.cf and copy it to /etc/ha.d/ha.cf on both nodes. Details about this file can be found at http://www.linux-ha.org/ha.cf. Below is an example configuration which uses the two network connections and also a serial connection for heartbeat packets:<pre># Heartbeat logging configurationlogfacility daemon # Heartbeat cluster membersnode ovz-node1node ovz-node2 # Heartbeat communication timingkeepalive 1warntime 10deadtime 30initdead 120 # Heartbeat communication pathsudpport 694ucast eth1 192.168.255.1ucast eth1 192.168.255.2ucast eth0 192.168.1.201ucast eth0 192.168.1.202baud 19200serial /dev/ttyS0 # Don'll update t fail back automaticallyauto_failback off # Monitoring of network connection to default gatewayping 192.168.1.1respawn hacluster /usr/lib64/heartbeat/ipfail</pre>Create the Heartbeat configuration file authkeys and copy it to /etc/ha.d/authkeys on both nodes. Set the permissions of this file to 600. Details about this file can be found at http://www.linux-ha.org/authkeys. Below is an example:<pre>auth 11 sha1 PutYourSuperSecretKeyHere</pre>Create the Heartbeat configuration file haresources and copy it to /etc/ha.d/haresources on both nodes. Details about this part soon)file can be found at http://www.linux-ha.org/haresources. Below is an example:<pre>ovz-node1 datadisk::r0 Filesystem::/dev/drbd0::/vz::ext3 vz MailTo::youremail@yourdomain.tld</pre>Finally, you can now start heartbeat on both nodes:<pre>[root@ovz-node1 ~]# /etc/init.d/heartbeat startStarting High-Availability services: [ OK ][root@ovz-node1 ~]#</pre>
== How to do OpenVZ kernel updates when it contains a new DRBD version ==
21
edits

Navigation menu