OpenVZ Forum


Home » General » Support » Mount bind to merge split shared disk? (Recombining /var/lib/vz for active/active cluster failover)
Mount bind to merge split shared disk? [message #41370] Tue, 11 January 2011 13:19 Go to next message
lastguru is currently offline  lastguru
Messages: 3
Registered: January 2011
Location: Riga, LV
Junior Member

Hi,

I am wondering if the following idea makes any sense, or maybe there are easier methods to do what I need.

I have two servers for which I need to provide active/active cluster high availability. To do this I will use DRBD system to replicate disk between the two nodes.

If I want OpenVZ virtual machines to migrate between the nodes without being copied, I would imagine using OCFS2 or other shared disk filesystem. This is, however, not possible as OpenVZ quotas can not be put on anything other than ext2/3/4.

My next idea was to maintain two separate ext4 filesystems for each node. In case one of the nodes fail, its filesystem would be mounted on the other. There is, however, one catch: as far as I know, OpenVZ can only work within /var/lib/vz. Right?

So to do this, is it possible to recombine single /var/lib/vz tree using mount bind to put root/VID and private/VID to their respective places within the already existing /var/lib/vz tree? So it would be two mount binds per container.

Does it make any sense? Will the quotas work? Will there be any other possible problems?
Re: Mount bind to merge split shared disk? [message #41419 is a reply to message #41370] Tue, 18 January 2011 17:42 Go to previous messageGo to next message
nuno is currently offline  nuno
Messages: 43
Registered: January 2010
Member
you can have, in the CTID.conf these:

VE_PRIVATE="/hello"
VE_ROOT="/there"

and openvz will use /hello as the private folder and create the CT's "root" folder in /there.
Re: Mount bind to merge split shared disk? [message #42187 is a reply to message #41370] Tue, 15 March 2011 21:57 Go to previous messageGo to next message
DavidC is currently offline  DavidC
Messages: 1
Registered: March 2011
Location: Uk
Junior Member
Hi.
I'm wondering if you managed to get this working with
Openvz?

I am in a very similar situation. I currently have two HN's which I would like to-do active-active or clustering to enable live migrations of VM's from one HN to the other etc.

I was looking at DRBD for replication however could not find any info other than for active-failover.

If you did would you mind sharing a little more in depth re your config?!

Thanks.
Dave
Re: Mount bind to merge split shared disk? [message #42200 is a reply to message #42187] Wed, 16 March 2011 23:24 Go to previous message
lastguru is currently offline  lastguru
Messages: 3
Registered: January 2011
Location: Riga, LV
Junior Member

Hi,

Yeah, I actually got it working. I have two DRBD partitions - one is mounted on HN1 in /var/lib/vz1 and another one - on HN2 in /var/lib/vz2. I have configured /etc/vz/vz.conf to have the default directories inside the mentioned partitions. When the failover is happening, I have a simple script that copies latest known container configs inside the other node and mounts the second directory. As the config from the other HN has the second directory listed (just as was previously said in this thread), they are starting correctly on that node.

Till now everything works fine. If you have any problems, you can ping me - I would be interested.

Regards,
Dmitry
Previous Topic: Bash 4.2 problem?
Next Topic: -bash: fork: Cannot allocate memory
Goto Forum:
  


Current Time: Tue Jun 25 23:30:00 GMT 2024

Total time taken to generate the page: 0.03619 seconds