OpenVZ Forum


Home » General » Discussions » DRBD with OpenVZ - versions and configurations
DRBD with OpenVZ - versions and configurations [message #16421] Thu, 06 September 2007 07:15 Go to next message
fgomes is currently offline  fgomes
Messages: 29
Registered: August 2006
Junior Member
I'm trying to install a DRBD cluster with openVZ by the howto in the openVZ wiki. I found that on the current openVZ kernel for the CentOS 5 the OpenVZ module is 8.0.4, and also the DRBD tools are of the same version on the CentOS repository. My questions are:

If the kernel module and the tools are of the same version, is it still necessary to build the tools from source?

The kernel module and the tools are from a different version of the proposed in the wiki - from yours experience, should we use the newer 8.0.4 version or keep the 0.7 version? If we change to the newer version, the configuration files on the wiki don't work, do you have any tip for DRBD 8.0.4 configuration files with OpenVZ?

Thanks!

Fernando
Re: DRBD with OpenVZ - versions and configurations [message #16424 is a reply to message #16421] Thu, 06 September 2007 09:18 Go to previous messageGo to next message
wfischer is currently offline  wfischer
Messages: 38
Registered: November 2005
Location: Austria/Germany
Member
Hi Fernando,

unfortunately I didn't have the time yet to update the wiki article for OpenVZ 2.6.18 / DRBD 8.*

Regarding your questions: when the DRBD userspace tools from http://mirror.centos.org/centos-5/5/extras/x86_64/RPMS/ are the same version as the DRBD module which is in the OpenVZ kernel, you should get no problems when using those pre-built tools from CentOS.
Also when e.g. the DRBD module in the OpenVZ kernel gets updated (currently the most recent DRBD version is 8.0.6) the "older" DRBD tools from CentOS should still work, as long as the api version does not change (currently api:86), see http://svn.drbd.org/drbd/branches/drbd-8.0/ChangeLog

Regarding you second question: when you want to use OpenVZ kernel 2.6.18 you get DRBD 8.* module with it (with OpenVZ kernel 2.6.9 you get DRBD 0.7.* module). So, choose the OpenVZ kernel version you want to use (2.6.9 or 2.6.18) and use the DRBD version which comes with the OpenVZ kernel.

And here is an example config for DRBD 8:
global {
  usage-count no;
}

resource r0 {
  protocol C;

  handlers {
    pri-on-incon-degr "echo o > /proc/sysrq-trigger ; halt -f";
    pri-lost-after-sb "echo o > /proc/sysrq-trigger ; halt -f";
    local-io-error "echo o > /proc/sysrq-trigger ; halt -f";
  }

  startup {
    degr-wfc-timeout 120;
  }

  disk {
    on-io-error   call-local-io-error;
  }

  syncer {
    rate 30M;
    al-extents 257;
  }

  on ovz-node1 {
    device     /dev/drbd0;
    disk       /dev/hda3;
    address    192.168.255.1:7788;
    meta-disk  internal;
  }

  on ovz-node2 {
    device     /dev/drbd0;
    disk       /dev/hda3;
    address    192.168.255.2:7788;
    meta-disk  internal;
  }

}


best regards,
Werner


Werner Fischer, Developer of a Virtuozzo-out-of-the-box-cluster solution at Thomas-Krenn.AG
http://static.openvz.org/userbars/openvz-user.png
Re: DRBD with OpenVZ - how can I shutdown the cluster ina safe way? [message #23068 is a reply to message #16421] Sun, 11 November 2007 19:45 Go to previous messageGo to next message
fgomes is currently offline  fgomes
Messages: 29
Registered: August 2006
Junior Member
I have a working OpenVZ on DRBD system (thanks for all the help on it). What is the best way of shutdown the cluster without getting a split brain scenario on the next startup? During cluster tests, I shut the cluster down often, and it usually starts in the split brain scenario... Is there any action I should do before shutting down? I saw somewhere that I should put both nodes on standby mode, is this correct?

Thanks!

Fernando
Re: DRBD with OpenVZ - how can I shutdown the cluster ina safe way? [message #23077 is a reply to message #23068] Mon, 12 November 2007 07:42 Go to previous messageGo to next message
wfischer is currently offline  wfischer
Messages: 38
Registered: November 2005
Location: Austria/Germany
Member
You should not get a split brain scenario at all when you shut down the cluster nodes.

During shutdown, heartbeat and drbd should be stopped cleanly through the initscripts. On halt, heartbeat should be stopped, e.g. via /etc/rc0.d/K05heartbeat, and DRBD should be stopped, e.g. via /etc/rc0.d/K08drbd

When you have both nodes running, and you shut down the active node first, the second node will then start all the services. So it is faster to shut down the passive node first (then you won't have a switchover). Then you shut down the active node - so both machines are off.

When you boot the cluster again, you need to boot both nodes. If you would only start up one single node, DRBD will print a message on the console that it waits for the other node to come up.

best regards,
Werner


Werner Fischer, Developer of a Virtuozzo-out-of-the-box-cluster solution at Thomas-Krenn.AG
http://static.openvz.org/userbars/openvz-user.png
Re: DRBD with OpenVZ - versions and configurations [message #38223 is a reply to message #16421] Mon, 30 November 2009 11:15 Go to previous messageGo to next message
webofunni is currently offline  webofunni
Messages: 10
Registered: March 2009
Junior Member
Hi,

I am setting up a OpenVZ cluster in such a fashion that each VPS is considered as service.

1. The heartbeat is installed on the 2 node.
2. 3 VPS is running in the main node and fail over VPSs in the second node.
3. The heartbeat will switch the VPS which fails in the main node to the secondary node. All other VPS will run in the main node.

EG : If one VPS fails in the main node then HA will switch the VPS in the secondary node, but the other VPSs will continue to run in the main node.

In this case I selected the DRBD in dual primary mode.

My doubt here is how I will add the VPSs as service in the heartbeat. Do I need to write my own scripts for managing each VPSs. What is the best method to do this setup ?


Regards,
Unni
Re: DRBD with OpenVZ - versions and configurations [message #39140 is a reply to message #38223] Thu, 18 March 2010 12:24 Go to previous message
jjjenny is currently offline  jjjenny
Messages: 1
Registered: March 2010
Junior Member
After some research i found out that it might be the capability NET_ADMIN:on which causes this effect.

Can anyone agree with this or is it impossible that the NET_ADMIN can cause this effect?

Anyway if I use NET_ADMIN:on, which must be set for OpenVPN to work properly, can Containers interfere in an "Attacking way" due to this setting? I mean can anyone break in someones other container due to that option turned on? Or is the worst thing that can happen that a neighbors container can sniff the network traffic?

thx,
ceelian
Report message to a moderator


jjjeney
Previous Topic: Dual Opteron 248's
Next Topic: Kernel binaries for Ubuntu
Goto Forum:
  


Current Time: Tue Mar 19 03:12:57 GMT 2024

Total time taken to generate the page: 0.02301 seconds