OpenVZ Forum


Home » General » Support » HA cluster with DRBD and Heartbeat
HA cluster with DRBD and Heartbeat [message #35769] Tue, 21 April 2009 13:30 Go to next message
sammy08 is currently offline  sammy08
Messages: 21
Registered: April 2008
Junior Member
Hello,

I have gone through the doc at http://wiki.openvz.org/HA_cluster_with_DRBD_and_Heartbeat but I am having difficulty configuring it to use a single IP Address (e.g 172.16.8.3) to access the HN from the public LAN. This is so that the user only need to connect the "floating IP" 172.16.8.3 for the HN and the failover from 172.16.8.1 to 172.16.8.2 is more or less seemless.

On the HN I am using the following IPs:

Public LAN
Host01 - eth0, 172.16.8.1
Host02 - eth0, 172.16.8.2
Private LAN
Host01 - eth1, 192.168.50.1
Host02 - eth1, 192.168.50.2

I have created containers on the primary HN and they are using the range 192.168.0.100/255.255.255.0

Webserver VE - 192.168.0.101
Accessible via http://172.16.8.1:8001

The objective is to be able to access the webserver VE via http://172.16.8.3:8001

Ideally I would want to do this per container as well but I guess doing it on the HN first would give me a better understanding of how it is meant to work.

regards,

Sammy



[Updated on: Tue, 21 April 2009 13:37]

Report message to a moderator

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 198 times)
  • Attachment: haresources
    (Size: 0.09KB, Downloaded 190 times)
  • Attachment: drbd.conf
    (Size: 0.37KB, Downloaded 195 times)

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

Report message to a moderator

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


Current Time: Thu Oct 17 12:46:05 GMT 2024

Total time taken to generate the page: 0.05323 seconds