Bug 998347 - "lvcreate -l 100%FREE -T vg/thin-pool" returns error
"lvcreate -l 100%FREE -T vg/thin-pool" returns error
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.0
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Marian Csontos
cluster-qe@redhat.com
:
Depends On: 812726
Blocks: 1003496 1119323
  Show dependency treegraph
 
Reported: 2013-08-19 01:39 EDT by Xiaowei Li
Modified: 2015-04-24 14:51 EDT (History)
19 users (show)

See Also:
Fixed In Version: lvm2-2.02.115-3.el7.x86_64
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 812726
: 1003496 (view as bug list)
Environment:
Last Closed: 2015-04-24 14:51:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xiaowei Li 2013-08-19 01:39:29 EDT
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 01:40:25 EDT
track this issue in RHEL 7.0
Comment 2 Xiaowei Li 2013-08-19 02:02:46 EDT
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 09:36:35 EDT
please set the dev_ack. thanks a lot.
Comment 7 Ludek Smid 2014-06-26 06:47:42 EDT
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 07:14:45 EDT
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 19:22:36 EDT
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 14:42:56 EDT
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 14:50:25 EDT
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.