Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1508452

Summary: VDO does not allow --vdoLogicalSize > 4096T, but there is no limit in man/help
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Krysl <jkrysl>
Component: vdoAssignee: Ken Raeburn <raeburn>
Status: CLOSED ERRATA QA Contact: Jakub Krysl <jkrysl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: awalsh, bjohnsto, limershe, raeburn
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 6.1.0.88 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 15:46:34 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 Jakub Krysl 2017-11-01 13:08:55 UTC
Description of problem:
When using option --vdoLogicalSize greater than 4096T, there is no checking and this leads to error. This error differs based on vdo command used:

# vdo create --device=/dev/sdc --vdoLogicalSize=4097T --name=vdo_test --verbose
Creating VDO vdo_test
    modprobe kvdo
    vdoformat --uds-checkpoint-frequency=0 --uds-memory-size=1 --logical-size=4097T /dev/sdc
vdo: ERROR - vdoformat: 4504699138998272 requested logical space exceeds the maximum (4503599627370496): Unknown error 2049

Nothing in console.


# vdo growLogical --vdoLogicalSize=4097T --name=vdo_test --verbose
    dmsetup status vdo_test
    dmsetup message vdo_test 0 prepareToGrowLogical 1099780063232
vdo: ERROR - Cannot prepare to grow logical on VDO vdo_test; device-mapper: message ioctl on vdo_test  failed: Invalid argument
vdo: ERROR - device-mapper: message ioctl on vdo_test  failed: Invalid argument

Console:
[184010.538598] kvdo54:dmsetup: Logical block count "1099780063232" exceeds the maximum (1099511627776)

Version-Release number of selected component (if applicable):
6.1.0.0.6

How reproducible:
100%

Steps to Reproduce:
1. vdo create --device=/dev/sdc --vdoLogicalSize=4097T --name=vdo_test --verbose

1. vdo create --device=/dev/sdc --name=vdo_test
2. vdo growLogical --vdoLogicalSize=4097T --name=vdo_test --verbose

Actual results:
Errors in terminal/console

Expected results:
Warning size > 4096T is not allowed
Documentation saying this is not allowed

Additional info:

Comment 3 Jakub Krysl 2017-11-21 12:42:53 UTC
vdo-6.1.0.55-10 mentions in both --help and manpage, that maximum logical size is 4P. But there is no change to actual behaviour when using this option.

Can you please add check for the argument parser to not allow size greater than 4P?

Comment 4 Ken Raeburn 2017-11-21 20:03:24 UTC
Sure, I was focused on the documentation due to the subject, and "vdo create" reports the issue (via vdoformat, though I overlooked that the "unknown error" bit should be cleaned up). But having the vdo script check it would be more consistent, and is easy enough to add.

Comment 5 Jakub Krysl 2017-11-22 08:45:07 UTC
Ok, giving back.

Comment 7 Jakub Krysl 2017-12-04 16:01:32 UTC
vdo-6.1.0.72-12:

# man vdo
       --vdoLogicalSize=megabytes
              Specifies the logical VDO volume size in megabytes. Using a value with a S (sectors),  B
              (bytes),  K (kilobytes), M (megabytes), G (gigabytes), T (terabytes), P (petabytes) or E
              (exabytes) suffix is optional. If no suffix is supplied, the value will  be  interpreted
              as megabytes. Used for over-provisioning volumes. This defaults to the size of the stor‐
              age device. The maximum size supported is 4096T (4P).


# vdo create --device=/dev/mapper/mpatha --vdoLogicalSize=4097T --name=vdo_test --ve
rbose
Usage: vdo --name=<volume>|--all [<option>...] activate|deactivate|create|remove|
                                  start|stop|status|list|modify|
                                  changeWritePolicy|enableDeduplication|
                                  disableDeduplication|enableCompression|
                                  disableCompression|growLogical|growPhysical|
                                  printConfigFile

vdo: error: option --vdoLogicalSize: must be less than 4P


Now there is check and mention in manpage, but the limit value is an issue now. According to the manpage it should be allowed but according to the return value it is not allowed.
# vdo create --device=/dev/mapper/mpatha --vdoLogicalSize=4096T --name=vdo_test --ve
rbose
Usage: vdo --name=<volume>|--all [<option>...] activate|deactivate|create|remove|
                                  start|stop|status|list|modify|
                                  changeWritePolicy|enableDeduplication|
                                  disableDeduplication|enableCompression|
                                  disableCompression|growLogical|growPhysical|
                                  printConfigFile

vdo: error: option --vdoLogicalSize: must be less than 4P

Giving back because of this conflict.

Comment 10 Jakub Krysl 2017-12-14 11:04:27 UTC
I am able to create vdo with size 4P now.

Comment 13 errata-xmlrpc 2018-04-10 15:46:34 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, 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/RHEA-2018:0871