Bug 1532653
| Summary: | vdo growLogical by less than 4K gives wrong error | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jakub Krysl <jkrysl> |
| Component: | vdo | Assignee: | Joe Shimkus <jshimkus> |
| Status: | CLOSED ERRATA | QA Contact: | Jakub Krysl <jkrysl> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.5 | CC: | awalsh, bgurney, jkrysl, jshimkus, limershe, salmy |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 6.1.0.128 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-10 15:49:25 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: | |||
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.
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?
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. 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.
Message changed to: "Can't grow a VDO volume by less than <x> bytes". The error is now: vdo: ERROR - Can't grow a VDO volume by less than 4096 bytes 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 |
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: