Bug 785938 - nosync mirror is extended even when it reports "cannot be extended while it is recovering"
Summary: nosync mirror is extended even when it reports "cannot be extended while it i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Rajnoha
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 791145
TreeView+ depends on / blocked
 
Reported: 2012-01-30 22:54 UTC by Corey Marthaler
Modified: 2012-06-20 15:00 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.95-1.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 15:00:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0962 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2012-06-19 21:12:11 UTC

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


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