OpenVZ Forum


Home » General » Support » VZ+DRBD+HA and load balancing
Re: VZ+DRBD+HA and load balancing [message #32956 is a reply to message #32740] Wed, 10 September 2008 13:49 Go to previous messageGo to previous message
luisdev is currently offline  luisdev
Messages: 11
Registered: July 2008
Junior Member
Hi, folks!

I investigated Mark's method and it works like a charm, with a couple of modifications:

  • In the post where he describes it, where it says target-role it should say target_role (underscore instead of hyphen.)
  • You need to add a rsc_location constraint to express your preference about what node should run every VE.


So I took everything and cooked up a script to automate the process, which you can find attached to this message. A wiki page will follow when we are sure it works as intended, but you are welcome to try it and give us your feedback here.

Off the top of my head, before trying the script be sure to:
  • Create a LVM volume group to hold your VE volumes.
  • Set your drbd and heartbeat services to start on boot, but not vz.
  • Enable crm at your ha.cf
  • Adjust VE_ROOT and VE_PRIVATE at /etc/vz.conf
  • You can consider to turn off quotas here, since every VE will have its own partition.
  • Set ONBOOT=no at your default VPS.conf file
  • Configure your slave HN (the one where you don't run the script) to accept ssh commands without prompting you for a password (not really necessary and a minor security risk, but very convenient.)


To synchronize the configuration files between both HN I use rsync:

rsync -av --include-from=clusterconffiles / <slave_node>:/


And clusterconffiles contains:

+ /etc/
+ /etc/sysconfig/
+ /etc/sysconfig/vz-scripts
+ /etc/sysconfig/vz-scripts/ve-ambiser.conf-sample
+ /etc/drbd.conf
+ /etc/vz/
+ /etc/vz/vz.conf
+ /etc/ha.d/
+ /etc/ha.d/authkeys
+ /etc/ha.d/ha.cf
- *


(ve-ambiser.conf-sample is my custom default VPS.conf file.)

Did I forget anything?

A bit cryptic, but a full tutorial will follow up soon.
  • Attachment: mbhave
    (Size: 20.66KB, Downloaded 490 times)
 
Read Message
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Iptables the owner module from HN
Next Topic: kernel issue
Goto Forum:
  


Current Time: Sat Oct 05 11:03:21 GMT 2024

Total time taken to generate the page: 0.03593 seconds