Bug 204128 - lvconvert from linear to mirror fails if original LV spans to PVs
lvconvert from linear to mirror fails if original LV spans to PVs
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.4
All Linux
medium Severity high
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-25 14:39 EDT by Jun'ichi Nomura (Red Hat)
Modified: 2007-11-16 20:14 EST (History)
5 users (show)

See Also:
Fixed In Version: RHBA-2007-0287
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-07 20:06:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Jun'ichi Nomura (Red Hat) 2006-08-25 14:39:29 EDT
Created attachment 134950 [details]
Reproducer test script
Comment 1 Jun'ichi Nomura (Red Hat) 2006-08-25 14:39:29 EDT
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 17:02:36 EDT
Patch is posted to linux-lvm:
https://www.redhat.com/archives/linux-lvm/2006-August/msg00117.html
Comment 3 Corey Marthaler 2006-10-11 11:46:39 EDT
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 14:05:24 EDT
Since the patch has only been posted, this really shouldn't be in the MODIFIED
state yet.
Comment 6 Corey Marthaler 2006-10-31 17:25:57 EST
fix verified in lvm2-2.02.13-1.
Comment 10 Red Hat Bugzilla 2007-05-07 20:06:04 EDT
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.