RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1711427 - device-mapper: dm-log-userspace: Userspace log server failed to create log: when attempt exclusive linear to mirror conversion
Summary: device-mapper: dm-log-userspace: Userspace log server failed to create log: w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.7
Hardware: x86_64
OS: All
unspecified
medium
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
: 1713716 1719469 (view as bug list)
Depends On: 1719469
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-17 18:57 UTC by Corey Marthaler
Modified: 2021-09-03 12:51 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.02.185-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:10:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2253 0 None None None 2019-08-06 13:11:05 UTC

Description Corey Marthaler 2019-05-17 18:57:20 UTC
Description of problem:
harding-02: pvcreate /dev/mapper/mpatha1 /dev/mapper/mpathb1 /dev/mapper/mpathc1 /dev/mapper/mpathd1 /dev/mapper/mpathf1 /dev/mapper/mpathe1 /dev/mapper/mpathg1 /dev/mapper/mpathh1
harding-02: vgcreate   centipede2 /dev/mapper/mpatha1 /dev/mapper/mpathb1 /dev/mapper/mpathc1 /dev/mapper/mpathd1 /dev/mapper/mpathf1 /dev/mapper/mpathe1 /dev/mapper/mpathg1 /dev/mapper/mpathh1

================================================================================
Iteration 0.1 started at Thu May 16 16:56:43 CDT 2019
================================================================================
Scenario linear_conversion: Convert Linear volume
********* Take over hash info for this scenario *********
* from type:    linear
* to type:      mirror
* from legs:    0
* to legs:      2
* from region:  0
* to region:    0
* contiguous:   1
******************************************************

Creating original volume on harding-02...
harding-02: lvcreate -aye --type linear   -n takeover -L 2.75G centipede2

Current volume device structure:
  LV       Type   Attr       LSize    Cpy%Sync Devices               
  takeover linear -wi-a-----    2.75g          /dev/mapper/mpatha1(0)

Creating xfs on top of mirror(s) on harding-02...
dwarning: device is not properly aligned /dev/centipede2/takeover
Mounting mirrored xfs filesystems on harding-02...

Writing verification files (checkit) to mirror(s) on...
    ---- harding-02 ----

Sleeping 15 seconds to get some outsanding I/O locks before the failure 
Verifying files (checkit) on mirror(s) on...
    ---- harding-02 ----

TAKEOVER: lvconvert --force --yes  -m 1 --type mirror centipede2/takeover
Waiting until all mirror|raid volumes become fully syncd...
   1/1 mirror(s) are fully synced: ( 100.00% )
Sleeping 15 sec

Current volume device structure:
  LV                  Type   Attr       LSize    Cpy%Sync Devices                                  
  takeover            mirror mwi-aom---    2.75g 100.00   takeover_mimage_0(0),takeover_mimage_1(0)
  [takeover_mimage_0] linear iwi-aom---    2.75g          /dev/mapper/mpatha1(0)                   
  [takeover_mimage_1] linear iwi-aom---    2.75g          /dev/mapper/mpathb1(0)                   
  [takeover_mlog]     linear lwi-aom---    4.00m          /dev/mapper/mpathh1(0)                   


May 16 16:57:18 harding-02 qarshd[57165]: Running cmdline: lvconvert --force --yes -m 1 --type mirror centipede2/takeover
May 16 16:57:18 harding-02 multipathd: dm-19: remove map (uevent)
May 16 16:57:18 harding-02 multipathd: dm-19: devmap not registered, can't remove
May 16 16:57:18 harding-02 multipathd: dm-19: remove map (uevent)
May 16 16:57:19 harding-02 cmirrord[54540]: Unable to find path to device 253:19
May 16 16:57:19 harding-02 cmirrord[54540]: Failed to create cluster log (LVM-dQ66V4D1Mdr2fd0Lzvm7gr1UaAe1sphdCAH4CyU71w5Y9Vi5F7v5ktbkSVbD0mS2)
May 16 16:57:19 harding-02 cmirrord[54540]: argv[0] = clustered-disk
May 16 16:57:19 harding-02 cmirrord[54540]: argv[1] = 253:19
May 16 16:57:19 harding-02 cmirrord[54540]: argv[2] = 4096
May 16 16:57:19 harding-02 lvm[4710]: Monitoring mirror device centipede2-takeover for events.
May 16 16:57:19 harding-02 kernel: device-mapper: dm-log-userspace: Userspace log server failed to create log
May 16 16:57:19 harding-02 kernel: device-mapper: table: 253:18: mirror: Error creating mirror dirty log
May 16 16:57:19 harding-02 kernel: device-mapper: ioctl: error adding target to table
May 16 16:57:19 harding-02 systemd: Started LVM2 poll daemon.
May 16 16:57:53 harding-02 lvm[4710]: centipede2-takeover is now in-sync.


Version-Release number of selected component (if applicable):
3.10.0-1039.el7.x86_64

lvm2-2.02.184-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
lvm2-libs-2.02.184-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
lvm2-cluster-2.02.184-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
lvm2-lockd-2.02.184-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
lvm2-python-boom-0.9-16.el7.2    BUILT: Mon Apr 29 08:52:45 CDT 2019
cmirror-2.02.184-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
device-mapper-1.02.156-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
device-mapper-libs-1.02.156-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
device-mapper-event-1.02.156-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
device-mapper-event-libs-1.02.156-3.el7    BUILT: Mon Apr 29 08:50:15 CDT 2019
device-mapper-persistent-data-0.7.3-3.el7    BUILT: Tue Nov 14 05:07:18 CST 2017

Comment 3 David Teigland 2019-05-23 15:00:01 UTC
Not reproducable by me.  Corey is gathering more info.

Comment 4 Jonathan Earl Brassow 2019-06-06 19:14:38 UTC
100% reproducible for me...  will copy comments from bug 1713716 and close that bug as a dup.

Comment 5 Jonathan Earl Brassow 2019-06-06 19:15:32 UTC
(copied from bug 1713716c7)

this scenario should never trigger dm-log-userspace to be used.  That is a cluster mirror component.  From what I can tell, you are activating the mirror exclusively initially.  Comment 3 seems to switch to non-exclusive activation.  This is fine, but I want to point out that there are probably two bugs here, 1) an undesired switch from exclusive to non-exclusive and 2) whatever is going wrong with the mirror conversion.

I'm not sure what is going wrong with the mirror after conversion... the primary is obviously misbehaving.  At that point, all bets are off.

Comment 6 Jonathan Earl Brassow 2019-06-06 19:17:16 UTC
(copied from bug 1713716c8)

couple bizarre things:

1) I'm pretty sure a linear -> mirror didn't have to be exclusively activated before... (unrelated to this bug, of course)
[root@bp-01 ~]# lvconvert -m1 vg/lv
Are you sure you want to convert linear LV vg/lv to raid1 with 2 images enhancing resilience? [y/n]: y
  vg/lv must be active exclusive locally to perform this operation.
This occurs because RAID1 (the default type) does not support cluster operation... This could be tough for a user to figure out.  However, it's not very important since cluster mirroring goes away in RHEL8.

2) WTF?  In REHL7.7?
[root@bp-01 ~]# lvconvert --type mirror -m1 vg/lv
  Shared cluster mirrors are not available.
2.1) Works just fine if switching to exclusive...
[root@bp-01 ~]# lvchange -an vg
[root@bp-01 ~]# lvchange -aey vg/lv
[root@bp-01 ~]# lvconvert --type mirror -m1 vg/lv
  Logical volume vg/lv being converted.
  vg/lv: Converted: 1.60%
  vg/lv: Converted: 100.00%
[root@bp-01 ~]# dmsetup table | grep vg-
vg-lv: 0 1024000 mirror disk 2 253:4 4096 2 253:5 0 253:6 0 1 handle_errors
vg-lv_mimage_1: 0 1024000 linear 8:33 2048
vg-lv_mimage_0: 0 1024000 linear 8:17 2048
vg-lv_mlog: 0 8192 linear 8:129 2048
... tables are correct, but the log entries are not right!
[104885.306295] device-mapper: dm-log-userspace: version 1.3.0 loaded
[104885.312750] device-mapper: dm-log-userspace: Unable to send log request [1] to userspace: -3
[104885.321288] device-mapper: dm-log-userspace: Userspace log server not found
[104885.328333] device-mapper: table: 253:3: mirror: Error creating mirror dirty log
[104885.335810] device-mapper: ioctl: error adding target to table
^^^ This should not be happening.

We should probably stop at problem #2 before moving on to a mirror-to-mirror upconvert... something is already pretty messed up.

Comment 7 Jonathan Earl Brassow 2019-06-06 19:17:48 UTC
*** Bug 1713716 has been marked as a duplicate of this bug. ***

Comment 8 Heinz Mauelshagen 2019-06-06 19:25:25 UTC
Non-clustered scenario tested on el7, works fine w/o any primary errors like the 'Unable to read primary mirror during recovery':
- create linear + mkfs.xfs + mount + rsync
- wait for dirty rsync loadsync
- sync & lvconvert -y -m1 --type mirror ...
- remove files and rsync again
- sync & lvconvert -y -m4 --type mirror ...

Comment 10 Jonathan Earl Brassow 2019-06-06 20:08:47 UTC
(In reply to Jonathan Earl Brassow from comment #6)
> 
> 2) WTF?  In REHL7.7?
> [root@bp-01 ~]# lvconvert --type mirror -m1 vg/lv
>   Shared cluster mirrors are not available.

The error message goes away when 'cmirrord' is properly running.

Perhaps the message should be "cmirrord is not running" instead of "Shared cluster mirrors are not available."

My mistake though.

> 2.1) Works just fine if switching to exclusive...
> [root@bp-01 ~]# lvchange -an vg
> [root@bp-01 ~]# lvchange -aey vg/lv
> [root@bp-01 ~]# lvconvert --type mirror -m1 vg/lv
>   Logical volume vg/lv being converted.
>   vg/lv: Converted: 1.60%
>   vg/lv: Converted: 100.00%
> [root@bp-01 ~]# dmsetup table | grep vg-
> vg-lv: 0 1024000 mirror disk 2 253:4 4096 2 253:5 0 253:6 0 1 handle_errors
> vg-lv_mimage_1: 0 1024000 linear 8:33 2048
> vg-lv_mimage_0: 0 1024000 linear 8:17 2048
> vg-lv_mlog: 0 8192 linear 8:129 2048
> ... tables are correct, but the log entries are not right!
> [104885.306295] device-mapper: dm-log-userspace: version 1.3.0 loaded
> [104885.312750] device-mapper: dm-log-userspace: Unable to send log request
> [1] to userspace: -3
> [104885.321288] device-mapper: dm-log-userspace: Userspace log server not
> found
> [104885.328333] device-mapper: table: 253:3: mirror: Error creating mirror
> dirty log
> [104885.335810] device-mapper: ioctl: error adding target to table
> ^^^ This should not be happening.
> 
> We should probably stop at problem #2 before moving on to a mirror-to-mirror
> upconvert... something is already pretty messed up.

FWIW, the error messages go away when 'cmirrord' is running, but we shouldn't ever be using 'cmirrord' in the first place.

Comment 11 Jonathan Earl Brassow 2019-06-06 20:11:49 UTC
Up-converting from 2-way cluster mirror to 4-way cluster mirror "works", but you get these disturbing messages:
bp-01 login: [108819.675638] device-mapper: raid1: Unable to read primary mirror during recovery
[108819.683025] device-mapper: raid1: Primary mirror (253:7) failed while out-of-sync: Reads may fail.
[108819.688073] device-mapper: raid1: Mirror read failed.
[108819.688168] device-mapper: raid1: Mirror read failed.
[108819.688173] Buffer I/O error on dev dm-3, logical block 127984, async page read
[108822.734896] device-mapper: raid1: Mirror read failed.
[108822.740465] device-mapper: raid1: Mirror read failed.
[108822.745607] Buffer I/O error on dev dm-3, logical block 127984, async page read
[108838.035814] device-mapper: raid1: log presuspend failed
[108838.041494] device-mapper: raid1: log presuspend failed
[108838.046828] device-mapper: raid1: log postsuspend failed

There is good probability for corruption in there - especially around the front of the device.  My guess is that the mirror is being activated with a strange table ordering... a -vvvv trace would probably show the problematic table loads.

Comment 14 David Teigland 2019-06-13 20:18:12 UTC
Looking into this commit as possible cause.  It seems to drop setting mirr_laopts.exclusive.  It is laopts.exclusive that determines whether a clustered log is used or not (see how _add_log() sets the clustered flag).

https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a8921be641afe865c177e11b8859f4b937f76995

Comment 15 David Teigland 2019-06-13 21:05:34 UTC
The reason that a clustered log is being used in _add_log() is because laopts.exclusive is not set.

In the commit referenced above, this appears to be the relevant change:

-               if (!vg_write_lock_held() && lv_is_mirror(lv)) {
-                       mirr_laopts.exclusive = lv_is_active_exclusive_locally(lv) ? 1 : 0;

After restoring these lines, along with debugging, the problem is rather in the fact that lv_is_active_exclusive_locally does not work.  I added this code back and tested:

+               if (!vg_write_lock_held() && lv_is_mirror(lv)) {
+                       /* mirr_laopts.exclusive = lv_is_active_exclusive_locally(lv) ? 1 : 0; */
+                       mirr_laopts.exclusive = 1;
+                       log_print("setting laopts.exclusive %d is_active_ex %d is_active_ex_local %d in monitor_dev_for_events",
+                                 mirr_laopts.exclusive,
+                                 lv_is_active_exclusive(lv),
+                                 lv_is_active_exclusive_locally(lv));
+               }

This forces the exclusive flag, and the problem is resolved, proving that the problem is the failure to set the flag.  Further, it shows that lv_is_active_exclusive_locally would not work for setting the exclusive flag:

#activate/activate.c:2057    setting laopts.exclusive 1 is_active_ex 0 is_active_ex_local 0 in monitor_dev_for_events

I don't know if lv_is_active_exclusive_locally has ever worked correctly in clvmd, or what the prospects might be for making it work.  It seems doubtful to me (I suspect it would have been fixed if it was possible.)  Unless someone else knows of a solution to this, we should disable mirror conversions of exclusively active LVs in a clustered VG.

Comment 16 Zdenek Kabelac 2019-06-13 21:58:14 UTC
Locally exclusive is defined as  'exclusively' locked LV which is active locally  - I'd assume this function always worked.

What is much hard is to activate volume locally exclusively - this can be prohibity by various tagging rules - but the basic rule is - every 'exclusive' activation is first tried locally.

If the requested activation was exclusive & locally - it needs to be checked once the exclusive lock is obtained whether device is present on local machine.

I need to check what has changed in that code.

Comment 17 David Teigland 2019-06-14 15:29:21 UTC
pushed to stable-2.02
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8623e336513c6ac6fcb24aa7e2ef10b8a3a36c59

    lvconvert: disable linear to mirror of active LV in cluster VG
    
    Avoid bug 1711427 in which an exclusively active linear LV in a
    clustered VG, when upconverted to a mirror, will mistakenly use
    a userspace/cmirror log in _add_log() beause laopts.exclusive is
    not set.


Test result:

[root@null-02 ~]# lvcreate -n lv6 -aey -L64M cc
  Logical volume "lv6" created.

[root@null-02 ~]# dlm_tool lockdebug clvmd
Resource len 64  "oDBxuMigltJwjQtrHUMLSoz0XRbYMmDtgFMtb2HLjhxMQH6HXtCNtmQL692e70Y3"
Master           
Granted
00000002 EX                                    

[root@null-02 ~]# dmsetup table cc-lv6
0 131072 linear 8:16 655744

[root@null-02 ~]# lvconvert --type mirror -m1 cc/lv6
  Cannot convert active LV to mirror in clustered VG.

[root@null-02 ~]# lvchange -an cc/lv6

[root@null-02 ~]# lvconvert --type mirror -m1 cc/lv6
  Logical volume cc/lv6 being converted.
  Conversion starts after activation.

[root@null-02 ~]# lvchange -aey cc/lv6

[root@null-02 ~]# dmsetup table cc-lv6
0 131072 mirror disk 2 253:3 1024 2 253:4 0 253:5 0 1 handle_errors

Comment 19 David Teigland 2019-06-17 18:38:54 UTC
Every failure I've seen in this bug and in bug 1713716 began with converting an exclusive linear LV to a mirror.  AFAICT, subsequent conversions of the same LV to include more legs would inherit problems from the original conversion (which is now prevented.)  Please let me know if I have missed any unique failures that would not be avoided by prevening the original convert.

Comment 20 Heinz Mauelshagen 2019-06-19 12:10:33 UTC
(In reply to David Teigland from comment #19)
> Every failure I've seen in this bug and in bug 1713716 began with converting
> an exclusive linear LV to a mirror.  AFAICT, subsequent conversions of the
> same LV to include more legs would inherit problems from the original
> conversion (which is now prevented.)  Please let me know if I have missed
> any unique failures that would not be avoided by prevening the original
> convert.

Meaning you can reenable upconversion of exclusive linear LVs in a cluster again, i.e. revert patch as of c#16 ?

Comment 21 Heinz Mauelshagen 2019-06-19 12:11:46 UTC
(In reply to Heinz Mauelshagen from comment #20)
> (In reply to David Teigland from comment #19)
> > Every failure I've seen in this bug and in bug 1713716 began with converting
> > an exclusive linear LV to a mirror.  AFAICT, subsequent conversions of the
> > same LV to include more legs would inherit problems from the original
> > conversion (which is now prevented.)  Please let me know if I have missed
> > any unique failures that would not be avoided by prevening the original
> > convert.
> 
> Meaning you can reenable upconversion of exclusive linear LVs in a cluster
> again, i.e. revert patch as of c#16 ?

Sorry, I meant c#17

Comment 22 Marian Csontos 2019-06-19 13:46:07 UTC
How is this affecting dmevent upconverting mirror after lost leg?

Comment 23 David Teigland 2019-06-19 15:38:35 UTC
(In reply to Heinz Mauelshagen from comment #21)
> (In reply to Heinz Mauelshagen from comment #20)
> > (In reply to David Teigland from comment #19)
> > > Every failure I've seen in this bug and in bug 1713716 began with converting
> > > an exclusive linear LV to a mirror.  AFAICT, subsequent conversions of the
> > > same LV to include more legs would inherit problems from the original
> > > conversion (which is now prevented.)  Please let me know if I have missed
> > > any unique failures that would not be avoided by prevening the original
> > > convert.
> > 
> > Meaning you can reenable upconversion of exclusive linear LVs in a cluster
> > again, i.e. revert patch as of c#16 ?
> 
> Sorry, I meant c#17

What I meant is that all of the problems in this bug began with the linear->mirror conversion.  That meant that they were all avoided with the patch to disallow the convert.

Now it seems we can revert the commit in comment 17, and allow the convert again, because another patch from another bug appears to fix it.

Comment 24 David Teigland 2019-06-19 15:45:30 UTC
pushed to stable
https://sourceware.org/git/?p=lvm2.git;a=commit;h=f3a87a2c2e339328ea4d7448f43d5317806a6b24

Revert "lvconvert: disable linear to mirror of active LV in cluster VG"

This reverts commit 8623e336513c6ac6fcb24aa7e2ef10b8a3a36c59.

The problem this was avoiding now seems to be fixed by
commit d6bce036155ae973c869bdce3ca5f824f933f599
  mirror: fix monitoring change

Comment 25 Heinz Mauelshagen 2019-06-19 15:46:49 UTC
(In reply to David Teigland from comment #23)
> (In reply to Heinz Mauelshagen from comment #21)
> > (In reply to Heinz Mauelshagen from comment #20)
> > > (In reply to David Teigland from comment #19)
> > > > Every failure I've seen in this bug and in bug 1713716 began with converting
> > > > an exclusive linear LV to a mirror.  AFAICT, subsequent conversions of the
> > > > same LV to include more legs would inherit problems from the original
> > > > conversion (which is now prevented.)  Please let me know if I have missed
> > > > any unique failures that would not be avoided by prevening the original
> > > > convert.
> > > 
> > > Meaning you can reenable upconversion of exclusive linear LVs in a cluster
> > > again, i.e. revert patch as of c#16 ?
> > 
> > Sorry, I meant c#17
> 
> What I meant is that all of the problems in this bug began with the
> linear->mirror conversion.  That meant that they were all avoided with the
> patch to disallow the convert.
> 
> Now it seems we can revert the commit in comment 17, and allow the convert
> again, because another patch from another bug appears to fix it.

For reference: we assume it to be the fix for bz#1719469 as commented in https://bugzilla.redhat.com/show_bug.cgi?id=1719469#c28

Comment 26 Jonathan Earl Brassow 2019-06-19 20:43:10 UTC
Using the stable branch, I've tested this and it seems to work.  Although, it does require the LV to be inactive when up-converting from linear to mirror:

[root@bp-01 ~]# lvs vg
  LV     VG Attr       LSize Pool Origin Data%  Meta%  Move Log           Cpy%Sync Convert
  lv     vg -wi-a----- 2.00g
  mirror vg mwi-a-m--- 2.00g                                [mirror_mlog] 36.33
[root@bp-01 ~]# lvconvert --type mirror -m 1 vg/lv
  Cannot convert active LV to mirror in clustered VG.
[root@bp-01 ~]# lvchange -an vg/lv
[root@bp-01 ~]# lvconvert --type mirror -m 1 vg/lv
  Logical volume vg/lv being converted.
  Conversion starts after activation.
[root@bp-01 ~]# lvchange -ay vg/lv
[root@bp-01 ~]# lvs vg
  LV     VG Attr       LSize Pool Origin Data%  Meta%  Move Log           Cpy%Sync Convert
  lv     vg mwi-a-m--- 2.00g                                [lv_mlog]     17.38
  mirror vg mwi-a-m--- 2.00g                                [mirror_mlog] 100.00
[root@bp-01 ~]# lvchange -an vg/lv
[root@bp-01 ~]# lvchange -aey vg/lv
[root@bp-01 ~]# lvs vg
  LV     VG Attr       LSize Pool Origin Data%  Meta%  Move Log           Cpy%Sync Convert
  lv     vg mwi-a-m--- 2.00g                                [lv_mlog]     100.00
  mirror vg mwi-a-m--- 2.00g                                [mirror_mlog] 100.00


While it should be fixed, I'm ok with needing to deactivate to perform the upconvert.  Need to ensure that it handles downconvert online though, otherwise, fault tolerance will not work.

Comment 27 Jonathan Earl Brassow 2019-06-19 20:45:11 UTC
Online down-convert works just fine, so fault tolerance is still fine.

[root@bp-01 ~]# off.sh sdc
Turning off sdc
[root@bp-01 ~]# dd if=/dev/zero of=/dev/vg/lv bs=4M count=10
10+0 records in
10+0 records out
41943040 bytes (42 MB) copied, 53.8665 s, 779 kB/s
[root@bp-01 ~]# devices vg
  Couldn't find device with uuid mny1dl-pXGT-43gM-eNRU-WinD-gayV-1jiPo7.
  WARNING: Couldn't find all devices for LV vg/mirror_mimage_1 while checking used and assumed devices.
  LV                Attr       Cpy%Sync Devices
  lv                -wi-a-----          /dev/sdb1(0)

... and it maintains the exclusive nature of the mirror:
[root@bp-02 ~]# devices vg
  Couldn't find device with uuid mny1dl-pXGT-43gM-eNRU-WinD-gayV-1jiPo7.
  WARNING: Couldn't find all devices for LV vg/mirror_mimage_1 while checking used and assumed devices.
  LV                Attr       Cpy%Sync Devices
  lv                -wi-------          /dev/sdb1(0)

Comment 28 Jonathan Earl Brassow 2019-06-19 21:14:46 UTC
*** Bug 1719469 has been marked as a duplicate of this bug. ***

Comment 30 Corey Marthaler 2019-07-01 21:40:11 UTC
This scenario passes once again with the latest rpms. Marking verified.

3.10.0-1057.el7.x86_64

lvm2-2.02.185-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
lvm2-libs-2.02.185-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
lvm2-cluster-2.02.185-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
lvm2-lockd-2.02.185-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
lvm2-python-boom-0.9-18.el7    BUILT: Fri Jun 21 04:18:58 CDT 2019
cmirror-2.02.185-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
device-mapper-1.02.158-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
device-mapper-libs-1.02.158-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
device-mapper-event-1.02.158-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
device-mapper-event-libs-1.02.158-2.el7    BUILT: Fri Jun 21 04:18:48 CDT 2019
device-mapper-persistent-data-0.8.5-1.el7    BUILT: Mon Jun 10 03:58:20 CDT 2019



Scenario linear_conversion: Convert Linear volume
********* Take over hash info for this scenario *********
* from type:    linear
* to type:      mirror
* from legs:    0
* to legs:      2
* from region:  0
* to region:    0
* contiguous:   1
******************************************************


Creating original volume on harding-03...
harding-03: lvcreate -aye --type linear   -n takeover -L 2.75G centipede2
WARNING: xfs signature detected on /dev/centipede2/takeover at offset 0. Wipe it? [y/n]: [n]
  Aborted wiping of xfs.
  1 existing signature left on the device.

Current volume device structure:
  LV       Type   Attr       LSize    Cpy%Sync Devices               
  takeover linear -wi-a-----    2.75g          /dev/mapper/mpatha1(0)

Creating xfs on top of mirror(s) on harding-03...
warning: device is not properly aligned /dev/centipede2/takeover
Mounting mirrored xfs filesystems on harding-03...

Writing verification files (checkit) to mirror(s) on...
        ---- harding-03 ----

Sleeping 15 seconds to get some outsanding I/O locks before the failure 
Verifying files (checkit) on mirror(s) on...
        ---- harding-03 ----

TAKEOVER: lvconvert --force --yes  -m 1 --type mirror centipede2/takeover
Waiting until all mirror|raid volumes become fully syncd...
   1/1 mirror(s) are fully synced: ( 100.00% )
Sleeping 15 sec

Current volume device structure:
  LV                  Type   Attr       LSize    Cpy%Sync Devices                                  
  takeover            mirror mwi-aom---    2.75g 100.00   takeover_mimage_0(0),takeover_mimage_1(0)
  [takeover_mimage_0] linear iwi-aom---    2.75g          /dev/mapper/mpatha1(0)                   
  [takeover_mimage_1] linear iwi-aom---    2.75g          /dev/mapper/mpathb1(0)                   
  [takeover_mlog]     linear lwi-aom---    4.00m          /dev/mapper/mpathh1(0)                   

Verifying files (checkit) on mirror(s) on...
        ---- harding-03 ----

RESHAPE: lvconvert --yes  -m 2 centipede2/takeover
Waiting until all mirror|raid volumes become fully syncd...
   1/1 mirror(s) are fully synced: ( 100.00% )
Sleeping 15 sec

Current volume device structure:
  LV                  Type   Attr       LSize    Cpy%Sync Devices                                                       
  takeover            mirror mwi-aom---    2.75g 100.00   takeover_mimage_0(0),takeover_mimage_1(0),takeover_mimage_2(0)
  [takeover_mimage_0] linear iwi-aom---    2.75g          /dev/mapper/mpatha1(0)                                        
  [takeover_mimage_1] linear iwi-aom---    2.75g          /dev/mapper/mpathb1(0)                                        
  [takeover_mimage_2] linear iwi-aom---    2.75g          /dev/mapper/mpathc1(0)                                        
  [takeover_mlog]     linear lwi-aom---    4.00m          /dev/mapper/mpathh1(0)                                        


Verifying files (checkit) on mirror(s) on...
        ---- harding-03 ----

Unmounting xfs and removing mnt point on harding-03...

Deactivating and removing raid(s)
lvchange -an /dev/centipede2/takeover
lvremove -f /dev/centipede2/takeover

Comment 32 errata-xmlrpc 2019-08-06 13:10:44 UTC
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-2019:2253


Note You need to log in before you can comment on or make changes to this bug.