Bug 1224638
| Summary: | lvcreate, lvresize and other commands needlessly fail with an error message | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Vratislav Podzimek <vpodzime> | 
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> | 
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | 
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 22 | CC: | agk, anaconda-maint-list, bmarzins, bmr, dwysocha, extras-qa, g.kaviyarasu, heinzm, jonathan, kevin, kparal, lvm-team, msnitzer, prajnoha, prockai, robatino, sbueno, sgallagh, vanmeeuwen+fedora, vgoyal, vpodzime, zkabelac | 
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1221247 | Environment: | |
| Last Closed: | 2015-09-23 11:48:56 UTC | Type: | --- | 
| Regression: | --- | Mount Type: | --- | 
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1221247 | ||
| Bug Blocks: | |||
| 
 
        
          Description
        
        
          Vratislav Podzimek
        
        
        
        
        
          2015-05-25 08:38:09 UTC
        
       
      
      
      
    (In reply to Vratislav Podzimek from comment #0) > Just like it does if for example 5.6G is > passed instead of 6012954214B (== 5.6 * 1024**3). > LVMError: Process reported exit code 768: Size is not a multiple of 512. > Try using 8063800832 or 8063801344. > Invalid argument for --size: 8063801098b > Error during parsing of command line. There's a difference in whether you use decimal point or not when specifying sizes. With the decimal point, the number is always a subject to rounding. On the other hand, if you specify an integer number as size with possible suffix, we consider this as a firm number which is not rounded (rounded here I mean rounded to the 512B multiple). If you define concrete and exact number of bytes, I think LVM behaves fine here as it gives you a pointer that you have specified it incorrectly if not a multiple of 512B. Of course, if you use any of the suffixes (kKmMgGtTpPeE), it's always a multiple of 512B (for lvcreate and similar, the upper-case and lower-case suffix is evaluated the same way and it's always power of 2). Given this, I'm closing this report. (In reply to Peter Rajnoha from comment #1) > (In reply to Vratislav Podzimek from comment #0) > > Just like it does if for example 5.6G is > > passed instead of 6012954214B (== 5.6 * 1024**3). > > > LVMError: Process reported exit code 768: Size is not a multiple of 512. > > Try using 8063800832 or 8063801344. > > Invalid argument for --size: 8063801098b > > Error during parsing of command line. > > There's a difference in whether you use decimal point or not when specifying > sizes. With the decimal point, the number is always a subject to rounding. > On the other hand, if you specify an integer number as size with possible > suffix, we consider this as a firm number which is not rounded (rounded here > I mean rounded to the 512B multiple). > > If you define concrete and exact number of bytes, I think LVM behaves fine > here as it gives you a pointer that you have specified it incorrectly if not > a multiple of 512B. Of course, if you use any of the suffixes > (kKmMgGtTpPeE), it's always a multiple of 512B (for lvcreate and similar, > the upper-case and lower-case suffix is evaluated the same way and it's > always power of 2). I think these things at least need to be documented somewhere, ideally in the man page as they way they work is not really intuitive. (In reply to Vratislav Podzimek from comment #2) > (In reply to Peter Rajnoha from comment #1) > > (In reply to Vratislav Podzimek from comment #0) > > > Just like it does if for example 5.6G is > > > passed instead of 6012954214B (== 5.6 * 1024**3). > > > > > LVMError: Process reported exit code 768: Size is not a multiple of 512. > > > Try using 8063800832 or 8063801344. > > > Invalid argument for --size: 8063801098b > > > Error during parsing of command line. > > > > There's a difference in whether you use decimal point or not when specifying > > sizes. With the decimal point, the number is always a subject to rounding. > > On the other hand, if you specify an integer number as size with possible > > suffix, we consider this as a firm number which is not rounded (rounded here > > I mean rounded to the 512B multiple). > > > > If you define concrete and exact number of bytes, I think LVM behaves fine > > here as it gives you a pointer that you have specified it incorrectly if not > > a multiple of 512B. Of course, if you use any of the suffixes > > (kKmMgGtTpPeE), it's always a multiple of 512B (for lvcreate and similar, > > the upper-case and lower-case suffix is evaluated the same way and it's > > always power of 2). > I think these things at least need to be documented somewhere, ideally in > the man page as they way they work is not really intuitive. I agree that man page should be improved to bring clarity to size syntax. I had posted a patch in an attempt to make situation little bit better. https://www.redhat.com/archives/lvm-devel/2015-August/msg00017.html OK, let's use bug #1224638 to track fixes to documentation about sizes in LVM. We also have another bug to create lvcreate man page documentation. https://bugzilla.redhat.com/show_bug.cgi?id=1250562  |