[Linux-cluster] RHEL 6 cluster filesystem resource and LVM snapshots

Xavier Montagutelli xavier.montagutelli at unilim.fr
Wed Nov 24 09:48:48 UTC 2010


On Wednesday 24 November 2010 09:34:48 Jankowski, Chris wrote:
> Xavier,
> 
> Thank you for the explanation.
> This all makes sense.
> 
> One more question about one of the documents you pointed me to:
> 
> What does this do exactly and why do I need it:
> 
> Quote:
> 
> 4) Update your initrd on all your cluster machines. Example:
> prompt> new-kernel-pkg --mkinitrd \
>         --initrdfile=/boot/initrd-halvm-`uname -r`.img --install `uname -r`
> 
> Unquote

Caution : the following are only supposition, because I haven't read the 
lvm.sh script. 

In step 3 of http://sources.redhat.com/cluster/wiki/LVMFailover , you have to 
modify your lvm.conf file, "volume_list" parameter, to filter the VG/LV that can 
be activated on a particular host.

In step 4, they say to create a new initrd : I suppose this step is necesary 
to include the modified lvm.conf file inside the initrd, and to NOT activate the 
VG located on the shared storage at boot time.

The lvm.sh script must add or remove the "good" tag (i.e. a tag matching the 
hostname of the node running the service) on the fly.

If someone can confirm or give additional pointers ?

> 
> Regards,
> 
> Chris Jankowski
> 
> -----Original Message-----
> From: linux-cluster-bounces at redhat.com
>  [mailto:linux-cluster-bounces at redhat.com] On Behalf Of Xavier Montagutelli
>  Sent: Wednesday, 24 November 2010 19:04
> To: linux clustering
> Subject: Re: [Linux-cluster] RHEL 6 cluster filesystem resource and LVM
>  snapshots
> 
> On Wednesday 24 November 2010 01:20:42 Jankowski, Chris wrote:
> > Hi,
> >
> > 1.
> > I found in the "Logical Volume Manager Administration" manual for RHEL 6
> > on p.12 and on p.35 the following statement:
> >
> > "LVM snapshots are not supported across the nodes in a cluster. You
> > cannot create a snapshot volume in a clustered volume group."
> >
> > I understand that this means no snapshots for shared volumes when using
> >  CLVM.
> >
> > 2.
> > Strangely enough, I also found the following fragment on p.4 of the same
> >  manual:
> >
> > "If you are using a clustered system for failover where only a single
> > node that accesses the storage is active at any one time, you should use
> > High Availability Logical Volume Manager agents (HA-LVM). For information
> > on HA-LVM, see Configuring and Managing a Red Hat Cluster."
> >
> > I understand this as an older system of synchronizing LVM configuration
> >  across the nodes that predates CLVM. I thought it was deprecated.
> > Anyway, I cannot find any pointers to it in the current RHEL 6 manual.
> >
> > Questions:
> >
> > - Is HA-LVM still a viable option for the "one at a time" scenario
> >  described in the fragment above?
> >
> >From what I understand, with HA-LVM, a VG on a shared storage will be
> 
> activated on only one node at a time. From my point of view, it is not a
> "synchronization" mechanism, it only ensures that only one node has access
>  to a VG.
> 
> Is it relieable ? From the doc (see below), I suppose it works with "tags"
> added on the VG, and with lvm.conf being properly configured. So it is not
> built into LVM itself, and can be "broken" if the administrator makes a
> mistake or forgive a step in the configuration...
> 
> Can something wrong happen if two nodes access the same VG at the same
>  time, *without modifying anything* ? Afterall, in that case, LVM only
>  reads metadata, no write. A friend of mine used LVM like that during some
>  time, nothing broke. I know this a a Bad Thing, but can someone really
>  give me a hint about what could happen ?
> 
> >  - If so, where do I find more information
> >  about HA-LVM? What should I search for?
> 
> Perhaps here :
> 
> http://docs.redhat.com/docs/en-
> US/Red_Hat_Enterprise_Linux/6/html/Cluster_Administration/ap-ha-resource-
> params-CA.html#tb-lvm-resource-CA
> 
> and here :
> 
> http://sources.redhat.com/cluster/wiki/LVMFailover
> 
> >  - If it is still a viable option, would it support LVM snapshots?
> 
> I suppose yes, because you'll be using "normal" LVM. But of course, there
>  are maybe a few things to take care of, like : what happens if you mount
>  the snapshot on the active node (these things being done outside the
>  cluster manager), then you want to stop the service and restart it on
>  another node in the cluster ?
> 
> > Thanks and regards,
> >
> > Chris Jankowski
> >
> >
> > -----Original Message-----
> > From: Jankowski, Chris
> > Sent: Wednesday, 24 November 2010 07:23
> > To: 'linux clustering'
> > Subject: RE: [Linux-cluster] RHEL 6 cluster filesystem resource and LVM
> >  snapshots
> >
> > Roger,
> >
> > Thank you.
> > I see your point.  Indeed, it looks that I need CLVM regardless of the
> > type of filesystem used.
> >
> > Question:
> > Does CLSVM support snapshots?
> >
> > Thanks and regards,
> >
> > Chris Jankowski
> >
> > -----Original Message-----
> > From: linux-cluster-bounces at redhat.com
> >  [mailto:linux-cluster-bounces at redhat.com] On Behalf Of Roger Pena
> > Escobio Sent: Wednesday, 24 November 2010 01:32
> > To: linux clustering
> > Subject: Re: [Linux-cluster] RHEL 6 cluster filesystem resource and LVM
> >  snapshots
> >
> > --- On Tue, 11/23/10, Jankowski, Chris <Chris.Jankowski at hp.com> wrote:
> > > From: Jankowski, Chris <Chris.Jankowski at hp.com>
> > > Subject: Re: [Linux-cluster] RHEL 6 cluster filesystem resource and LVM
> > > snapshots To: "linux clustering" <linux-cluster at redhat.com>
> > > Received: Tuesday, November 23, 2010, 6:45 AM
> > > Xavier,
> > >
> > > I do not think that I have to use CLVM with ext4 or XFS in
> > > a cluster.
> > >
> > > The ext4 or XFS filesystems will be on shared (FC) storage,
> > > but they will be presented as a filesystem resource i.e.
> > > accessible to only one cluster at a time, as they have to
> > > be. So, I believe that simple LVM will do and snapshots will
> > > be available.
> >
> > Hi Chris
> >
> > first I would like to say it has been a long time since I used RHCS and
> > the only major problems I had was with clvm, but,  by your question, I
> > think if you still foresee changes in the lvm space, you will still need
> > clvm, even if the filesystem will be a non-cluster FS
> >
> > the lvm layout is independent of the filesystem used, you might want to
> > add more volumes to a group, resize, etc, and that info is read and
> > cached when the kernel read the device, not when mounting the filesyste,
> > so, if the device is presented to a node of the cluster, it will read the
> > lvm layout and filesystem properties, even if not mounted. If you change
> > that layout in one node, the others nodes might have a wrong information
> > that could led to a crash in case you tried to mount the fs in there.
> >
> >
> > see the point of having clvm in a cluster even if using ext3/4 ?
> >
> > if you don't plan to use lvm for the cluster, which is possible since you
> >  are having the device from a SAN/NAS/iSCSI where you will have exactly,
> > or almost exactly, the same features that LVM provide, why having the
> > extra layer if you will not use it ?
> >
> > that is the conclusion I reached years ago when facing problems with CLVM
> >
> > thanks
> > roger
> >
> >
> >
> > --
> > Linux-cluster mailing list
> > Linux-cluster at redhat.com
> > https://www.redhat.com/mailman/listinfo/linux-cluster
> >
> > --
> > Linux-cluster mailing list
> > Linux-cluster at redhat.com
> > https://www.redhat.com/mailman/listinfo/linux-cluster
> 

-- 
Xavier Montagutelli                      Tel : +33 (0)5 55 45 77 20
Service Commun Informatique              Fax : +33 (0)5 55 45 75 95
Universite de Limoges
123, avenue Albert Thomas
87060 Limoges cedex




More information about the Linux-cluster mailing list