Bug 2121491

Summary: not possible to create a PV that is smaller than 1GB
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: dfroehli
Component: topolvmAssignee: N Balachandran <nibalach>
Status: CLOSED DEFERRED QA Contact: Aviad Polak <apolak>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10CC: apolak, assingh, cscribne, dhellmann, dmoessne, etamir, hnallurv, jcope, jolmomar, lgangava, muagarwa, nibalach, nigoyal, ocs-bugs, odf-bz-bot, rsinghal, sapillai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-24 20:49:46 UTC 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 dfroehli 2022-08-25 15:46:52 UTC
Description of problem (please be detailed as possible and provide log
snippests):
Creating a PVC with e.g. 200MB size, results in a PV of 1GB created.
On a small edge device with limited storage (e.g. only 32GB sd card), this creates an issue leading to PVs not being created (despite enough space available technically). Thin provisioning does not really help, because just "by the book", the disk would be full.


Version of all relevant components (if applicable):
ODF-LVM V4.10.4

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
Yes, see above

Is there any workaround available to the best of your knowledge?
No.


Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
easy, just create a PVC with 200MB and see the PV size.

Can this issue reproduce from the UI?
yes

If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1. create a pvc with 200MB size (and bind it to a pod)
2. check size of PV - see 1GB
3.


Actual results:
1GB pv size

Expected results:
200MB pv size

Additional info:
LVM does support LV with MB sizes.
The issue seems to be the lvmd rest API, which requires Size in GB as INT, causing the size. See here where the rounding up happens:
https://github.com/topolvm/topolvm/blob/5df9e7cede433d41c9c77827b0f26dacfa8a2a59/controllers/logicalvolume_controller.go#L219

Comment 2 Jon Cope 2022-08-25 16:59:07 UTC
 CC Jon Cope jcope

Comment 4 N Balachandran 2022-11-02 05:20:47 UTC
This will require major changes in topolvm. Moving this to release 4.13.

Comment 12 Chad Scribner 2023-01-24 20:49:46 UTC
Closed in favor of https://issues.redhat.com/browse/OCPBUGS-6251