[linux-lvm] [PATCH 01/10] lvchange: Allow cluster lock conversion

Vladislav Bogdanov bubble at hoster-ok.com
Tue Mar 19 15:44:58 UTC 2013


19.03.2013 18:33, Vladislav Bogdanov wrote:
> 19.03.2013 18:23, David Teigland wrote:
>> On Tue, Mar 19, 2013 at 01:32:41PM +0000, Vladislav Bogdanov wrote:
>>> Allow clvm locks to be converted shared <-> exclusive with corosync/dlm.
>>>
>>> Without this it is impossible to alow both
>>> * VM migration (shared lock is required)
>>> * host-side snapshots of VM disks (exlusive lock is required)
>>>
>>> Locks are only converted if --force parameter passed to lvchange.
>>>
>>> Internally LKF_CONVERT flag is passed to dlm, so that is a real lock
>>> conversion.
>>>
>>> Also deny release of an exclusive lock on a remote note without --force
>>> flag to lvchange -an.
>>
>> I'm trying to figure out why the code doesn't already use CONVERT when
>> possible; I would have expected it to. 
> 
> Like me - that's why this patch.
> 
>> (It has to be combined with
>> NOQUEUE to avoid deadlocks.)
> 
> It is from what I see.
> 
>> What happens now without this force/CONVERT
>> patch? a new lock created/requested?
>>
> 
> No, just returns error.

After new lock creation is requested ;) It's a deep evening here, sorry
for being not correct...

> 
> ...
> #lvchange.c:153     Activating logical volume "lustre03-right.vds-ok.com_disk0" exclusively
> #activate/dev_manager.c:285         Getting device info for VG_VDS_OK_POOL_1-lustre03--right.vds--ok.com_disk0 [LVM-2nCt35tXpJcEJUErLzSM3nTjJZwr0DvX3FDOuTp381ZIEVQvUrGCqoSYs4lGhW2O]
> #ioctl/libdm-iface.c:1687         dm info  LVM-2nCt35tXpJcEJUErLzSM3nTjJZwr0DvX3FDOuTp381ZIEVQvUrGCqoSYs4lGhW2O NF   [16384] (*1)
> #locking/cluster_locking.c:563         Lock held for 2nCt35tXpJcEJUErLzSM3nTjJZwr0DvX3FDOuTp381ZIEVQvUrGCqoSYs4lGhW2O, node 3804050a : CR
> #locking/cluster_locking.c:563         Lock held for 2nCt35tXpJcEJUErLzSM3nTjJZwr0DvX3FDOuTp381ZIEVQvUrGCqoSYs4lGhW2O, node 5c04050a : CR
> #locking/cluster_locking.c:563         Lock held for 2nCt35tXpJcEJUErLzSM3nTjJZwr0DvX3FDOuTp381ZIEVQvUrGCqoSYs4lGhW2O, node 3904050a : CR
> #activate/activate.c:1050       VG_VDS_OK_POOL_1/lustre03-right.vds-ok.com_disk0 is active
> #locking/cluster_locking.c:503       Locking LV 2nCt35tXpJcEJUErLzSM3nTjJZwr0DvX3FDOuTp381ZIEVQvUrGCqoSYs4lGhW2O EX (LV|NONBLOCK|CLUSTER|LOCAL) (0xdd)
> #locking/cluster_locking.c:391   Error locking on node 3904050a: Device or resource busy
> ...




More information about the linux-lvm mailing list