OpenVZ Forum


Home » General » Support » HA cluster with DRBD and Heartbeat
Re: HA cluster with DRBD and Heartbeat [message #35787 is a reply to message #35769] Wed, 22 April 2009 12:50 Go to previous message
sammy08 is currently offline  sammy08
Messages: 21
Registered: April 2008
Junior Member
I decided to simplify things and use 172.16.8.1 and 172.16.8.2 for the Hardware Nodes then put the VEs on the same subnet using the range 172.16.8.100 - 200. This means that when the switchover occurs I would still be able to access the VE on 172.16.8.100 since the VEs are being replicated over to the 2nd HN. With this setup I can browse to http://172.16.8.100 which is running on Host01 (172.16.8.1).

I can confirm this works when I do a manual switchover as follows:

Host01:
# vzctl stop 110 (Otherwise I get the error that the resource is busy)
# umount /vz
# drbdadm secondary vz

Host02:
# drdbadm primary vz
# mount /dev/drbd0 /vz
# service vz start

I am now able to see the default webpage once again at http://172.16.8.100

However, whenever I reboot the Node1, I have to manually set it to be primary again by first umounting the resource on Host02 then issuing these commands.

# drbdadm primary vz

Then I have to mount the vz partition by running:

# mount /dev/drbd0 /vz

then start OpenVZ

# service vz start

I have followed the section "Live-Switchover with the help of checkpointing" in the document http://wiki.openvz.org/HA_cluster_with_DRBD_and_Heartbeat but it doesn't seem to work.

Any idea how to make this process automatic at startup? I have attached my drbd.conf, ha.cf and haresources configuration files.

Your help would be much appreciated since I am trying to complete this setup as part of my University final year project presentation for Friday.

regards,

Sammy
  • Attachment: ha.cf
    (Size: 0.50KB, Downloaded 258 times)
  • Attachment: haresources
    (Size: 0.09KB, Downloaded 271 times)
  • Attachment: drbd.conf
    (Size: 0.37KB, Downloaded 263 times)

[Updated on: Wed, 22 April 2009 12:51]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: Can I run debian as vz with ubuntu host
Next Topic: ipt_MARK missed?
Goto Forum:
  


Current Time: Thu Sep 18 05:56:40 GMT 2025

Total time taken to generate the page: 0.05509 seconds