Bug 1460692

Summary: Pass --yes flag to pvresize to force it
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: urgent    
Version: 7.4CC: agk, cluster-qe, heinzm, jbrassow, lvm-team, mcsontos, msnitzer, mtessun, ovasik, prajnoha, prockai, ptoscano, rjones, thornber, xchen, yoguo, zkabelac
Target Milestone: rcKeywords: Regression
Target Release: 7.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.36.3-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1460577 Environment:
Last Closed: 2017-08-01 22:13:55 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:
Bug Depends On: 1460577    
Bug Blocks: 910269    

Description Richard W.M. Jones 2017-06-12 12:19:40 UTC
+++ This bug was initially created as a clone of Bug #1460577 +++

Description of problem:

pvresize-size failed to resize an LVM physical volume.

Version-Release number of selected component (if applicable):
libguestfs-1.36.3-4.el7.x86_64

The reproducer is:

  $ guestfish -N disk:10G pvcreate /dev/sda : pvresize-size /dev/sda 5G
  libguestfs: error: pvresize_size: /dev/sda: /dev/sda: Requested size 5.00 GiB is less than real size 10.00 GiB. Proceed?  [y/n]: [n]
    Physical Volume /dev/sda not resized.

Add -v -x to the command line to see the lvm2 commands being performed.

Actually the problem is not the kernel, but the lvm2 package.

WORKING => lvm2-2.02.166-1.el7_3.4.x86_64
 BROKEN => lvm2-2.02.171-4.el7.x86_64

Comment 6 Xianghua Chen 2017-06-14 12:13:58 UTC
Verified with packages:
libguestfs-1.36.3-5.el7

Steps:
1.
# guestfish -N disk:10G pvcreate /dev/sda : pvresize-size /dev/sda 5G


The command finished successfully.
So verified.

Comment 7 errata-xmlrpc 2017-08-01 22:13:55 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/RHBA-2017:2023