Mount bind to merge split shared disk? [message #41370] |
Tue, 11 January 2011 13:19 |
|
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 #42200 is a reply to message #42187] |
Wed, 16 March 2011 23:24 |
|
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
|
|
|