[linux-lvm] Docs on clustererd option of vgcreate

Jonathan Brassow jbrassow at redhat.com
Thu Feb 7 16:59:48 UTC 2008


Clustering LVM (CLVM) provides a way to manage logical volumes in a  
consistent way.

By analogy, if you connect the same disk to two machines, put a file  
system on it (like ext3), and mount the file system on both machines,  
you can expect corruption.  Both machines will be attempting to create/ 
modify/read metadata without the knowledge that someone else is doing  
the same...  You need a cluster aware file system in this type of  
scenario - like GFS.  The same thing is true of LVM... you don't want  
to have two machines sharing the same volume group - extending/ 
shrinking/creating/deleting logical volumes without knowledge of the  
other machine... it would lead to corruption of your volume group  
layout.  This is what CLVM is all about.  It is especially useful when  
coupled with a cluster-aware file system, like GFS and others.  Active/ 
Active setups are where CLVM is most useful.  Active/Passive setups  
can get away with a little less (http://sourceware.org/cluster/wiki/LVMFailover 
).

In active/active environments, the concept of CLVM becomes even more  
important when dealing with more complex RAID.  For example, LVM  
mirroring must be handled in a different way depending on whether a  
logical volume is clustered or not.  (This is handled transparently by  
(C)LVM.)  This is because mirroring creates its own metadata to track  
the degree to which the component legs are in-sync... this status  
tracking must be cluster-aware or the state will be corrupted.  This  
is the reason why there is no snapshotting in CLVM yet.  The cluster- 
coherent version has not yet been written.

  brassow

On Feb 7, 2008, at 10:36 AM, Gerrard Geldenhuis wrote:

> Thanks, the “missing snapshotting” would be a problem. I am still  
> slightly unclear as to the goals of the clustering in LVM…
>
> Regards
>
> From: linux-lvm-bounces at redhat.com [mailto:linux-lvm-bounces at redhat.com 
> ] On Behalf Of Jonathan Brassow
> Sent: 07 February 2008 16:21
> To: LVM general discussion and development
> Subject: Re: [linux-lvm] Docs on clustererd option of vgcreate
>
> The reason the results are likely so sparse is because the two modes  
> of operation (single machine and cluster) are so similar.
>
> Once you've setup a cluster and installed the lvm2-cluster rpm*, new  
> volume groups that are created automatically receive the "clustered"  
> attribute.  [Toggle the cluster attribute by doing vgchange -c[ny]  
> <vg>]  The lvm commands stay the same as if you were running them on  
> a single machine.**
>
>  brassow
>
> * Of course you could compile the sources or use another install  
> method.
> ** Some targets (like snapshots) are not available when using LVM in  
> a clustered mode.
>
> On Feb 7, 2008, at 8:38 AM, Gerrard Geldenhuis wrote:
>
>
> Hi
> I am after a bit more documentation about the usage of the
> --clustered option in vgcreate.
>
> At the moment I don’t have a spare san drive with which I can  
> experiment. My understanding is that you would set this flag when  
> different hosts(nodes) connect to the same storage area typically a  
> san with lvm configured.
>
> I am after a bit more information describing this “clusterering”  
> functionality in lvm and how/where it is used. The man pages on lvm  
> and commands is a bit sparse and I am trawling through google  
> results but not with great success at the moment.
>
> Regards
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20080207/14453cf3/attachment.htm>


More information about the linux-lvm mailing list