Bug 429608

Summary: RHEL5 cmirror tracker: unnecessary leg syncing when converting to disk log
Product: Red Hat Enterprise Linux 5 Reporter: Corey Marthaler <cmarthal>
Component: cmirrorAssignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: agk, ccaulfie, coughlan, dwysocha, heinzm, jnomura, junichi.nomura, kueda, mbroz
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 21:27:06 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:

Description Corey Marthaler 2008-01-21 22:26:23 UTC
Description of problem:
In rhel4, if you have a 100% sync'ed core or disk log mirror and you convert
from one to another, the copy percent stays at 100% (since there is no reason to
resync it). In rhel5, if you go from a 100% synced disk log to a core log, it
starts over and completely resyncs the mirror. It does the right thing when
going from core to disk.

Version-Release number of selected component (if applicable):
cmirror-1.1.5-4.el5

How reproducible:
Everytime.

Comment 1 Jun'ichi Nomura (Red Hat) 2008-01-23 23:24:13 UTC
Just for record, it doesn't restart sync for non-clustered mirror:

# lvcreate -L1G -m1 -n lvol3 vg
  Logical volume "lvol3" created
...
<wait for sync completion>
...
# lvs
  LV    VG   Attr   LSize Origin Snap%  Move Log        Copy%  Convert
  lvol3 vg   mwi-a- 1.00G                    lvol3_mlog 100.00        
# lvconvert --corelog vg/lvol3; lvs -a
  Logical volume lvol3 converted.
  LV               VG   Attr   LSize Origin Snap%  Move Log Copy%  Convert
  lvol3            vg   mwi-a- 1.00G                        100.00        
  [lvol3_mimage_0] vg   iwi-ao 1.00G                                      
  [lvol3_mimage_1] vg   iwi-ao 1.00G

Comment 2 RHEL Program Management 2008-02-04 15:17:42 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Jonathan Earl Brassow 2008-06-20 21:32:57 UTC
Fix committed to CVS:
commit 0670e032ed29a421a14f0b7e176e254880de28ea
Author: Jonathan Brassow <jbrassow>
Date:   Fri Jun 20 16:30:25 2008 -0500

    clogd:  Fix bug 429608 - disk->core log forgets sync status

    If the constructor arguments were not in the order expected,
    there could be a failure to detect 'sync' specification.
    The code now goes over all the constructor args to look for
    'sync' arguments.


Comment 5 RHEL Program Management 2008-06-20 21:41:25 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 Corey Marthaler 2008-09-25 16:27:58 UTC
Fix verified with the latest builds:
2.6.18-116.el5

lvm2-2.02.40-2.el5    BUILT: Fri Sep 19 09:46:26 CDT 2008
lvm2-cluster-2.02.40-2.el5    BUILT: Fri Sep 19 09:49:59 CDT 2008
device-mapper-1.02.28-2.el5    BUILT: Fri Sep 19 02:50:32 CDT 2008
cmirror-1.1.25-1.el5    BUILT: Fri Sep 19 16:27:46 CDT 2008
kmod-cmirror-0.1.17-1.el5    BUILT: Fri Sep 19 16:27:33 CDT 2008



[root@taft-04 ~]# lvs
  LV       VG         Attr   LSize  Origin Snap%  Move Log         Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 66.19G                                              
  LogVol01 VolGroup00 -wi-ao  1.94G                                              
  mirror   taft       mwi-a-  1.00G                    mirror_mlog 100.00        
[root@taft-04 ~]# lvconvert -m1 --corelog taft/mirror
  Logical volume mirror converted.
[root@taft-04 ~]# lvs
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 66.19G                                      
  LogVol01 VolGroup00 -wi-ao  1.94G                                      
  mirror   taft       mwi-a-  1.00G                        100.00

Comment 9 errata-xmlrpc 2009-01-20 21:27:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0158.html