Your message dated Thu, 23 Aug 2018 19:19:39 +0000
with message-id <[email protected]>
and subject line Bug#902681: fixed in gparted 0.32.0-1
has caused the Debian Bug report #902681,
regarding gparted: GParted fails to shrink an LVM PV with lvm2 >= 2.02.171
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
902681: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902681
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gparted
Version: 0.30.0-3
Severity: normal
Tags: patch upstream

Dear Maintainer,


== GParted fails to shrink an LVM2 PV reporting this

# lvm pvresize -v --setphysicalvolumesize 786432K '/dev/sda9'
0 physical volume(s) resized / 1 physical volume(s) not resized

Wiping internal VG cache
Wiping cache of LVM-capable devices
/dev/sda9: Requested size 712.00 MiB is less than real size 1.00 GiB.  Proceed?
[y/n]:[n]
Physical Volume /dev/sda9 not resized.


== Confirmed on Debian 10 Buster with these packages

$ dpkg -l lvm2 gparted
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  gparted        0.30.0-3     amd64        GNOME partition editor
ii  lvm2           2.02.176-4.1 amd64        Linux Logical Volume Manager


== Relevant bug references

Issue #1 - Can't shrink LVM partition due to pvresize prompt
https://gitlab.gnome.org/GNOME/gparted/issues/1

Bug 1460577 - regression: lvm2 pvresize command suddenly became interactive,
breaking automated usage
https://bugzilla.redhat.com/show_bug.cgi?id=1460577


== Attached patch

Attached is the upstream patch to workaround the change in pvresize.
Patch applies to gparted >= 0.14.0.



-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.16.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gparted depends on:
ii  libatkmm-1.6-1v5      2.24.2-3
ii  libc6                 2.27-3
ii  libgcc1               1:8.1.0-8
ii  libglib2.0-0          2.56.1-2
ii  libglibmm-2.4-1v5     2.56.0-2
ii  libgtk2.0-0           2.24.32-1
ii  libgtkmm-2.4-1v5      1:2.24.5-2
ii  libpangomm-1.4-1v5    2.40.1-4
ii  libparted-fs-resize0  3.2-21+b1
ii  libparted2            3.2-21+b1
ii  libsigc++-2.0-0v5     2.10.0-2
ii  libstdc++6            8.1.0-8
ii  libuuid1              2.32-0.1

gparted recommends no packages.

Versions of packages gparted suggests:
pn  dmraid         <none>
ii  dmsetup        2:1.02.145-4.1
ii  dosfstools     4.1-2
pn  gpart          <none>
ii  jfsutils       1.1.15-3
pn  kpartx         <none>
ii  mtools         4.0.18-2+b1
ii  ntfs-3g        1:2017.3.23-2
ii  reiser4progs   1.2.0-2
ii  reiserfsprogs  1:3.6.27-2
ii  xfsprogs       4.15.1-1
ii  yelp           3.28.1-1

-- no debconf information
>From 2f090b4a2b649c30c649d36b9919e1d4a4f65c07 Mon Sep 17 00:00:00 2001
From: Mike Fleetwood <[email protected]>
Date: Mon, 11 Jun 2018 12:57:52 +0100
Subject: [PATCH] Fix LVM2 PV shrinking with lvm2 2.02.171 and later (#1)

Shrinking an LVM2 Physical Volume on CentOS 7 with the latest
lvm2 2.02.177 fails like this:

  Shrink /dev/sda9 from 1.00 GiB to 768.00 MiB
  * calibrate /dev/sda9
  * check file system on /dev/sda9 for errors and (if possib...(SUCCESS)
  * shrink file system                                         (ERROR)
    * lvm pvresize -v --setphysicalvolumesize 786432K '/dev/...(ERROR)
        0 physical volume(s) resized / 1 physical volume(s) not resized

        Wiping internal VG cache
        Wiping cache of LVM-capable devices
        /dev/sda9: Requested size 712.00 MiB is less than real size 1.00 GiB.  
Proceed? [y/n]:[n]
        Physical Volume /dev/sda9 not resized.

This upstream change to lvm2 [1] makes pvresize prompt for confirmation
whenever the --setphysicalvolumesize option is used.  (The change was
included in lvm2 2.02.171 and later, which is used in recent
distributions.  The reporter found the issue on Ubuntu 18.04 LTS and I
reproduced the issue on RHEL/CentOS 7.5).  The set size option has to be
used when shrinking the PV before shrinking the partition therefore fix
this issue by adding lvm common option --yes when using the set size
option.

[1] 
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cbc69f8c693edf0d1307c9447e2e66d07a04bfe9
    pvresize: Prompt when non-default size supplied.

Closes #1 - Can't shrink LVM partition due to pvresize prompt
---
 src/lvm2_pv.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lvm2_pv.cc b/src/lvm2_pv.cc
index 15af3eb..5f7c7bb 100644
--- a/src/lvm2_pv.cc
+++ b/src/lvm2_pv.cc
@@ -102,7 +102,7 @@ bool lvm2_pv::resize( const Partition & partition_new, 
OperationDetail & operati
 {
        Glib::ustring size = "" ;
        if ( ! fill_partition )
-               size = " --setphysicalvolumesize " +
+               size = " --yes --setphysicalvolumesize " +
                        Utils::num_to_str( floor( Utils::sector_to_unit(
                                partition_new .get_sector_length(), 
partition_new .sector_size, UNIT_KIB ) ) ) + "K " ;
        return ! execute_command( "lvm pvresize -v " + size + 
Glib::shell_quote( partition_new.get_path() ),
-- 
1.7.1


--- End Message ---
--- Begin Message ---
Source: gparted
Source-Version: 0.32.0-1

We believe that the bug you reported is fixed in the latest version of
gparted, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Phillip Susi <[email protected]> (supplier of updated gparted package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 22 Aug 2018 14:25:34 -0400
Source: gparted
Binary: gparted
Architecture: source
Version: 0.32.0-1
Distribution: unstable
Urgency: medium
Maintainer: Phillip Susi <[email protected]>
Changed-By: Phillip Susi <[email protected]>
Description:
 gparted    - GNOME partition editor
Closes: 649213 653454 878629 883901 885651 887225 902681
Changes:
 gparted (0.32.0-1) unstable; urgency=medium
 .
   * New upstream release (Closes: #902681, #649213, #653454) (LP: #1779292)
   * Change build dep from libparted0-dev to libparted-dev (Closes: #878629)
   * Drop build dep on rarian-compat (Closes: #885651)
   * Drop --enable-online-resize as it is enabled by default
   * Merge misc minor packaging changes from Jeremy Bicha (Closes: #883901)
   * Recommend e2fsprogs (Closes: #887225)
Checksums-Sha1:
 dddddcfde8743c1041ab8c4c4579eeec7de6b468 1603 gparted_0.32.0-1.dsc
 c7de639ea840fcf70fcd82b98c2bc9b0dae6c4c8 3880559 gparted_0.32.0.orig.tar.gz
 74af8536087b1024acb8c8c42a33d7bfd135cb0e 12500 gparted_0.32.0-1.debian.tar.xz
 e28c79098c3ae074b045f2d30aa1b40150acea32 12024 
gparted_0.32.0-1_source.buildinfo
Checksums-Sha256:
 d5e7af192bc0fc33b94b6d0a0e43c6018098a952b9f7fbcdc7747befffc8b021 1603 
gparted_0.32.0-1.dsc
 ae1db86def71015f2d755310a32ab334354076d23bf400e35a720226112357ba 3880559 
gparted_0.32.0.orig.tar.gz
 ba350991670e55b4020d755ae828debd33b553ca0c3510c0f7d8be4de98651b9 12500 
gparted_0.32.0-1.debian.tar.xz
 a255d3fc6a05422bb31bfed464f645075e3edf5f9ef04a912320a1a6316f38ef 12024 
gparted_0.32.0-1_source.buildinfo
Files:
 d443518d8c034d92c4beba9cdba5d92b 1603 gnome optional gparted_0.32.0-1.dsc
 df4fe0350ba55cee6fddae289bd9d3f1 3880559 gnome optional 
gparted_0.32.0.orig.tar.gz
 479aeae85a41bd13bafd91c010b717c7 12500 gnome optional 
gparted_0.32.0-1.debian.tar.xz
 1348c2bd4a4374e953cc4d62f7081506 12024 gnome optional 
gparted_0.32.0-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQFFBAEBCgAvFiEEMBM6vZ+Kd0UKFImD2y7DuWEA/oQFAlt++yQRHHBzdXNpQHVi
dW50dS5jb20ACgkQ2y7DuWEA/oTOwgf+MTrV/oCCmG63tf0FYgBjb6m3EwuGOiiN
/Dz6B3LYvmNPimM6exu8n6j1pNxCtLzwDMl6TsJM2Z/tTm5TRX70/GvlwomvoATV
/yrtqXi4OoheUa17p/kdc6tZjiSBjkXq1okk2TpwUqg+cj8VxzpxEB4W7HmiWvdg
OATwbuCFor4Qkkg3Wyiuh421cwCJRvuJ5H0jUo4UIidM5gDGC1XCfq3OlYBrMbU1
SfMT/WWap68bT/eC/XUHPQ4Wtwx6OQSkTiM4/cCTxwedR1r6VNO/5uEJSFRr1tzr
dRzwviEkGwA9CgNkTeIIV/vK2M8XhgreFTYiXNZUShIWbVOXesUatA==
=/dt6
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to