Red Hat Bugzilla – Bug 1312091
lvresize is not exiting with error when re-sizing LV to same size
Last modified: 2016-02-29 05:58:47 EST
Description of problem:
In the latest released version of lvm for Fedora 23 and older versions of lvm you get the following behavior:
# lvresize -L+0B test/lvol0 ; echo $?
New size (1 extents) matches existing size (1 extents)
Run `lvresize --help' for more information.
In the latest development tree you get:
# tools/lvm lvresize -L+0B test/lvol0 ; echo $?
Using git bisect, I can see this change of behavior was introduced with:
ca878a3426197b629c76e98cfc049948da470cd7 is the first bad commit
Author: Zdenek Kabelac <email@example.com>
Date: Tue Jan 19 11:44:11 2016 +0100
cleanup: adjust once
Blivet and others are expecting that a re-size of a LV specifying the same size will indeed fail, please fix.
Yep - commit missed to port more piece from my snapshot resize in-devel patch.
Fixed by explicit validation of sizes args: