OpenVZ Forum - RDF feed
type: channel
items: HA cluster with DRBD and Heartbeat
items: Re: HA cluster with DRBD and Heartbeat

HA cluster with DRBD and Heartbeat
type: item
description: 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
creator: sammy08
date: 2009-04-21T13:30:51-00:00

Re: HA cluster with DRBD and Heartbeat
type: item
description: 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
creator: sammy08
date: 2009-04-22T12:50:09-00:00