vg_owner check fails in

Latest response

I have another cluster problem for you. This time on RHEL 5.5


I'm getting the following error:


Oct  6 18:03:54 omzdbat13 clurgmgrd: [7691]: <err> WARNING: vgshrapp02 should not be active
Oct  6 18:03:54 omzdbat13 clurgmgrd: [7691]: <err> WARNING: omzdbat13priv does not own vgshrapp02
Oct  6 18:03:54 omzdbat13 clurgmgrd: [7691]: <err> WARNING: Attempting shutdown of vgshrapp02
Oct  6 18:03:54 omzdbat13 clurgmgrd[7691]: <notice> status on lvm "vgshrapp02" returned 1 (generic error)
Oct  6 18:03:54 omzdbat13 clurgmgrd[7691]: <notice> Stopping service service:omzdbat13svc

I discovered that this check is in


        if [ $? -ne 1 ]; then
                ocf_log err "WARNING: $OCF_RESKEY_vg_name should not be active"
                ocf_log err "WARNING: $my_name does not own $OCF_RESKEY_vg_name"
                ocf_log err "WARNING: Attempting shutdown of $OCF_RESKEY_vg_name


Here's the vg_owner routine:


# vg_owner
# Returns:
#    1 == We are the owner
#    2 == We can claim it
#    0 == Owned by someone else
function vg_owner
        local owner=`vgs -o tags --noheadings $OCF_RESKEY_vg_name`
        local my_name=$(local_node_name)

        if [ -z $my_name ]; then
                ocf_log err "Unable to determine cluster node name"
                return 0

        if [ -z $owner ]; then
                # No-one owns this VG yet, so we can claim it
                return 2

        if [ $owner != $my_name ]; then
                if is_node_member_clustat $owner ; then
                        return 0
                return 2

        return 1

I suspected it was failing the check on the tag field on the VG, so I just created one like this:


# vgchange --addtag omzdbat13priv vgshrapp02


Well, this allowed the service to start up and stay up. But then when I fail the service over to the other node in the cluster, that node reports the same failure.


This script actually controls the value of the tags on the VG with out functions like:


function strip_tags

function strip_and_add_tag


So I have a suspction that these are the functions that are actually not working correctly and applying the correct tag to the VG.


Does anyone have any ideas about this one?




/scratch: bug ID I found pre-dates RHEL 5.5 release by a year.

The issue you are seeing could potentially be caused by having placed a tag on the VG manually at some point (perhaps while you were setting it up).  Go ahead and disable the service:


  # clusvcadm -d omzdbat13svc


Now check the tags on the vg:


  # vgs -o tags vgshrapp02


When the service is not running, there shouldn't be any tags listed (since no one owns it), so if you see any then remove them:


  # vgchange --deltag <tag> vgshrapp02


And deactivate it if its active:


  # vgchange -an vgshrapp02


Now try starting the service back up on either node.


If that doesn't fix it, then post your service definition from /etc/cluster/cluster.conf, as well as the volume_list line from /etc/lvm/lvm.conf on both nodes. 



John Ruemker, RHCA

Red Hat Software Maintenence Engineer

Online User Groups Moderator