Bug 1595875
Summary: | split off --type mirror images are not being properly activated online | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> | ||||
Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> | ||||
lvm2 sub component: | Mirroring and RAID | QA Contact: | cluster-qe <cluster-qe> | ||||
Status: | CLOSED ERRATA | Docs Contact: | |||||
Severity: | low | ||||||
Priority: | unspecified | CC: | agk, heinzm, jbrassow, msnitzer, prajnoha, rbednar, rhandlin, zkabelac | ||||
Version: | 7.6 | Keywords: | Regression, TestBlocker | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | lvm2-2.02.180-4.el7 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-10-30 11:03:47 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: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Corey Marthaler
2018-06-27 16:00:46 UTC
Created attachment 1455081 [details]
verbose lvconvert attempt
FWIW, reactivating the volume will properly activate it: [root@host-093 ~]# ls /dev/split_image/new0 ls: cannot access /dev/split_image/new0: No such file or directory [root@host-093 ~]# lvchange -an split_image/new0 [root@host-093 ~]# lvchange -ay split_image/new0 [root@host-093 ~]# lvs -a -o +devices split_image/new0 LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices new0 split_image -wi-a----- 300.00m /dev/sde1(0) [root@host-093 ~]# ls /dev/split_image/new0 /dev/split_image/new0 This is a regression from commit 29b2cfba06ee849774025c50599edb1c7587b7d9 Author: Zdenek Kabelac <zkabelac> Date: Tue Mar 13 12:48:36 2018 +0100 mirror: correct locking for mirror log initialization The code was not acking proper lock holding LVs when trying to initialize mirror log to predefined values. https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=29b2cfba06ee849774025c50599edb1c7587b7d9 There is a lot going on in that commit, so it's not clear to me what part of it is at fault. *** Bug 1597307 has been marked as a duplicate of this bug. *** Probably this hunk at fault in _split_mirror_images - /* - * Recycle newly split LV so it is properly renamed. - * Cluster requires the extra deactivate/activate calls. - */ - if (vg_is_clustered(lv->vg) && - (!deactivate_lv(cmd, new_lv) || - !_activate_lv_like_model(lv, new_lv))) { - log_error("Failed to rename newly split LV in the kernel"); - return 0; - } - if (!suspend_lv(cmd, new_lv) || !resume_lv(cmd, new_lv)) { + act = lv_is_active(lv_lock_holder(lv)); + + if (act && !_activate_lv_like_model(lv, new_lv)) { log_error("Failed to rename newly split LV in the kernel"); return 0; } Seems like the fix mentioned in comment 6 has fixed long outstanding bug where volume has been left active in dm table without taking explicit lock for it's activation. If the wanted behavior is to have the spitted volume to be actually active - it would need to be explicitly activated - the question is how to do it. Mirror can be cluster-wide activated (for lvm2 with cluster activation support) - but where it's splitted mirror image should be activated ? If the mirror LV is active on node A - and split is executed on node B - where is it meant to be activated ? IMHO the current behavior where splitted LV is left inactive is the only correct logic we can provide considering there is supported clustered activation and it's been before 'leaking' device being activated without holding proper lock on proper nodes. But if there is some strong need to support some sort activation - we need to define where the splitted LV is supposed to appear active - easiest for implementation seems to be implementing exclusive activation for the node executing split operation. Should be resolved by this patch that fixes preload of splitted mirror leg and adds deactivation for locally active device before reactivation. https://www.redhat.com/archives/lvm-devel/2018-August/msg00014.html Image splitting scenarios are once again work w/ the latest rpms. Marking verified. 3.10.0-937.el7.x86_64 lvm2-2.02.180-5.el7 BUILT: Tue Aug 21 11:29:37 CDT 2018 lvm2-libs-2.02.180-5.el7 BUILT: Tue Aug 21 11:29:37 CDT 2018 device-mapper-1.02.149-5.el7 BUILT: Tue Aug 21 11:29:37 CDT 2018 device-mapper-libs-1.02.149-5.el7 BUILT: Tue Aug 21 11:29:37 CDT 2018 device-mapper-event-1.02.149-5.el7 BUILT: Tue Aug 21 11:29:37 CDT 2018 device-mapper-event-libs-1.02.149-5.el7 BUILT: Tue Aug 21 11:29:37 CDT 2018 device-mapper-persistent-data-0.7.3-3.el7 BUILT: Tue Nov 14 05:07:18 CST 2017 SCENARIO - [sequentially_split_off_all_pvs] Create a mirror with many legs and then sequentially split off each one of the PVs hayes-01: lvcreate --activate y --type mirror -m 4 -n split_pvs_sequentially -L 300M split_image Waiting until all mirror|raid volumes become fully syncd... 1/1 mirror(s) are fully synced: ( 100.00% ) Sleeping 15 sec splitting off legs: /dev/sdj1 /dev/sdg1 /dev/sdk1 /dev/sdc1 Deactivating LV split_image/new0 on hayes-01... and removing Deactivating LV split_image/new1 on hayes-01... and removing Deactivating LV split_image/new2 on hayes-01... and removing Deactivating LV split_image/new3 on hayes-01... and removing Deactivating LV split_image/split_pvs_sequentially on hayes-01... and removing 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. https://access.redhat.com/errata/RHBA-2018:3193 |