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 1915497 - Allocation of thin-pool in corner-case scenario may require more space then needed
Summary: Allocation of thin-pool in corner-case scenario may require more space then n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.4
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 8.0
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
: 1899848 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-12 18:17 UTC by Zdenek Kabelac
Modified: 2021-09-07 11:52 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.03.11-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:02:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Zdenek Kabelac 2021-01-12 18:17:50 UTC
When allocation thin-pool the is supposed to take all the available space in VG,
we may actually fail on allocation and report there is not enough space - even if in reality the parameter should be 'exact' fit.
This is mainly exhibited with multiple PVs in a VG.

This was an unwanted side-effect of this commit:

https://sourceware.org/git/?p=lvm2.git;a=commit;h=77fdc17d70e62cab75efaaf0dad02493b948610d

Which has fixed crash when there was not enough space.


Version: lvm2  2.03.11

Comment 1 Tomáš Bžatek 2021-01-13 13:15:26 UTC
*** Bug 1899848 has been marked as a duplicate of this bug. ***

Comment 2 Zdenek Kabelac 2021-01-13 13:22:38 UTC
Pushed upstream fixes for HEAD & stable-2.02 branch:

https://www.redhat.com/archives/lvm-devel/2021-January/msg00009.html

https://www.redhat.com/archives/lvm-devel/2021-January/msg00007.html


Tested in lvm2 test suite through this test change:

https://www.redhat.com/archives/lvm-devel/2021-January/msg00010.html

Comment 15 Corey Marthaler 2021-02-11 21:53:20 UTC
Fix verified in the latest rpms.

kernel-4.18.0-284.el8    BUILT: Mon Feb  8 04:33:33 CST 2021
lvm2-2.03.11-4.el8    BUILT: Thu Feb 11 04:35:23 CST 2021
lvm2-libs-2.03.11-4.el8    BUILT: Thu Feb 11 04:35:23 CST 2021


[root@host-086 ~]# vgcreate VG /dev/sdb /dev/sdc /dev/sdd
  Physical volume "/dev/sdb" successfully created.
  Physical volume "/dev/sdc" successfully created.
  Physical volume "/dev/sdd" successfully created.
  Volume group "VG" successfully created

[root@host-086 ~]# vgdisplay VG
  --- Volume group ---
  VG Name               VG
  System ID             
  Format                lvm2
  Metadata Areas        3
  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                3
  Act PV                3
  VG Size               <59.98 GiB
  PE Size               4.00 MiB
  Total PE              15354
  Alloc PE / Size       0 / 0   
  Free  PE / Size       15354 / <59.98 GiB
  VG UUID               lrM9wj-Mr2C-S73q-iU86-4860-kQko-yE5OF1
   
[root@host-086 ~]# vgs
  VG            #PV #LV #SN Attr   VSize   VFree  
  VG              3   0   0 wz--n- <59.98g <59.98g

[root@host-086 ~]# lvcreate --yes  --thinpool POOL -l 14074 --profile thin-performance --zero y --poolmetadatasize 5G --poolmetadataspare n VG
  Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data.
  WARNING: recovery of pools without pool metadata spare LV is not automated.
  Logical volume "POOL" created.

[root@host-086 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool   Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices        
  POOL            VG            twi-a-tz-- <54.98g               0.00   0.32                             POOL_tdata(0)  
  [POOL_tdata]    VG            Twi-ao---- <54.98g                                                       /dev/sdb(0)    
  [POOL_tdata]    VG            Twi-ao---- <54.98g                                                       /dev/sdc(0)    
  [POOL_tdata]    VG            Twi-ao---- <54.98g                                                       /dev/sdd(1280) 
  [POOL_tmeta]    VG            ewi-ao----   5.00g                                                       /dev/sdd(0)

Comment 17 errata-xmlrpc 2021-05-18 15:02:04 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 (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1659


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