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
*** Bug 1899848 has been marked as a duplicate of this bug. ***
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
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)
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