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 998347 - "lvcreate -l 100%FREE -T vg/thin-pool" returns error
Summary: "lvcreate -l 100%FREE -T vg/thin-pool" returns error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Marian Csontos
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 812726
Blocks: 1003496 1119323
TreeView+ depends on / blocked
 
Reported: 2013-08-19 05:39 UTC by Xiaowei Li
Modified: 2023-03-08 07:26 UTC (History)
19 users (show)

Fixed In Version: lvm2-2.02.115-3.el7.x86_64
Doc Type: Bug Fix
Doc Text:
Clone Of: 812726
: 1003496 (view as bug list)
Environment:
Last Closed: 2015-04-24 18:51:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xiaowei Li 2013-08-19 05:39:29 UTC
in RHEL 7.0 lvm2-2.02.99-1.el7.x86_64

+++ This bug was initially created as a clone of Bug #812726 +++

Description of problem:
when invoking "lvcreate -l 100%FREE -T vg/thin-pool", lvm should allocate all the free PE to the thin pool ( 1 PE for metadata, others for data block ).


Version-Release number of selected component (if applicable):


How reproducible:
always

Steps:
# vgdisplay vg3
  --- Volume group ---
  VG Name               vg3
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               1020.00 MiB
  PE Size               4.00 MiB
  Total PE              255
  Alloc PE / Size       0 / 0   
  Free  PE / Size       255 / 1020.00 MiB
  VG UUID               X8FHfz-ezqW-FIaW-A0Dx-uPnX-bUPl-k3Meez
   
#lvcreate -l 100%FREE -T vg3/pool
  Rounding up size to full physical extent 4.00 MiB
  Insufficient suitable allocatable extents for logical volume pool: 255 more required

Actual results:
"lvcreate -l 100%FREE -T vg3/pool" return error


Expected results:
should create 255 PE to the thin pool and 254 PE as the data block.


Additional info:

--- Additional comment from Xiaowei Li on 2012-04-16 02:01:07 EDT ---

The 100%FREE option works well to create a liner volume so should also work well to create the thin pool.

[root@laker ~]# lvcreate -l 100%FREE -n vg3/lv
  Logical volume "lv" created
[root@laker ~]# lvs vg3
  LV   VG   Attr     LSize    Pool Origin Data%  Move Log Copy%  Convert
  lv   vg3  -wi-a--- 1020.00m

--- Additional comment from Xiaowei Li on 2012-04-16 02:03:42 EDT ---

please ignore '( 1 PE for metadata, others for data block )' in 'DESCRIPTION' field.

--- Additional comment from Alasdair Kergon on 2012-04-16 11:39:09 EDT ---

Yes, we ought to fix this one.

--- Additional comment from  on 2012-09-25 18:15:37 EDT ---

Is this still an issue in F18 Alpha1?

--- Additional comment from Xiaowei Li on 2012-09-27 03:03:59 EDT ---

(In reply to comment #4)
> Is this still an issue in F18 Alpha1?

Yes, it still exists in lvm2-2.02.97-1.fc18.x86_64

Comment 1 Xiaowei Li 2013-08-19 05:40:25 UTC
track this issue in RHEL 7.0

Comment 2 Xiaowei Li 2013-08-19 06:02:46 UTC
testing result for lvm2-2.02.99-1.el7.x86_64
=== on liner pool ===

[PASS][01:23:12][dhcp12-156.nay.redhat.com]lvcreate -l 100%FREE -T tsvg/pool5
STDOUT:
  Logical volume "pool5" created
STDERR:
RETURN:0

[FAIL][01:23:13][dhcp12-156.nay.redhat.com]lvcreate -l 100%VG -T tsvg/pool1
STDOUT:
  Logical volume "lvol0" created
STDERR:  Volume group "tsvg" has insufficient free space (1274 extents): 1276 required.
RETURN:5

[FAIL][01:23:13][dhcp12-156.nay.redhat.com]lvcreate -l 100%PVS -T tsvg/pool1
STDOUT:
  Logical volume "lvol0" created
STDERR:  Volume group "tsvg" has insufficient free space (1274 extents): 1276 required.
RETURN:5

=== on stripe pool ===
[FAIL][01:24:42][dhcp12-156.nay.redhat.com]lvcreate -i2 -l 100%FREE -T tsvg/pool5
STDOUT:
  Using default stripesize 64.00 KiB
  Rounding size (801 extents) down to stripe boundary size (800 extents)
STDERR:  Insufficient suitable allocatable extents for logical volume pool5: 2 more required
RETURN:5

[FAIL][01:24:42][dhcp12-156.nay.redhat.com]lvcreate -i3 -l 100%VG -T tsvg/pool1
STDOUT:
  Using default stripesize 64.00 KiB
  Rounding size (1276 extents) down to stripe boundary size (1275 extents)
  Logical volume "lvol0" created
STDERR:  Volume group "tsvg" has insufficient free space (1274 extents): 1275 required.
RETURN:5

[FAIL][01:24:43][dhcp12-156.nay.redhat.com]lvcreate -i1 -l 100%PVS -T tsvg/pool1
STDOUT:
  Logical volume "lvol0" created
STDERR:  Volume group "tsvg" has insufficient free space (1274 extents): 1276 required.
RETURN:5

Comment 4 Xiaowei Li 2013-08-19 13:36:35 UTC
please set the dev_ack. thanks a lot.

Comment 7 Ludek Smid 2014-06-26 10:47:42 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Comment 8 Ludek Smid 2014-06-26 11:14:45 UTC
The comment above is incorrect. The correct version is bellow.
I'm sorry for any inconvenience.
---------------------------------------------------------------

This request was NOT resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you need
to escalate this bug.

Comment 11 Jonathan Earl Brassow 2015-04-09 23:22:36 UTC
Seems to be fixed already:
[root@bp-01 ~]# lvcreate -l 100%FREE -T vg/thin-pool
  Logical volume "lvol0" created
  Logical volume "thin-pool" created
[root@bp-01 ~]# devices vg
  LV                Attr       Cpy%Sync Devices
  [lvol0_pmspare]   ewi-------          /dev/sdb1(0)
  thin-pool         twi-a-tz--          thin-pool_tdata(0)
  [thin-pool_tdata] Twi-ao----          /dev/sdc1(0)
  [thin-pool_tdata] Twi-ao----          /dev/sdd1(0)
  [thin-pool_tdata] Twi-ao----          /dev/sde1(0)
  [thin-pool_tdata] Twi-ao----          /dev/sdf1(0)
  [thin-pool_tdata] Twi-ao----          /dev/sdg1(0)
  [thin-pool_tdata] Twi-ao----          /dev/sdh1(0)
  [thin-pool_tdata] Twi-ao----          /dev/sdi1(0)
  [thin-pool_tdata] Twi-ao----          /dev/sdb1(54)
  [thin-pool_tmeta] ewi-ao----          /dev/sdb1(27)
[root@bp-01 ~]# pvs
  PV         VG      Fmt  Attr PSize   PFree
  /dev/sda2  vg_bp01 lvm2 a--  465.27g    0
  /dev/sdb1  vg      lvm2 a--  836.68g    0
  /dev/sdc1  vg      lvm2 a--  836.68g    0
  /dev/sdd1  vg      lvm2 a--  836.68g    0
  /dev/sde1  vg      lvm2 a--  836.68g    0
  /dev/sdf1  vg      lvm2 a--  836.68g    0
  /dev/sdg1  vg      lvm2 a--  836.68g    0
  /dev/sdh1  vg      lvm2 a--  836.68g    0
  /dev/sdi1  vg      lvm2 a--  836.68g    0

Please confirm with rhel7.2.

Comment 12 Marian Csontos 2015-04-24 18:42:56 UTC
Works for me already on 7.1. Tried 100%{FREE,VG,PVS}. FREE with already allocated space too, PVS with and witout pvs specified on command line.

lvm2-2.02.115-3.el7.x86_64

Comment 13 Marian Csontos 2015-04-24 18:50:25 UTC
Works fine with nightly RHEL7 build. Shall it go straight to modified?


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