Hide Forgot
Description of problem: Unable to exclusively activate opened clustered logical volume. Version-Release number of selected component (if applicable): lvm2-2.02.83-3.el6.x86_64 lvm2-cluster-2.02.83-3.el6.x86_64 How reproducible: always Steps to Reproduce: 1. Build cluster: [root@clvmd2 ~]# clustat Cluster Status for test-cluster @ Sat Oct 1 23:24:19 2011 Member Status: Quorate Member Name ID Status ------ ---- ---- ------ clvmd2 1 Online, Local clvmd3 2 Online [root@clvmd2 ~]# vgs VG #PV #LV #SN Attr VSize VFree vg 1 1 0 wz--nc 9.31g 9.21g [root@clvmd2 ~]# 2. Open (mount, start vm, ...) volume on the node clvmd2: [root@clvmd2 ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert lv1 vg -wi-ao 100.00m [root@clvmd2 ~]# 3. Deactivate volume on the node clvmd3: [root@clvmd3 ~]# lvchange -aln vg/lv1 [root@clvmd3 ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert lv1 vg -wi--- 100.00m [root@clvmd3 ~]# 4. Try to exclusively activate volume on the node clvmd2: [root@clvmd2 ~]# lvchange -ae vg/lv1 Error locking on node clvmd2: Device or resource busy [root@clvmd2 ~]# Actual results: Error locking on node clvmd2: Device or resource busy Expected results: Exclusive lock. Additional info: Attached patches adds option "--convertlock" to the lvchange and vgchange commands, that allows to convert logical volume locks between CR and EX dlm locks: On the clvmd3: [root@clvmd3 ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert lv1 vg -wi--- 100.00m [root@clvmd3 ~]# On the clvmd2: [root@clvmd2 ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert lv1 vg -wi-ao 100.00m [root@clvmd2 ~]# dlm_tool lockdump clvmd id 00120001 gr CR rq IV pid 17714 master 0 "WtfL8phZbJXo4JikRZMDGQDPm3s1A6cLdjm6EVCndfUCUSEiPri2ITjbGr6i6vhf" [root@clvmd2 ~]# lvchange -ae vg/lv1 Error locking on node clvmd3: Device or resource busy [root@clvmd2 ~]# lvchange -ae --convertlock vg/lv1 [root@clvmd2 ~]# dlm_tool lockdump clvmd id 00120001 gr EX rq IV pid 17714 master 0 "WtfL8phZbJXo4JikRZMDGQDPm3s1A6cLdjm6EVCndfUCUSEiPri2ITjbGr6i6vhf" [root@clvmd2 ~]# lvchange -aly --convertlock vg/lv1 [root@clvmd2 ~]# dlm_tool lockdump clvmd id 00120001 gr CR rq IV pid 17714 master 0 "WtfL8phZbJXo4JikRZMDGQDPm3s1A6cLdjm6EVCndfUCUSEiPri2ITjbGr6i6vhf" [root@clvmd2 ~]#
Created attachment 525884 [details] convertlock option for rhel6.1
Created attachment 525885 [details] convertlock option lvm2-2.0.88
Since RHEL 6.2 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
With lvm2-2.02.95-2.el6 version: [root@bar-01 ~]# lvchange -aly vg_test/lv1 [root@bar-01 ~]# lvchange -aey vg_test/lv1 Error locking on node bar-01: Device or resource busy Thanks for patch, I think we need to consider lock conversion option in future.
Made patch for the latest lvm2 version - 2.02.95. I use it (with lvm2-2.0.88) in production environment more than 5 month to make snapshots of the working kvm virtual machines on clustered volume: # lvchange -an vg/disk 2>/dev/null # lvchange -aey --convertlock vg/disk # lvcreate -s -L<snap-size> -n disk-snap vg/disk # <dump snapshot> # lvremove -f vg/disk-snap # lvchange -aly --convertlock vg/disk # lvchange -ay vg/disk
Created attachment 572063 [details] convertlock option lvm2-2.0.95
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
I'm moving this for consideration in 6.5 as it's too late to include this in 6.4 and we still need to go through possible test cases and and do a full review of the code, maybe changing the command line options and reusing existing ones...
Created attachment 735445 [details] convertlock option lvm2-2.0.98 convertlock option support for the lvm2-2.0.98 (rhel6.4)