Bug 1722539

Summary: remove cluster mirror capability with lvmlockd
Product: Red Hat Enterprise Linux 7 Reporter: David Teigland <teigland>
Component: lvm2Assignee: David Teigland <teigland>
lvm2 sub component: Clustered Mirror / cmirrord QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, cmarthal, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, rbednar, rhandlin, zkabelac
Version: 7.7   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.186-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 20:04:51 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:

Description David Teigland 2019-06-20 15:14:04 UTC
Description of problem:

This is a RHEL7 version of RHEL8 bug 1691095 which disables using cmirror with lvmlockd because it doesn't work.

It was disabled in the stable-2.02 branch here:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=3669c33af4279c93c8a9104de9501ba9cf6a2745


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Corey Marthaler 2019-11-05 21:21:53 UTC
Marking verified in the latest rpms.

3.10.0-1109.el7.x86_64

lvm2-2.02.186-2.el7    BUILT: Tue Sep 24 06:20:17 CDT 2019
lvm2-libs-2.02.186-2.el7    BUILT: Tue Sep 24 06:20:17 CDT 2019
lvm2-cluster-2.02.186-2.el7    BUILT: Tue Sep 24 06:20:17 CDT 2019
lvm2-lockd-2.02.186-2.el7    BUILT: Tue Sep 24 06:20:17 CDT 2019
lvm2-python-boom-0.9-20.el7    BUILT: Tue Sep 24 06:18:20 CDT 2019
device-mapper-1.02.164-2.el7    BUILT: Tue Sep 24 06:20:17 CDT 2019
device-mapper-libs-1.02.164-2.el7    BUILT: Tue Sep 24 06:20:17 CDT 2019
device-mapper-event-1.02.164-2.el7    BUILT: Tue Sep 24 06:20:17 CDT 2019
device-mapper-event-libs-1.02.164-2.el7    BUILT: Tue Sep 24 06:20:17 CDT 2019
device-mapper-persistent-data-0.8.5-1.el7    BUILT: Mon Jun 10 03:58:20 CDT 2019


[root@mckinley-01 ~]# pcs status
Cluster name: MCKINLEY
Stack: corosync
Current DC: mckinley-01 (version 1.1.21-2.el7-f14e36fd43) - partition with quorum
Last updated: Tue Nov  5 15:02:46 2019
Last change: Thu Oct 31 14:59:22 2019 by root via cibadmin on mckinley-01

4 nodes configured
9 resources configured

Online: [ mckinley-01 mckinley-02 mckinley-03 mckinley-04 ]

Full list of resources:

 mckinley-apc   (stonith:fence_apc):    Started mckinley-01
 Clone Set: locking-clone [locking]
     Started: [ mckinley-01 mckinley-02 mckinley-03 mckinley-04 ]

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled



# 1. Creations with shared activation are no longer allowed
[root@mckinley-01 ~]# lvcreate --activate sy --type mirror -m 1 -n shared_mirror -L 300M --nosync mirror_sanity
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Shared activation not compatible with LV type mirror of mirror_sanity/shared_mirror
  Failed to lock logical volume mirror_sanity/shared_mirror.
  Failed to activate new LV.



# 2. The activation of exclusive mirrors on other nodes in the lvmlockd cluster continue to be disallowed
[root@mckinley-01 ~]# lvcreate --activate ey --type mirror -m 1 -n shared_mirror -L 300M --nosync mirror_sanity
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "shared_mirror" created.

[root@mckinley-02 ~]# lvchange -asy mirror_sanity/shared_mirror
  Shared activation not compatible with LV type mirror of mirror_sanity/shared_mirror
  Failed to lock logical volume mirror_sanity/shared_mirror.
[root@mckinley-02 ~]# lvchange -aey mirror_sanity/shared_mirror
  LV locked by other host: mirror_sanity/shared_mirror
  Failed to lock logical volume mirror_sanity/shared_mirror.


# 3. pvmove of a properly shared activated linear requires exclusive activation before the move can take place
[root@mckinley-01 ~]# lvcreate --activate sy --type linear -n shared_linear -L 300M mirror_sanity
  Logical volume "shared_linear" created.
[root@mckinley-02 ~]# lvchange -asy mirror_sanity/shared_linear
[root@mckinley-03 ~]# lvchange -asy mirror_sanity/shared_linear
[root@mckinley-03 ~]# lvs -a -o +devices
  LV            VG               Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices                
  shared_linear mirror_sanity    -wi-a----- 300.00m                                                     /dev/mapper/mpatha2(75)

[root@mckinley-03 ~]# pvmove --name mirror_sanity/shared_linear /dev/mapper/mpatha2 /dev/mapper/mpathe1
  LV locked by other host: mirror_sanity/shared_linear
  pvmove in a shared VG requires exclusive lock on named LV.

Comment 6 errata-xmlrpc 2020-03-31 20:04:51 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-2020:1129