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 1532653 - vdo growLogical by less than 4K gives wrong error
Summary: vdo growLogical by less than 4K gives wrong error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: vdo
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Joe Shimkus
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-09 14:13 UTC by Jakub Krysl
Modified: 2019-03-06 02:13 UTC (History)
6 users (show)

Fixed In Version: 6.1.0.128
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:49:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0871 0 None None None 2018-04-10 15:49:49 UTC

Description Jakub Krysl 2018-01-09 14:13:00 UTC
Description of problem:
Creating VDO and growing its logical size by less than 4K results in wrong error, as this is increasing in size and not shrinking.

# vdo status | grep Logical
    Logical size: 2091956K
    Logical threads: 1
# vdo growLogical --name vdo --vdoLogicalSize 2091957K --verbose
    dmsetup status vdo
vdo: ERROR - Can't shrink a VDO volume (old size 2091956K)

Increasing logical size by 4K works:
# vdo growLogical --name vdo --vdoLogicalSize 2091960K --verbose
    dmsetup status vdo
    dmsetup message vdo 0 prepareToGrowLogical 522990
    dmsetup suspend vdo
    dmsetup table vdo
    dmsetup reload vdo --table '0 4183920 dedupe /dev/mapper/test-small 4096 disabled 0 32768 16380 on sync vdo ack=1,bio=4,bioRotationInterval=64,cpu=2,hash=1,logical=1,physical=1'
    dmsetup resume vdo

Using block size 512 does not mitigate this issue, the minimum grow size is still 4K:
# vdo create --name vdo --device /dev/mapper/test-small --emulate512 enabled
Creating VDO vdo
Starting VDO vdo
Starting compression on VDO vdo
VDO instance 6 volume is ready at /dev/mapper/vdo
# vdo growLogical --name vdo --vdoLogicalSize 2091957K --verbose
    dmsetup status vdo
vdo: ERROR - Can't shrink a VDO volume (old size 2091956K)

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

How reproducible:
100%

Steps to Reproduce:
1. create vdo
2. vdo growLogical --name vdo --vdoLogicalSize (logical_size + <4K)

Actual results:
vdo: ERROR - Can't shrink a VDO volume (old size 2091956K)

Expected results:
vdo: ERROR - Cannot grow vdo logical size by less than 4K

Additional info:

Comment 2 Joe Shimkus 2018-01-16 16:36:30 UTC
Changed to produce the following:

"Can't grow a VDO volume less than a block ({0} bytes)"

where {0} is replaced with the block size in bytes.

Comment 4 Jakub Krysl 2018-01-22 13:05:42 UTC
default block size 4K:
# logical size 5846172208K = 5986480340992B
# vdo growLogical --name vdo --vdoLogicalSize 5986480340991B                                                                        
vdo: ERROR - Can't shrink a VDO volume (old size 5846172208K) 
# vdo growLogical --name vdo --vdoLogicalSize 5986480340992B
vdo: ERROR - Can't grow a VDO volume less than a block (4096 bytes)

# 5986480340992B + 4096B = 5986480345088B
# vdo growLogical --name vdo --vdoLogicalSize 5986480345087B
vdo: ERROR - Can't grow a VDO volume less than a block (4096 bytes)          
# vdo growLogical --name vdo --vdoLogicalSize 5986480345088B
#

block size 512:
# vdo create --name vdo --device /dev/sdc --emulate512=enabled --verbose
...
    dmsetup create vdo --uuid VDO-f09374e8-2da7-4483-80c5-bdfa374ee556 --table '0 11692344416 dedupe /dev/sdc 512 disabled 0 32768 16380 on auto vdo ack=1,bio=4,bioRotationInterval=64,cpu=2,hash=1,logical=1,physical=1'
...
# vdo growLogical --name vdo --vdoLogicalSize 5986480340992B
vdo: ERROR - Can't grow a VDO volume less than a block (4096 bytes)
# vdo growLogical --name vdo --vdoLogicalSize 5986480341992B
vdo: ERROR - Can't grow a VDO volume less than a block (4096 bytes)

The growing by <512, 4096)B still does not work with 512 block size and still keeps saying the block size is 4096 instead of 512. Joe, is there anything you can do about this?

Comment 5 Joe Shimkus 2018-01-22 14:07:59 UTC
512B blocks are emulated, not actual; the actual storage is still 4096B.

We could (potentially) take "block" out of the error message, but the minimum requirement would remain 4096B.

Comment 6 Jakub Krysl 2018-01-22 14:19:44 UTC
Thanks Joe, please modify the message accordingly to something like:
"Can't grow a VDO volume less than ({0} bytes)"

The block word there could be a bit confusing in mentioned case with 512 block size emulated. (e.g. "I have block size 512 but this is telling me the size is 4096, what is going on?")

Giving back for the modification.

Comment 7 Joe Shimkus 2018-01-23 15:40:51 UTC
Message changed to: "Can't grow a VDO volume by less than <x> bytes".

Comment 10 Jakub Krysl 2018-02-02 09:29:33 UTC
The error is now:
vdo: ERROR - Can't grow a VDO volume by less than 4096 bytes

Comment 13 errata-xmlrpc 2018-04-10 15:49:25 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


Note You need to log in before you can comment on or make changes to this bug.