Bug 2079048

Summary: most virtual size attempts around (and including) the mentioned limit fail with "logical size is by 1024KiB bigger then limit 4096TiB"
Product: Red Hat Enterprise Linux 8 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: VDO QA Contact: cluster-qe <cluster-qe>
Status: POST --- Docs Contact:
Severity: low    
Priority: unspecified CC: agk, awalsh, heinzm, jbrassow, mcsontos, prajnoha, zkabelac
Version: 8.6Keywords: Triaged
Target Milestone: rcFlags: cmarthal: needinfo? (zkabelac)
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2022-04-26 18:58:26 UTC
Description of problem:
[root@hayes-01 archive]# vgs
  VG         #PV #LV #SN Attr   VSize  VFree 
  vdo_sanity   6   0   0 wz--n- 10.91t 10.91t

[root@hayes-01 archive]# lvcreate --yes --type vdo -n vdo_lv  -L 10G vdo_sanity -V 4096TiB
  VDO logical size is by 1024KiB bigger then limit 4096TiB.


A. What the error provides for the correct limit should work.

B. It's the virtual size we're dealing with, not the logical size of the pool.

C. Grammatically, "size is by 1024KiB bigger then limit" should be "size is 1024KiB bigger than limit".




[root@hayes-01 archive]# lvcreate --yes --type vdo -n vdo_lv  -L 10G vdo_sanity -V 4503599627370496b
  VDO logical size is by 1024KiB bigger then limit 4096TiB.


Version-Release number of selected component (if applicable):
kernel-4.18.0-372.5.1.el8    BUILT: Mon Mar 28 10:29:22 CDT 2022
lvm2-2.03.14-3.el8    BUILT: Tue Jan  4 14:54:16 CST 2022
lvm2-libs-2.03.14-3.el8    BUILT: Tue Jan  4 14:54:16 CST 2022

Comment 1 Corey Marthaler 2022-04-27 19:08:06 UTC
Extensions need to be looked at as well.

[root@hayes-01 ~]# lvextend --yes -l1000000%FREE vdo_sanity/vdo_lv 
  Size of logical volume vdo_sanity/vdo_lv changed from 1.00 PiB (268435456 extents) to <11.53 PiB (3093770400 extents).
  VDO logical size is by 8274037048320KiB bigger then limit 4096TiB.
  Failed to suspend logical volume vdo_sanity/vdo_lv.

Comment 2 Zdenek Kabelac 2022-08-26 14:06:15 UTC
Progress for this moment in upstream:

Check for free RAM:

https://listman.redhat.com/archives/lvm-devel/2022-July/024233.html

Man page updates about memory usage:

https://listman.redhat.com/archives/lvm-devel/2022-July/024230.html

Enhanced detection of size acceptance fro vdo/pool volumes:

https://listman.redhat.com/archives/lvm-devel/2022-July/024235.html

Some more surrounding patches might be needed for some new defines and parameter range checks.

Comment 3 Corey Marthaler 2022-11-02 21:41:49 UTC
[root@hayes-02 ~]# lvextend --yes -l1000000%FREE vdo_sanity/vdo_lv 
  Unable to extend vdo_sanity/vdo_lv by 4165989536 logical extents: exceeds limit (4294967295).
[root@hayes-02 ~]# echo $?
5

Here's what's in the scratch build. Is this now what's expected? The posted "limit" (4294967295) is greater than the requested amount, yet the warning states the opposite.


lvm2-2.03.17-0.1.20221014git04097d9.el9.test    BUILT: Fri Oct 14 01:40:16 PM CDT 2022
lvm2-libs-2.03.17-0.1.20221014git04097d9.el9.test    BUILT: Fri Oct 14 01:40:16 PM CDT 2022

Comment 4 Zdenek Kabelac 2023-02-03 11:23:33 UTC
Further enhancement with:

https://listman.redhat.com/archives/lvm-devel/2023-January/024531.html
https://listman.redhat.com/archives/lvm-devel/2023-January/024532.html
https://listman.redhat.com/archives/lvm-devel/2023-January/024533.html
https://listman.redhat.com/archives/lvm-devel/2023-January/024534.html

should be giving you more user friendly messages and also correctly validate memory requirements by such configuration - i.e. for PiB size a lot of RAM is required.

The message in comment 3 though was correct - as the limit is  2^32 extents - and your requested additional extension 'size' (extend by) which has been calculated to 4165989536 would have make the total  LV volume size exceeding the maximal size of extent we can express as 32bit number - so the message was possibly harder to read and follow - with the above patch set however we should get also nicer this message with reporting volume size in human readable size format.