[linux-lvm] new to cLVM - some principal questions

Digimer linux at alteeve.com
Tue Nov 22 19:32:03 UTC 2011

On 11/22/2011 02:22 PM, Lentes, Bernd wrote:
> Hi,
> i have a bit experience in LVM, but not in cLVM. So i have some principal questions:
> My idea is to establish a HA-Cluster with two nodes. The ressources which are managed by the cluster are virtual machines (KVM).
> I have a FC SAN, where the vm's will reside. I want to create vdisks in my SAN which are integrated as a PV in both hosts. On top of the PV's i will create a VG, and finally LV's. For each VM one LV.
> How are things going with cLVM ? Do i have to create PV ==>  VG ==>  LV seperately ? Or does cLVM replicate the information from one host to the other ? So that i have to create PV, VG and LV only once on the first node and this configuration is replicated to the second host.
> What is about e.g. resizing a LV ? Is this replicated, or do i have to resize twice, on each host ?
> E.g. one host is running VM3 in the corresponding lv3 on the first host. Is the second host able to access lv3 simultaneously or is there a kind of locking ?
> Is it possible to run some vm's on the first host and others on the second (as a kind of load-balancing) ?
> Is it possible to perform a live-migration from one host to the other in this scenario ?
> I will not install a filesystem in the lv's, because i got recommendations to run the vm's in bare partitions, this would be faster.
> Thanks for any eye-opening answer.
> Bernd

Clustered LVM is, effectively, just normal LVM with external (clustered) 
locking using DLM. Once built, anything you do on one node will be seen 
immediately on all other nodes.

Mount your iSCSI target as your normally would on all nodes. On one 
node, with clvmd running, 'pvcreate /dev/foo' then 'vgcreate -c y -n bar 
/dev/foo'. If you then run 'vgscan' on all other nodes, you'll see the 
VG you just created.

Be absolutely sure you configure fencing in your cluster! If a node 
falls silent, it must be forcibly removed from the cluster before any 
recovery can commence. Failed fencing will hang the cluster, and 
short-circuited fencing will lead to corruption.

Finally, yes, you can do live migration between nodes in the same 
cluster (specifically, they need to be in the same DLM lockspace).

I use clvmd quite a bit, feel free to ask if you have any more 
questions. I also have an in-progress tutorial using clvmd on DRBD, but 
you could just replace "/dev/drbdX" with the appropriate iSCSI target 
and the rest is the same.

E-Mail:              digimer at alteeve.com
Freenode handle:     digimer
Papers and Projects: http://alteeve.com
Node Assassin:       http://nodeassassin.org
"omg my singularity battery is dead again.
stupid hawking radiation." - epitron

More information about the linux-lvm mailing list