[SRU] [Bionic] gparted fails to shrink LVM PV with lvm2 >= 2.02.172

Bug #1809932 reported by Thomas Ward
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gparted (Ubuntu)
Fix Released
High
Unassigned
Bionic
New
High
Unassigned

Bug Description

[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 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 Description]

This is technically a duplicate of #1779292, however that only affects Cosmic.

This issue now impacts Bionic as well, because we are on LVM2 >= 2.02.171.

There appears to be a patch on #1779292 that can be used to fix this issue, perhaps this can be applied as an SRU to Bionic for GParted? It is otherwise impossible to resize a LVM PV with GParted on 18.04.

(Importance set to High to match the other bug's importance).

All other details and test cases in the other bug are identical. It was only fixed in Cosmic, and not addressed in Bionic.

Tags: bionic
Thomas Ward (teward)
tags: added: bionic
Revision history for this message
Thomas Ward (teward) wrote :

This debdiff is attached for your consideration for sponsoring.

description: updated
summary: - [Bionic] gparted fails to shrink LVM PV with lvm2 >= 2.02.172
+ [SRU] [Bionic] gparted fails to shrink LVM PV with lvm2 >= 2.02.172
Revision history for this message
Thomas Ward (teward) wrote :

Version 2 of the debdiff to do bionic target instead of bionic-proposed. My bad!

Changed in gparted (Ubuntu Bionic):
importance: Undecided → High
Thomas Ward (teward)
Changed in gparted (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.