Hide Forgot
Description of problem: This bug originates from bug 733114, but I fear that 733114 is becoming just about the I/O errors that can occur with this operation and not about the fact the the operation still doesn't even work with the latest rpms. It seems that the more legs the mirror has, the greater the odds that split attempt will fail. [root@taft-01 ~]# lvs -a -o +devices LV Attr LSize Log Copy% Devices split_same_name mwi-a- 300.00m split_same_name_mlog 100.00 split_same_name_mimage_0(0),split_same_name_mimage_1(0),split_same_name_mimage_2(0) [split_same_name_mimage_0] iwi-ao 300.00m /dev/sdh1(0) [split_same_name_mimage_1] iwi-ao 300.00m /dev/sdg1(0) [split_same_name_mimage_2] iwi-ao 300.00m /dev/sdf1(0) [split_same_name_mlog] lwi-ao 4.00m /dev/sdc1(0) [root@taft-01 ~]# lvconvert --splitmirrors 1 --name new split_image/split_same_name LV split_image/split_same_name_mimage_2 in use: not deactivating Failed to deactivate former mirror image, split_same_name_mimage_2 [root@taft-01 ~]# lvs -a -o +devices LV Attr LSize Log Copy% Devices split_same_name mwi-a- 300.00m split_same_name_mlog 100.00 split_same_name_mimage_0(0),split_same_name_mimage_1(0) [split_same_name_mimage_0] iwi-ao 300.00m /dev/sdh1(0) [split_same_name_mimage_1] iwi-ao 300.00m /dev/sdg1(0) split_same_name_mimage_2 -wi-a- 300.00m /dev/sdf1(0) [split_same_name_mlog] lwi-ao 4.00m /dev/sdc1(0) Version-Release number of selected component (if applicable): [root@taft-01 ~]# /usr/tests/sts-rhel6.2/lvm2/bin/lvm_rpms 2.6.32-195.el6.x86_64 lvm2-2.02.87-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 lvm2-libs-2.02.87-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 lvm2-cluster-2.02.87-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 udev-147-2.38.el6 BUILT: Fri Sep 9 16:25:50 CDT 2011 device-mapper-1.02.66-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 device-mapper-libs-1.02.66-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 device-mapper-event-1.02.66-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 device-mapper-event-libs-1.02.66-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 cmirror-2.02.87-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 How reproducible: Most of the time
After the suspend/resume cycle following the split, sync_local_dev_names() must be called to settle udev before calling deactivate_lv. This avoids udev opening the device and colliding with the removal. Fix passes 1000 iterations of 4-way mirror creation followed by 3 sequential single leg split-offs. Checked-in upstream in Version 2.02.89
git commit id: 5c11544dc10212f5839dde0c97ec86be32c2b4c5
This issue appears to apply to a broader list of lvconvert operations then just --splitmirrors. Mirror leg and log conversion also appears to be broken, which affects device failure and conversion testing. Hopefully the fix for this mentioned in comment #1 affects the other convert options as well.
I ran many iterations of the split image test cases, and although there were still problems like bug 733114 occuring, I no longer saw the "LV in use: not deactivating; Failed to deactivate former mirror image" error. Marking verified with the latest rpms. 2.6.32-198.el6.x86_64 lvm2-2.02.87-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 lvm2-libs-2.02.87-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 lvm2-cluster-2.02.87-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 udev-147-2.38.el6 BUILT: Fri Sep 9 16:25:50 CDT 2011 device-mapper-1.02.66-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 device-mapper-libs-1.02.66-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 device-mapper-event-1.02.66-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 device-mapper-event-libs-1.02.66-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 cmirror-2.02.87-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Do not document.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1522.html