[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] Linux Cluster + KVM + LVM2



On 07/19/2011 10:19 AM, Marc Caubet wrote:
> Hi,
> 
> we are testing RedHat Cluster to build a KVM virtualization
> infrastructure. This is the first time we use the Linux Cluster so we
> are a little bit lost. Hope someone can help.
> 
> Actually we have 2 hypervisors connected via Fiber Channel to a shared
> storage (both servers see the same 15TB device /dev/mapper/mpathb).
> 
> Our idea is a shared storage to hold KVM virtual machines by using LVM2.
> Both server should be able to run Virtual Machines from the same
> storage, but we should be able to migrate or start virtual machines on
> the other server node on crash.
> 
> So the plan is:
> 
> - Virtual Machine image = Logical Volume
> - CLVM2 cluster: only one server node at the same time will be able to
> manage the volume group-
> - KVM Virtual Machine High Availability. Machines will run on one server
> node. If for some reason the server node crashes, the second will start
> / migrate the virtual machine.
> 
> Basically we woul like to know:
> 
> - How can we create a cluster for the LVM2 shared storage (when we
> create it, it does not work since both server nodes have the VG as Active)
> - How can we create a cluster service for a virtual machine (we guess it
> has to be done 1 by 1)
> - Since we have 2 server nodes, how to increase the number of votes for
> quorum (qdisk over a heartbeat logical volume partition?)
> 
> Thanks and best regards,

You need to setup a cluster with fencing, which will let you then use
clustered LVM, clvmd, which in turn uses the distributed lock manager,
dlm. This will allow for the same LVs to be seen and used across cluster
nodes.

Then you will simply add the VMs as resources to rgmanager, which uses
(and sits on top of) corosync, which is itself the core of the cluster.

I'm guessing that you are using RHEL 6, so this may not map perfectly,
but I described how to build a similar Xen-based HA VM cluster on EL5.
The main differences are; Corosync instead of OpenAIS (changes nothing,
configuration wise), ignore DRBD as you have a proper SAN and replace
Xen with KVM. The small GFS2 partition is still recommended for central
storage of the VM definitions (needed for migration and recovery).
However, if you don't have a GFS2 license, you can manually keep the
configs in sync on matching local directories on the nodes.

See if this helps at all:

http://wiki.alteeve.com/index.php/Red_Hat_Cluster_Service_2_Tutorial

Best of luck. :)

-- 
Digimer
E-Mail:              digimer alteeve com
Freenode handle:     digimer
Papers and Projects: http://alteeve.com
Node Assassin:       http://nodeassassin.org
"At what point did we forget that the Space Shuttle was, essentially,
a program that strapped human beings to an explosion and tried to stab
through the sky with fire and math?"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]