Bug 204128 - lvconvert from linear to mirror fails if original LV spans to PVs
Summary: lvconvert from linear to mirror fails if original LV spans to PVs
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2
Version: 4.4
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-25 18:39 UTC by Jun'ichi Nomura (Red Hat)
Modified: 2007-11-17 01:14 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-05-08 00:06:04 UTC


Attachments (Terms of Use)
Reproducer test script (1.76 KB, application/x-shellscript)
2006-08-25 18:39 UTC, Jun'ichi Nomura (Red Hat)
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0287 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2007-04-28 19:01:34 UTC

Description Jun'ichi Nomura (Red Hat) 2006-08-25 18:39:29 UTC
Created attachment 134950 [details]
Reproducer test script

Comment 1 Jun'ichi Nomura (Red Hat) 2006-08-25 18:39:29 UTC
Description of problem:
lvconvert fails to convert linear LV to mirrored LV
if the linear LV contains more than 1 PV

Version-Release number of selected component:
lvm2-2.02.06-6.0.RHEL4

How reproducible:
Always

Steps to Reproduce:
 1. Create a VG with 5 or more PVs
      # vgcreate testvg /dev/sdb[1-5]
 2. Create a linear LV which spans multiple PVs
      # lvcreate -L<appropriate size> -nlv0 testvg
    For example, if we have 5 100MB PVs, we should create 120MB LV here.
 3. Check if the LV contains multiple PVs
      # lvs -o+devices
 4. Convert it to mirror
      # lvconvert -m1 testvg/lv0

Actual results:
lvconvert fails with a message like this:
  Insufficient suitable allocatable extents for logical volume : 4294967290 more
required

Expected results:
lvconvert succeeds

Additional info:

Attached script does the above steps and show what happens.

# sh lvconvert-multiseg.sh
INFO: Creating a file for loop setup. file=tmpfile
204800+0 records in
204800+0 records out
INFO: Setting up loop device. dev=/dev/loop0 file=tmpfile
INFO: Creating PV. nr_pv=5
  Physical volume "/dev/mapper/pv0" successfully created
  Physical volume "/dev/mapper/pv1" successfully created
  Physical volume "/dev/mapper/pv2" successfully created
  Physical volume "/dev/mapper/pv3" successfully created
  Physical volume "/dev/mapper/pv4" successfully created
INFO: Creating VG. nr_vg=1. each pv in a vg: 5
INFO: vgname=testvg0
  Volume group "testvg0" successfully created
INFO: PE count of PV is     4 .
  Failed to read physical volume "testvg0"
INFO: Create linear LV spanning multiple PVs.
  Logical volume "lv0" created
  LV   Devices
  lv0  /dev/dm-0(0)
  lv0  /dev/dm-1(0)
INFO: Convert the LV to mirrored.
  Insufficient suitable allocatable extents for logical volume : 4294967290 more
required
  LV   Devices
  lv0  /dev/dm-0(0)
  lv0  /dev/dm-1(0)
INFO: Failed
INFO: Cleaning up.

Comment 2 Jun'ichi NOMURA 2006-09-12 21:02:36 UTC
Patch is posted to linux-lvm:
https://www.redhat.com/archives/linux-lvm/2006-August/msg00117.html

Comment 3 Corey Marthaler 2006-10-11 15:46:39 UTC
Moving to modified state since a patch was submitted, and bumping the priority
since this bug is blocking QA tests. We'll need an lvm build with this fix in it
to continue testing lvconverts.

Comment 4 Corey Marthaler 2006-10-11 18:05:24 UTC
Since the patch has only been posted, this really shouldn't be in the MODIFIED
state yet.

Comment 6 Corey Marthaler 2006-10-31 22:25:57 UTC
fix verified in lvm2-2.02.13-1.

Comment 10 Red Hat Bugzilla 2007-05-08 00:06:04 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 the 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/RHBA-2007-0287.html


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