Summary: | "device-mapper: remove ioctl on failed" error when converting to thin pool volume | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Peter Rajnoha <prajnoha> |
Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
lvm2 sub component: | Thin Provisioning (RHEL6) | QA Contact: | Cluster QE <mspqa-list> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | medium | CC: | agk, dwysocha, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, thornber, zkabelac |
Version: | 6.6 | ||
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.02.107-1.el6 | Doc Type: | Bug Fix |
Doc Text: |
Cause:
When converting existing logical volume to thin pool logical volume, LVM needs to open the volume temporarily for it to be initialized with zeroes at its start. However, this initialization step caused WATCH udev rule to trigger. The WATCH udev rule is set for all top-level logical volumes to update udev database records if device content changes - the watch udev rule triggers on each close of the device once if it was open for writing before. This is exactly the case of opening the volume for thin-pool initialization. All udev rules are reevaluated based on the WATCH rule which causes subsequent scanning of the device for changes. At the same time, LVM may try to close the device, ending up with an error to be issued since LVM is unable to remove open device.
Consequence:
There was an error message issued while converting to thin pool volume: "device-mapper: remove ioctl on failed: Device or resource busy".
Fix:
LVM now uses proper flags for temporary volumes which are used during conversions as intermediate step. These flags direct udev to avoid setting WATCH rule or initiate any scanning on such devices until they're properly initialized.
Result:
There's no message about device-mapper device removal issued anymore during logical volume conversion to thin pool logical volume.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2014-10-14 08:24:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: |
Description
Peter Rajnoha
2013-10-29 13:11:13 UTC
The fix for lvconvert part - proper flagging with LV_TEMPORARY flag: https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=f1a42aa8ec4c6d693b57832a8575ee68b9e71b12 Unfortunately the SCENARIO - [convert_vol_to_snap] still has the issue. The other scenarios did not hit it in my short test of 3 iterations. I can repeat the tests any time if needed with other test scenarios as well. But for now moving it back to ASSIGNED. The problem here is that there's existing and active LV we're trying to convert to snapshot without deactivating it first and activating with proper udev flags to mark this device as "private". When running lvconvert, we're directly calling: #metadata/lv_manip.c:5768 Initializing 4.00 KiB of logical volume "snapper_thinp/snap_to_convert" with value 0. ... #activate/activate.c:2137 Deactivating snapper_thinp/snap_to_convert. ... #ioctl/libdm-iface.c:1773 device-mapper: remove ioctl on failed: Device or resource busy The steps taken: - zeroing - deactivating The steps that should be taken instead: - deactivating - activating with proper flags (LV_TEMPORARY) - zeroing - deactivating The fix should be already in! (v104, 6.6 build has v107/v108 already) Moving to MODIFIED. Ran 5 iterations of all the scenarios, repeated the convert_vol_to_snap with another 5 just to be sure. Did not encounter the issue reported anymore. Marking VERIFIED with: kernel: 2.6.32-491.el6.x86_64 lvm2-2.02.107-2.el6 BUILT: Fri Jul 11 15:47:33 CEST 2014 lvm2-libs-2.02.107-2.el6 BUILT: Fri Jul 11 15:47:33 CEST 2014 lvm2-cluster-2.02.107-2.el6 BUILT: Fri Jul 11 15:47:33 CEST 2014 udev-147-2.56.el6 BUILT: Fri Jul 11 16:53:07 CEST 2014 device-mapper-1.02.86-2.el6 BUILT: Fri Jul 11 15:47:33 CEST 2014 device-mapper-libs-1.02.86-2.el6 BUILT: Fri Jul 11 15:47:33 CEST 2014 device-mapper-event-1.02.86-2.el6 BUILT: Fri Jul 11 15:47:33 CEST 2014 device-mapper-event-libs-1.02.86-2.el6 BUILT: Fri Jul 11 15:47:33 CEST 2014 device-mapper-persistent-data-0.3.2-1.el6 BUILT: Fri Apr 4 15:43:06 CEST 2014 cmirror-2.02.107-2.el6 BUILT: Fri Jul 11 15:47:33 CEST 2014 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-2014-1387.html |