[linux-lvm] LVM snapshot with Clustered VG

Vladislav Bogdanov bubble at hoster-ok.com
Wed Mar 6 07:58:48 UTC 2013


06.03.2013 10:40, Andreas Pflug wrote:
> Am 01.03.13 16:41, schrieb Vladislav Bogdanov:
>> Sorry, forgot to reply to list from the first attempt.
>>
>> Andreas Pflug <pgadmin at pse-consulting.de> wrote:
>>
>>> Hi Vladislav,
>>>
>>> I tried the patch you mentioned in
>>> https://www.redhat.com/archives/linux-lvm/2013-January/msg00006.html ,
>>> but apparently it doesn't work for me. On a locally active LV, I still
>>> get
>>>
>>> ./lvm lvchange -aey -vvvv vg/locktest
>>>
>>> ...
>>> Activating logical volume "locktest" exclusively
>>> #activate/dev_manager.c:284         Getting device info for vg-locktest
>>>
>>> [LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN]
>>> #ioctl/libdm-iface.c:1724         dm info
>>> LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN
>>> NF   [16384] (*1)
>>> #locking/cluster_locking.c:568         Lock held for
>>> oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN, node
>>> 7400a8c0 : CR
>>> #activate/activate.c:1067       vg/locktest is active
>>> #locking/cluster_locking.c:508       Locking LV
>>> oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN EX
>>> (LV|NONBLOCK|CLUSTER|LOCAL) (0xdd)
>>> #locking/cluster_locking.c:395   Error locking on node 7400a8c0: Device
>>>
>>> or resource busy
>>>
>>> Can you give me a hint what to try further?
>>>
>>> Regards
>>> Andreas
>> Hi Andreas,
>> Lock convertion is only enabled if you pass --force flag.
>> Also, to upgrade local lock to exclusive one, you need to ensure IIRC
>> that no more node holds local lock.
> 
> Hm, tried that as well:
> 
> tools/lvm lvchange --force -aey  -vvvv vg/locktest
> 
> --force changes the error from "resource busy" to "invalid argument":

Is volume active on other nodes at that time?
And do you run clvmd from that build tree as well?

Also, can you please try attached patch (on top of that one you have)? I
polished conversion a bit more, denying -an if volume is ex-locked
somewhere and other fixes to logic.
This patch also allows locking (activation) to be performed on remote
nodes. I only tested this with corosync2 (which is set up in a way
latest pacemaker - post-1.1.8 git master - needs, nodes has additional
'name' value in nodelist, please see
http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-node-name.html).

I did not have a time to split this all into git commits suitable for
sending upstream, so it all is a little bit messy yet.

> 
> #lvchange.c:243     Activating logical volume "locktest" exclusively
> (forced)
> #activate/dev_manager.c:284         Getting device info for vg-locktest
> [LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN]
> #ioctl/libdm-iface.c:1724         dm info
> LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN
> NF   [16384] (*1)
> #locking/cluster_locking.c:568         Lock held for
> oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN, node
> 7400a8c0 : CR
> #activate/activate.c:1067       vg/locktest is active
> #activate/dev_manager.c:284         Getting device info for vg-locktest
> [LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN]
> #ioctl/libdm-iface.c:1724         dm info
> LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN
> NF   [16384] (*1)
> #activate/activate.c:1067       vg/locktest is active
> #activate/dev_manager.c:284         Getting device info for vg-locktest
> [LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN]
> #ioctl/libdm-iface.c:1724         dm info
> LVM-oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN
> NF   [16384] (*1)
> #locking/cluster_locking.c:568         Lock held for
> oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN, node
> 7400a8c0 : CR
> #activate/activate.c:1067       vg/locktest is active
> #locking/cluster_locking.c:508       Locking LV
> oW2W7O2cgWRLUhoVR8qqqQY7wlcYexmWU8y83bGQz9IcnXh3GfXslBN6ziZrC3BN EX
> (LV|NONBLOCK|CLUSTER|LOCAL|CONVERT) (0x40dd)
> #locking/cluster_locking.c:395   Error locking on node 7400a8c0: Invalid
> argument
> 
> 
> Regards
> Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: LVM2.2.02.98-remote-activation.patch
Type: text/x-patch
Size: 26826 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20130306/0dc8cc2d/attachment.bin>


More information about the linux-lvm mailing list