All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: Possibility to convert to exclusive active (opened) volume on clustered VG
Date: Fri, 06 Dec 2013 09:47:39 +0100	[thread overview]
Message-ID: <52A18F2B.5070607@redhat.com> (raw)
In-Reply-To: <52A14E1A.3030509@activecloud.com>

Dne 6.12.2013 05:10, Raman napsal(a):
> Hello,
>
> Currently there is no way to convert opened volume from CR to EX or
> from EX to CR lock type on clustered volume group. The only way is to
> deactivate volume and activate it exclusively again. Example:
>
> Simple cman cluster:
> [root at clvmd2 ~]# cat /etc/cluster/cluster.conf
> <?xml version="1.0"?>
> <cluster config_version="1" name="clu">
>          <clusternodes>
>                  <clusternode name="clvmd1" nodeid="1"/>
>                  <clusternode name="clvmd2" nodeid="2"/>
>          </clusternodes>
>          <cman broadcast="yes" port="5501"/>
>          <totem token="60000"/>
> </cluster>
>
> Clustered volume group:
> [root at clvmd1 ~]# vgs --noheadings
>    vg     1   1   0 wz--nc 9.31g 9.21g
>
> Single volume activated on both nodes:
> [root at clvmd1 ~]# lvs --noheadings
>    lv1  vg   -wi-a----- 100.00m
> [root at clvmd2 ~]# lvs --noheadings
>    lv1  vg   -wi-a----- 100.00m
>
> Deactivating on second node and trying to acquire volume exclusively on
> the first node:
> [root at clvmd2 ~]# lvchange -aln vg/lv1
> [root at clvmd1 ~]# lvchange -ae vg/lv1
>    Error locking on node clvmd1: Device or resource busy
> [root at clvmd1 ~]#
>
> But works fine with deactivating cycle:
> [root at clvmd1 ~]# lvchange -aln vg/lv1 && lvs --noheading
>    lv1  vg   -wi------- 100.00m
> [root at clvmd1 ~]# lvchange -ae vg/lv1 && lvs --noheading
>    lv1  vg   -wi-a----- 100.00m
> [root at clvmd1 ~]#
>
> Proposed patch tries to solve this problem allowing lock conversion
> for activated volumes on clustered volume groups.


Patch looks mostly good - but has one 'tiny' problem which is unfortunately 
not so easy to resolve.

+#define LCK_CONVERT	0x00000800U	/* Try lock conversion */

I do not know how old code are you are patching - but recent upstream git has 
this bit already in use:

#define LCK_REMOTE	0x00000800U	/* Propagate to remote nodes only */


And the protocol is awkward to extend (all bits are already in use).

So the question is if we are able to find some bit combination
to use it uniquely for activate_lv_excl_local_convert()?


Zdenek



  reply	other threads:[~2013-12-06  8:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06  4:10 Possibility to convert to exclusive active (opened) volume on clustered VG Raman
2013-12-06  8:47 ` Zdenek Kabelac [this message]
2013-12-06 14:13   ` Raman
2013-12-06 14:31     ` Zdenek Kabelac
2013-12-07  3:08       ` [PATCH] Try to convert existing lock on volume reactivation for clustered volume groups Raman Shishniou
2013-12-18  3:05         ` Raman Shishniou
2013-12-18  7:28           ` Zdenek Kabelac
2014-10-30 15:57             ` Rommer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A18F2B.5070607@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.