Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 785938

Summary: nosync mirror is extended even when it reports "cannot be extended while it is recovering"
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: agk, dwysocha, heinzm, jbrassow, mbroz, nperic, prajnoha, prockai, thornber, zkabelac
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.95-1.el6 Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 15:00:59 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: 791145    

Description Corey Marthaler 2012-01-30 22:54:59 UTC
Description of problem:
SCENARIO - [resync_mirror_extend_attempt]
1. Create a nosync mirror, reactivate it to cause a resync, then attempt to extend it
taft-01: lvcreate -m 1 -n resync_mirror_extend -L 1G --corelog --nosync mirror_sanity
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!

2. eactivate and then reactivate the mirror

3. Attempt to extend the mirror while it's resyncing
[root@taft-01 ~]# lvs -a -o +devices
  LV                              Attr     LSize  Log Copy%  Devices                                                          
  resync_mirror_extend            Mwi-a-m-  1.00g      17.58 resync_mirror_extend_mimage_0(0),resync_mirror_extend_mimage_1(0)
  [resync_mirror_extend_mimage_0] Iwi-aom-  1.00g            /dev/sdh2(0)                                                     
  [resync_mirror_extend_mimage_1] Iwi-aom-  1.00g            /dev/sdh1(0)                                                     
[root@taft-01 ~]# lvs -a -o +devices
  LV                              Attr     LSize  Log Copy%  Devices                                                          
  resync_mirror_extend            Mwi-a-m-  1.00g      23.83 resync_mirror_extend_mimage_0(0),resync_mirror_extend_mimage_1(0)
  [resync_mirror_extend_mimage_0] Iwi-aom-  1.00g            /dev/sdh2(0)                                                     
  [resync_mirror_extend_mimage_1] Iwi-aom-  1.00g            /dev/sdh1(0)                                                     

[root@taft-01 ~]# lvextend -L +500M mirror_sanity/resync_mirror_extend
  Extending 2 mirror images.
  Extending logical volume resync_mirror_extend to 1.49 GiB
  mirror_sanity/resync_mirror_extend cannot be extended while it is recovering.
  Logical volume resync_mirror_extend successfully resized
[root@taft-01 ~]# echo $?
0

[root@taft-01 ~]# lvextend -L +500M mirror_sanity/resync_mirror_extend
  Extending 2 mirror images.
  Extending logical volume resync_mirror_extend to 1.98 GiB
  mirror_sanity/resync_mirror_extend cannot be extended while it is recovering.
  Logical volume resync_mirror_extend successfully resized


# The mirrors were actually extended

[root@taft-01 ~]# lvs -a -o +devices
  LV                              Attr     LSize  Log Copy%  Devices                                                          
  resync_mirror_extend            Mwi-a-m-  1.98g       6.32 resync_mirror_extend_mimage_0(0),resync_mirror_extend_mimage_1(0)
  [resync_mirror_extend_mimage_0] Iwi-aom-  1.98g            /dev/sdh2(0)                                                     
  [resync_mirror_extend_mimage_1] Iwi-aom-  1.98g            /dev/sdh1(0)                                                     
[root@taft-01 ~]# lvs -a -o +devices
  LV                              Attr     LSize  Log Copy%  Devices                                                          
  resync_mirror_extend            Mwi-a-m-  1.98g      48.22 resync_mirror_extend_mimage_0(0),resync_mirror_extend_mimage_1(0)
  [resync_mirror_extend_mimage_0] Iwi-aom-  1.98g            /dev/sdh2(0)                                                     
  [resync_mirror_extend_mimage_1] Iwi-aom-  1.98g            /dev/sdh1(0)                                                     



Version-Release number of selected component (if applicable):
This is with the current scratch built 6.3 rpms:
2.6.32-220.el6.x86_64

lvm2-2.02.90-0.25.el6    BUILT: Sat Jan 28 18:03:08 CST 2012
lvm2-libs-2.02.90-0.25.el6    BUILT: Sat Jan 28 18:03:08 CST 2012
lvm2-cluster-2.02.90-0.25.el6    BUILT: Sat Jan 28 18:03:08 CST 2012
udev-147-2.40.el6    BUILT: Fri Sep 23 07:51:13 CDT 2011
device-mapper-1.02.69-0.25.el6    BUILT: Sat Jan 28 18:03:08 CST 2012
device-mapper-libs-1.02.69-0.25.el6    BUILT: Sat Jan 28 18:03:08 CST 2012
device-mapper-event-1.02.69-0.25.el6    BUILT: Sat Jan 28 18:03:08 CST 2012
device-mapper-event-libs-1.02.69-0.25.el6    BUILT: Sat Jan 28 18:03:08 CST 2012
cmirror-2.02.90-0.25.el6    BUILT: Sat Jan 28 18:03:08 CST 2012


How reproducible:
Everytime

Comment 1 Peter Rajnoha 2012-02-09 15:16:09 UTC
Just missing correct return value in lv_extend fn, patch in 2.02.91.

[0] nostromo/~ # lvcreate -l 25%FREE -m 1 --nosync --corelog vg
  WARNING: New mirror won't be synchronised. Don't read what you didn't write!
  Logical volume "lvol0" created

[0] nostromo/~ # lvs vg/lvol0
  LV    VG   Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  lvol0 vg   Mwi-a-m- 764.00m                             100.00        

[0] nostromo/~ # lvchange -an vg/lvol0

[0] nostromo/~ # lvchange -ay vg/lvol0

[0] nostromo/~ # lvextend -L +100M vg/lvol0
  Extending 2 mirror images.
  Extending logical volume lvol0 to 864.00 MiB
  vg/lvol0 cannot be extended while it is recovering.

[0] nostromo/~ # lvs vg/lvol0
  LV    VG   Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  lvol0 vg   Mwi-a-m- 764.00m                              41.88        

...

[0] nostromo/~ # lvs
  LV      VG     Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  lvol0   vg     Mwi-a-m- 764.00m                             100.00        

[0] nostromo/~ # lvextend -L +100M vg/lvol0
  Extending 2 mirror images.
  Extending logical volume lvol0 to 864.00 MiB
  Logical volume lvol0 successfully resized

[0] nostromo/~ # lvs vg/lvol0
  LV    VG   Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  lvol0 vg   Mwi-a-m- 864.00m                             100.00

Comment 3 Nenad Peric 2012-04-05 12:05:18 UTC
(07:12:14) [root@node02:~]$ lvs
  LV      VG       Attr     LSize Pool Origin Data%  Move Log Copy%  Convert
  lv_root VolGroup -wi-ao-- 7.54g                                           
  lv_swap VolGroup -wi-ao-- 1.97g                                           
  lvol0   vg       Mwi-a-m- 4.76g                              35.44        
(07:12:24) [root@node02:~]$ lvextend -L +150M vg/lvol0
  Rounding up size to full physical extent 152.00 MiB
  Extending 2 mirror images.
  Extending logical volume lvol0 to 4.91 GiB
  vg/lvol0 cannot be extended while it is recovering.


Verified with:

lvm2-libs-2.02.95-3.el6.x86_64
lvm2-cluster-2.02.95-3.el6.x86_64
lvm2-2.02.95-3.el6.x86_64
cmirror-2.02.95-3.el6.x86_64
device-mapper-1.02.74-3.el6.x86_64
device-mapper-libs-1.02.74-3.el6.x86_64
device-mapper-event-1.02.74-3.el6.x86_64
device-mapper-event-libs-1.02.74-3.el6.x86_64

Comment 4 Peter Rajnoha 2012-04-12 13:55:31 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:
No documentation needed.

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