Bug 1312091 - lvresize is not exiting with error when re-sizing LV to same size
Summary: lvresize is not exiting with error when re-sizing LV to same size
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Kabelac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-25 17:28 UTC by Tony Asleson
Modified: 2016-02-29 10:58 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.02.144-1.fc25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-29 10:58:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tony Asleson 2016-02-25 17:28:57 UTC
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.
3

In the latest development tree you get:
# tools/lvm lvresize -L+0B test/lvol0 ; echo $?
0


Using git bisect, I can see this change of behavior was introduced with:

ca878a3426197b629c76e98cfc049948da470cd7 is the first bad commit
commit ca878a3426197b629c76e98cfc049948da470cd7
Author: Zdenek Kabelac <zkabelac>
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.

Comment 1 Zdenek Kabelac 2016-02-25 22:41:12 UTC
Yep - commit missed to port more piece from my snapshot resize in-devel patch.

Fixed by explicit validation of sizes args:

https://www.redhat.com/archives/lvm-devel/2016-February/msg00163.html


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