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

Re: [Linux-cluster] Info on clvmd with halvm on rhel 6.3 based clusters


On 07/05/2013 01:03 AM, Gianluca Cecchi wrote:
I already read these technotes so that it seems my configuration is
coherent with them:


basically I would like to use clvmd with ha-lvm (as recommended) and
set up the cluster service with resources like this:

                         <lvm lv_name="lv_prova" name="lv_prova"
                         <fs device="/dev/VG_PROVA/lv_prova"
force_fsck="0" force_unmount="1" fsid="50013" fstype="ext3
" mountpoint="/PROVA" name="PROVA" options="" self_fence="1"/>

                 <service autostart="1" domain="MYDOM" name="MYSERVICE">
                         <lvm ref="lv_prova"/>
                         <fs ref="PROVA"/>

The problem is that if I starts both nodes, when clvmd starts it
activates all the VGs, because of

action "Activating VG(s):" ${lvm_vgchange} -ayl $LVM_VGS || return $?

in init script for clvmd and $LVM_VGS empty

So when the service starts, it fails in lv activation (because already
active) and then the service goes in failed state.

You aren't starting rgmanager with the -N option are you?  It is not the default.
# man clurgmgrd
       -N     Do  not  perform  stop-before-start.  Combined with the -Z flag to clusvcadm, this can be used to allow rgmanager to be upgraded
              without stopping a given user service or set of services.

What is supposed to happen is:
- clvmd is started at boot time, and all clustered logical volumes are activated (including CLVM HA-LVM volumes)
- rgmanager starts after clvmd, and it initializes all resources to ensure they are in a known state.  For example:
Jul  4 20:06:26 r6ha1 rgmanager[2478]: I am node #1
Jul  4 20:06:27 r6ha1 rgmanager[2478]: Resource Group Manager Starting
Jul  4 20:06:27 r6ha1 rgmanager[2478]: Loading Service Data
Jul  4 20:06:33 r6ha1 rgmanager[2478]: Initializing Services                  <----
Jul  4 20:06:33 r6ha1 rgmanager[3316]: [fs] stop: Could not match /dev/vgdata/lvmirror with a real device
Jul  4 20:06:33 r6ha1 rgmanager[2478]: stop on fs "fsdata" returned 2 (invalid argument(s))
Jul  4 20:06:35 r6ha1 rgmanager[2478]: Services Initialized
Jul  4 20:06:35 r6ha1 rgmanager[2478]: State change: Local UP
Jul  4 20:06:35 r6ha1 rgmanager[2478]: State change: r6ha2.cluster.net UP
- So when rgmanager starts, it stops the CLVM HA-LVM logical volumes again prior to starting the service, unless you disabled the "stop-before-start" option.

I did a quick test and I got the same results as you.  Can you show your resource/service definitions and the logs of when rgmanager starts up?

My system is registered with rhsm and bound to 6.3 release.
Current packages

I can solve my problem if I set the clvmd init scripts as in rhel 5.9
where there is a conditional statement.
Diff between original 6.3 clvmd init script and mine is now:

$ diff clvmd clvmd.orig
< # Activate & deactivate clustered LVs
< if [ -n "$CLVMD_ACTIVATE_VOLUMES" ] ; then
< ${lvm_vgscan} > /dev/null 2>&1
${lvm_vgscan} > /dev/null 2>&1
< action "Activating VG(s):" ${lvm_vgchange} -ayl $LVM_VGS || return $?
< fi
action "Activating VG(s):" ${lvm_vgchange} -ayl $LVM_VGS || return $?

Then I set this in  /etc/sysconfig/clvmd

Now all seems ok in start, stop and relocate.

This is another option, but it shouldn't be required if rgmanager is allowed to stop the resources prior to starting the service. We could raise an RFE to add this functionality to RHEL6 if a case is opened.

Between technotes of 6.4 I only see this

BZ #729812
Prior to this update, occasional service failures occurred when
starting the clvmd variant of the
HA-LVM service on multiple nodes in a cluster at the same time. The
start of an HA-LVM
resource coincided with another node initializing that same HA-LVM
resource. With this update,
a patch has been introduced to synchronize the initialization of both
resources. As a result,
services no longer fail due to the simultaneous initialization.

but I'm not sure if it is related with my problem as it is private.

This is only related to starting the HA-LVM resources simultaneously on multiple nodes, and it synchronizes them correctly so it can only start on node node.

Can anyone give his/her opinion?
I'm going to open a case with redhat, but I would like to understand
if it's me missing something trivial.... as I think I would not be the
only one with this kind of configuration....

If you open a case with Red Hat, it may find its way to me and we can troubleshoot further.

Thanks in advance,



Ryan Mitchell
Red Hat Global Support Services

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