| Summary: | LVM prevents itself from doing a down-convert (name including _mimage reserved error) | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Nenad Peric <nperic> |
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
| lvm2 sub component: | Default / Unclassified | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED CURRENTRELEASE | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | agk, cmarthal, heinzm, jbrassow, msnitzer, prajnoha, prockai, thornber, zkabelac |
| Version: | 7.0 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.103-8.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 10:18:13 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
Nenad Peric
2013-09-02 13:24:12 UTC
simple way to reproduce: # Create mirror [root@bp-02 ~]# lvcreate --type mirror -m1 -L 500M -n lv vg Logical volume "lv" created # Upconvert, but kill polling process before it gets to 100% # This prevents the mirror from removing the temporary layer [root@bp-02 ~]# lvconvert -m +1 vg/lv vg/lv: Converted: 2.4% ^C # Wait for 100% sync (makes it easier to avoid dmeventd triggering) [root@bp-02 ~]# devices vg LV Attr Cpy%Sync Devices lv cwi-a-m--- 100.00 lv_mimagetmp_2(0),lv_mimage_2(0) [lv_mimage_0] iwi-aom--- /dev/sdb1(0) [lv_mimage_1] iwi-aom--- /dev/sdc1(0) [lv_mimage_2] iwi-aom--- /dev/sdd1(0) [lv_mimagetmp_2] mwi-aom--- 100.00 lv_mimage_0(0),lv_mimage_1(0) [lv_mlog] lwi-aom--- /dev/sdi1(0) # Kill device [root@bp-02 ~]# off.sh sdi Turning off sdi # command fails. [root@bp-02 ~]# lvconvert --repair vg/lv_mimagetmp_2 Names including "_mimage" are reserved. Please choose a different LV name. Run `lvconvert --help' for more information. Final command in comment 2 will succeed if the top-most mirror is used as the LV to be repaired. Thus, any device that fails in 'lv_mimagetmp_2' will cause this kind of a failure. The solution is to make dmeventd realize that it must repair 'lv' and not its sub-LV, 'lv_mimagetmp_2'. The code already avoids calling repair on *_mlog, so this shouldn't be too difficult. Fix checked-in upstream:
commit 7de533ad12972f5a9c5bf2d2b477d8320f7e4a8e
Author: Jonathan Brassow <jbrassow>
Date: Fri Nov 8 09:52:00 2013 -0600
mirror: Handle failures in tmp mirror used when up-converting.
Failures in the temporary mirror used when up-converting cause dmeventd
to issue 'lvconvert --repair' on the sub-LV, <lv_name>_mimagetmp_?. The
'lvconvert' command refuses to deal with this sub-LV outright - it
expects to be given the name of the top-level LV. So, just like we do
with mirrored logs, we strip-off the portion of the name that is not
the top-level LV and issue the command on the top-level LV instead.
Sorry, comment 2 was meant to show what dmeventd was doing - which was wrong. The fix was to make dmeventd call 'lvconvert' with the name of the top-level mirror device, not fix the command to accept mirror legs. So, this is the expected behavior as long as you can verify dmeventd (i.e. the original bug) is fixed. Tested with multiple iterations of revolution tests, especially with 'remove' policy which causes down-convert and did not run into the the issues mentioned in the opening comment. By checking /var/log/messages I could not find LVM trying to repair mimage_tmp anymore. Marking this bug VERIFIED with: lvm2-2.02.105-13.el7 BUILT: Wed Mar 19 11:38:19 CET 2014 lvm2-libs-2.02.105-13.el7 BUILT: Wed Mar 19 11:38:19 CET 2014 lvm2-cluster-2.02.105-13.el7 BUILT: Wed Mar 19 11:38:19 CET 2014 device-mapper-1.02.84-13.el7 BUILT: Wed Mar 19 11:38:19 CET 2014 device-mapper-libs-1.02.84-13.el7 BUILT: Wed Mar 19 11:38:19 CET 2014 device-mapper-event-1.02.84-13.el7 BUILT: Wed Mar 19 11:38:19 CET 2014 device-mapper-event-libs-1.02.84-13.el7 BUILT: Wed Mar 19 11:38:19 CET 2014 device-mapper-persistent-data-0.2.8-5.el7 BUILT: Sat Mar 1 02:15:56 CET 2014 cmirror-2.02.105-13.el7 BUILT: Wed Mar 19 11:38:19 CET 2014 This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |