Bug 746792

Summary: RFE: disable the --mirrrorlog mirrored option when clvmd is running
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: agk, dwysocha, heinzm, jbrassow, mbroz, prajnoha, prockai, thornber, zkabelac
Target Milestone: rcKeywords: FutureFeature, Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.95-1.el6 Doc Type: Enhancement
Doc Text:
LVM mirroring can has a variety of options for the bitmap intent log: 'core', 'disk', 'mirrored'. The 'mirrored' option is not available in the cluster context.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 15:00:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 756082    

Description Corey Marthaler 2011-10-17 19:31:17 UTC
Description of problem:
[root@grant-02 ~]# cman_tool services
fence domain
member count  3
victim count  0
victim now    0
master nodeid 1
wait state    none
members       1 2 3 

dlm lockspaces
name          clvmd
id            0x4104eefa
flags         0x00000000 
change        member 3 joined 1 remove 0 failed 0 seq 1,1
members       1 2 3 


[root@grant-02 ~]# lvcreate -m1 -n 2log -L 200M --mirrorlog mirrored SPLIT
  Logical volume "2log" created


[root@grant-02 ~]# lvs -a -o +devices
 LV                     Attr   LSize    Log       Copy%   Devices                                    
 2log                   mwi-a- 200.00m  2log_mlog   0.00  2log_mimage_0(0),2log_mimage_1(0)
 [2log_mimage_0]        Iwi-ao 200.00m                    /dev/sdb1(0)
 [2log_mimage_1]        Iwi-ao 200.00m                    /dev/sdb2(0)
 [2log_mlog]            mwi-ao   4.00m            100.00  2log_mlog_mimage_0(0),2log_mlog_mimage_1(0)
 [2log_mlog_mimage_0]   iwi-ao   4.00m                    /dev/sdc5(0)
 [2log_mlog_mimage_1]   iwi-ao   4.00m                    /dev/sdc6(0)


Version-Release number of selected component (if applicable):
2.6.32-207.el6.x86_64

lvm2-2.02.87-5.el6    BUILT: Wed Oct 12 10:47:46 CDT 2011
lvm2-libs-2.02.87-5.el6    BUILT: Wed Oct 12 10:47:46 CDT 2011
lvm2-cluster-2.02.87-5.el6    BUILT: Wed Oct 12 10:47:46 CDT 2011
udev-147-2.40.el6    BUILT: Fri Sep 23 07:51:13 CDT 2011
device-mapper-1.02.66-5.el6    BUILT: Wed Oct 12 10:47:46 CDT 2011
device-mapper-libs-1.02.66-5.el6    BUILT: Wed Oct 12 10:47:46 CDT 2011
device-mapper-event-1.02.66-5.el6    BUILT: Wed Oct 12 10:47:46 CDT 2011
device-mapper-event-libs-1.02.66-5.el6    BUILT: Wed Oct 12 10:47:46 CDT 2011
cmirror-2.02.87-5.el6    BUILT: Wed Oct 12 10:47:46 CDT 2011

Comment 1 Corey Marthaler 2011-10-17 19:34:41 UTC
Oct 17 14:01:32 grant-01 lvm[2579]: SPLIT-2log_mlog is now in-sync.
Oct 17 14:01:35 grant-01 lvm[2579]: No longer monitoring mirror device SPLIT-2log_mlog for events.
Oct 17 14:01:36 grant-01 cmirrord[1883]: Log entry already exists: LVM-RnGe8aOLnodSwMZrqTMKSkZ6eZoox0WFHT8uLuqHPeZsMCyKdeBnZ8Xm9mkn4t
Oct 17 14:01:36 grant-01 cmirrord[1883]: clog_resume:  Failed to create cluster CPG
Oct 17 14:01:36 grant-01 lvm[2579]: Monitoring mirror device SPLIT-2log_mlog for events.
Oct 17 14:01:36 grant-01 lvm[2579]: Monitoring mirror device SPLIT-2log for events.

Comment 2 Corey Marthaler 2011-10-17 19:52:48 UTC
Looks like this is a regression of the fix in comment #15 of bug 612221.

[root@hayes-02 ~]# lvcreate -m 1 --mirrorlog mirrored -L 100M -n mirror
centipede
  Log type, "mirrored", is unavailable to cluster mirrors

Comment 4 Jonathan Earl Brassow 2011-10-25 13:18:11 UTC
Git commit ID 0864378250956c310cb81608978d091fcdcc97d8 was meant to disallow
'mirrored' logs for cluster mirrors.  However, when add_mirror_log is used
to create the log (as is now the case when using 'lvcreate' or converting only
the log) the check is bypassed.

Results after patch:

[root@bp-01 ~]# lvcreate -m1 --mirrorlog mirrored -L 50M -n lv vg
  Rounding up size to full physical extent 52.00 MiB
  Log type, "mirrored", is unavailable to cluster mirrors
[root@bp-01 ~]# dmsetup ls; lvs -a
vg_bp01-lv_home (253, 2)
vg_bp01-lv_swap (253, 1)
vg_bp01-lv_root (253, 0)
  LV      VG      Attr     LSize  Pool Origin Snap%  Move Log Copy%  Convert
  lv_home vg_bp01 -wi-ao-- 88.64g                                           
  lv_root vg_bp01 -wi-ao-- 50.00g                                           
  lv_swap vg_bp01 -wi-ao--  9.88g                                           


Fix is checked in upstream in version 2.02.89.

Comment 5 Jonathan Earl Brassow 2011-10-25 14:14:35 UTC
Git commit ID:
0fd3c2aa2b8add8babc3c90578bb0773d3a988e3

Comment 7 Corey Marthaler 2012-03-09 17:41:52 UTC
Fix verified in the latest rpms.

2.6.32-220.4.2.el6.x86_64
lvm2-2.02.95-1.el6    BUILT: Tue Mar  6 10:00:33 CST 2012
lvm2-libs-2.02.95-1.el6    BUILT: Tue Mar  6 10:00:33 CST 2012
lvm2-cluster-2.02.95-1.el6    BUILT: Tue Mar  6 10:00:33 CST 2012
udev-147-2.40.el6    BUILT: Fri Sep 23 07:51:13 CDT 2011
device-mapper-1.02.74-1.el6    BUILT: Tue Mar  6 10:00:33 CST 2012
device-mapper-libs-1.02.74-1.el6    BUILT: Tue Mar  6 10:00:33 CST 2012
device-mapper-event-1.02.74-1.el6    BUILT: Tue Mar  6 10:00:33 CST 2012
device-mapper-event-libs-1.02.74-1.el6    BUILT: Tue Mar  6 10:00:33 CST 2012
cmirror-2.02.95-1.el6    BUILT: Tue Mar  6 10:00:33 CST 2012


[root@hayes-01 ~]# vgs
  VG            #PV #LV #SN Attr   VSize  VFree
  mirror_sanity  10   0   0 wz--nc  8.87t 8.87t

[root@hayes-01 ~]# lvcreate -m 1 -n mirrored_log --mirrorlog mirrored -L 300M  mirror_sanity
  Log type, "mirrored", is unavailable to cluster mirrors

Comment 8 Jonathan Earl Brassow 2012-04-23 18:22:22 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
LVM mirroring can has a variety of options for the bitmap intent log: 'core', 'disk', 'mirrored'.  The 'mirrored' option is not available in the cluster context.

Comment 10 errata-xmlrpc 2012-06-20 15:00:15 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.

http://rhn.redhat.com/errata/RHBA-2012-0962.html