[Bug 1779292] Re: GParted fails to shrink an LVM PV with lvm2 >= 2.02.171
Thomas Ward
teward at thomas-ward.net
Fri Dec 28 00:10:47 UTC 2018
Bionic debdiff attached
** Description changed:
+ [Impact]
+
+ GParted in Bionic uses LVM2 versions >= 2.02.172. Because of this
+ higher LVM version, it is impacted by the same issue as Bug #1779292 -
+ the confirmation prompt added to the pvresize system makes all LVM2
+ resize operations involving shrinking (and possibly expanding) LVM
+ Physical Volumes fail because of unexpected output.
+
+ As such, gparted on Bionic cannot be used to resize LVM physical
+ partitions.
+
+ This was fixed by syncing a newer version from Debian in Cosmic series,
+ however still impacts the Bionic series. If we intend to have Bionic as
+ an LTS (as we do), then we need to patch this.
+
+ The attached patch is identical to the patch on Bug #1779292, and is
+ adapted from upstream changes to
+
+ [Test Case]
+
+ (0) Prerequisites: A drive with an LVM2 partition on it for the PV, and
+ a VG with LVs within that do NOT take up the entirety of the LVM2
+ partition (so for a 100GB LVM PV, consume anything less than that so we
+ can resize the PV; you may resize LVs for this if you need to).
+
+ With existing software versions:
+
+ (1) Boot up a LiveCD/LiveUSB, open `gparted` on it.
+
+ (2) Attempt to resize with current gparted on the repos / image.
+
+ Current Result: ERROR due to unexpected message.
+
+ With patched version:
+
+ (1) Boot up LiveCD/LiveUSB
+
+ (2) Install PPA version of `gparted` (or from -proposed if this has
+ landed in proposed for verification)
+
+ (3) Attempt to shrink PV to make some free space (provided that step 0
+ is met).
+
+ Expected Result: SUCCESS
+
+ [Regression Potential]
+
+ Messing with gparted could lead to other problems, This is always a
+ risk. The potential for regression on this is low, however, provided
+ that the patch is applied carefully.
+
+ The patch literally only changes the the arguments passed to pvresize of
+ --yes to 'confirm' that we want to do the changes. This change is
+ already applied in upstream versions later than that in Bionic,
+ therefore the regression risk of this is low.
+
+ [Other Info]
+
+ This was test-built and *actively tested* in a PPA with the upstream
+ patch (or rather, the patch listed in #1779292). I (Thomas Ward, who
+ applied the SRU template here) got the upstream patch for the debdiff
+ from upstream's master repository for the patch included in the debdiff.
+ (https://gitlab.gnome.org/GNOME/gparted/commit/5892b72890748c1d3e96bd7e25800c8aab351025)
+
+ Note that the PPA was tested from a LiveUSB of 18.04.1(.0) and was used
+ on a production system to resize the PV of my 18.04 laptop so I could
+ put a new partition with Clonezilla Live-HDD version on it. It works if
+ you wish to test it, even though it uses the patch from Bug #1779292 and
+ not a patch pulled directly from upstream's master branches/repos.
+
+
+ [Original Bug Description]
+
+
== GParted fails to shrink the 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 Ubuntu 18.04 LTS 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-3ubuntu1 amd64 GNOME partition editor
ii lvm2 2.02.176-4.1ubu 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.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gparted 0.30.0-3ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
Uname: Linux 4.15.0-23-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Jun 29 10:35:14 2018
InstallationDate: Installed on 2018-03-12 (108 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180306.1)
SourcePackage: gparted
UpgradeStatus: No upgrade log present (probably fresh install)
** Patch added: "Debdiff for Bionic, which fixes gparted to work with LVM2's new confirmation dialog."
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/1779292/+attachment/5225445/+files/lvm2_fix_patch_lp1809932.debdiff
** Description changed:
[Impact]
GParted in Bionic uses LVM2 versions >= 2.02.172. Because of this
- higher LVM version, it is impacted by the same issue as Bug #1779292 -
- the confirmation prompt added to the pvresize system makes all LVM2
- resize operations involving shrinking (and possibly expanding) LVM
- Physical Volumes fail because of unexpected output.
+ higher LVM version, the confirmation prompt added to the pvresize system
+ makes all LVM2 resize operations involving shrinking (and possibly
+ expanding) LVM Physical Volumes fail because of unexpected output.
As such, gparted on Bionic cannot be used to resize LVM physical
partitions.
This was fixed by syncing a newer version from Debian in Cosmic series,
however still impacts the Bionic series. If we intend to have Bionic as
an LTS (as we do), then we need to patch this.
-
- The attached patch is identical to the patch on Bug #1779292, and is
- adapted from upstream changes to
[Test Case]
(0) Prerequisites: A drive with an LVM2 partition on it for the PV, and
a VG with LVs within that do NOT take up the entirety of the LVM2
partition (so for a 100GB LVM PV, consume anything less than that so we
can resize the PV; you may resize LVs for this if you need to).
With existing software versions:
(1) Boot up a LiveCD/LiveUSB, open `gparted` on it.
(2) Attempt to resize with current gparted on the repos / image.
Current Result: ERROR due to unexpected message.
With patched version:
(1) Boot up LiveCD/LiveUSB
(2) Install PPA version of `gparted` (or from -proposed if this has
landed in proposed for verification)
(3) Attempt to shrink PV to make some free space (provided that step 0
is met).
Expected Result: SUCCESS
[Regression Potential]
Messing with gparted could lead to other problems, This is always a
risk. The potential for regression on this is low, however, provided
that the patch is applied carefully.
The patch literally only changes the the arguments passed to pvresize of
--yes to 'confirm' that we want to do the changes. This change is
already applied in upstream versions later than that in Bionic,
therefore the regression risk of this is low.
[Other Info]
This was test-built and *actively tested* in a PPA with the upstream
- patch (or rather, the patch listed in #1779292). I (Thomas Ward, who
- applied the SRU template here) got the upstream patch for the debdiff
- from upstream's master repository for the patch included in the debdiff.
+ patch (or rather, the patch listed in this bug initially). I (Thomas
+ Ward, who applied the SRU template here) got the upstream patch for the
+ debdiff from upstream's master repository for the patch included in the
+ debdiff.
(https://gitlab.gnome.org/GNOME/gparted/commit/5892b72890748c1d3e96bd7e25800c8aab351025)
Note that the PPA was tested from a LiveUSB of 18.04.1(.0) and was used
on a production system to resize the PV of my 18.04 laptop so I could
put a new partition with Clonezilla Live-HDD version on it. It works if
- you wish to test it, even though it uses the patch from Bug #1779292 and
- not a patch pulled directly from upstream's master branches/repos.
-
+ you wish to test it, even though it uses the patch originally attached
+ and not a patch pulled directly from upstream's master branches/repos.
[Original Bug Description]
-
== GParted fails to shrink the 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 Ubuntu 18.04 LTS 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-3ubuntu1 amd64 GNOME partition editor
ii lvm2 2.02.176-4.1ubu 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.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gparted 0.30.0-3ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
Uname: Linux 4.15.0-23-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Jun 29 10:35:14 2018
InstallationDate: Installed on 2018-03-12 (108 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180306.1)
SourcePackage: gparted
UpgradeStatus: No upgrade log present (probably fresh install)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gparted in Ubuntu.
https://bugs.launchpad.net/bugs/1779292
Title:
GParted fails to shrink an LVM PV with lvm2 >= 2.02.171
Status in gparted package in Ubuntu:
Fix Released
Status in gparted source package in Bionic:
In Progress
Bug description:
[Impact]
GParted in Bionic uses LVM2 versions >= 2.02.172. Because of this
higher LVM version, the confirmation prompt added to the pvresize
system makes all LVM2 resize operations involving shrinking (and
possibly expanding) LVM Physical Volumes fail because of unexpected
output.
As such, gparted on Bionic cannot be used to resize LVM physical
partitions.
This was fixed by syncing a newer version from Debian in Cosmic
series, however still impacts the Bionic series. If we intend to have
Bionic as an LTS (as we do), then we need to patch this.
[Test Case]
(0) Prerequisites: A drive with an LVM2 partition on it for the PV,
and a VG with LVs within that do NOT take up the entirety of the LVM2
partition (so for a 100GB LVM PV, consume anything less than that so
we can resize the PV; you may resize LVs for this if you need to).
With existing software versions:
(1) Boot up a LiveCD/LiveUSB, open `gparted` on it.
(2) Attempt to resize with current gparted on the repos / image.
Current Result: ERROR due to unexpected message.
With patched version:
(1) Boot up LiveCD/LiveUSB
(2) Install PPA version of `gparted` (or from -proposed if this has
landed in proposed for verification)
(3) Attempt to shrink PV to make some free space (provided that step 0
is met).
Expected Result: SUCCESS
[Regression Potential]
Messing with gparted could lead to other problems, This is always a
risk. The potential for regression on this is low, however, provided
that the patch is applied carefully.
The patch literally only changes the the arguments passed to pvresize
of --yes to 'confirm' that we want to do the changes. This change is
already applied in upstream versions later than that in Bionic,
therefore the regression risk of this is low.
[Other Info]
This was test-built and *actively tested* in a PPA with the upstream
patch (or rather, the patch listed in this bug initially). I (Thomas
Ward, who applied the SRU template here) got the upstream patch for
the debdiff from upstream's master repository for the patch included
in the debdiff.
(https://gitlab.gnome.org/GNOME/gparted/commit/5892b72890748c1d3e96bd7e25800c8aab351025)
Note that the PPA was tested from a LiveUSB of 18.04.1(.0) and was
used on a production system to resize the PV of my 18.04 laptop so I
could put a new partition with Clonezilla Live-HDD version on it. It
works if you wish to test it, even though it uses the patch originally
attached and not a patch pulled directly from upstream's master
branches/repos.
[Original Bug Description]
== GParted fails to shrink the 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 Ubuntu 18.04 LTS 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-3ubuntu1 amd64 GNOME partition editor
ii lvm2 2.02.176-4.1ubu 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.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gparted 0.30.0-3ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
Uname: Linux 4.15.0-23-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Jun 29 10:35:14 2018
InstallationDate: Installed on 2018-03-12 (108 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180306.1)
SourcePackage: gparted
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/1779292/+subscriptions
More information about the foundations-bugs
mailing list