Can't shrink LVM partition due to pvresize prompt
Tried to resize (shrink) a LVM partition using GParted from a Ubuntu 18.04 bootable USB and found a problem.
pvresize command, used by GParted, now asks (https://bugzilla.redhat.com/show_bug.cgi?id=1460577) for confirmation when the target size of the Physical Volume is smaller than the device it's attached (which is always true for shrinking operations).
As GParted isn't using --yes option with pvresize, the resize operation fails. I had to manually run pvresize + fdisk to finish my installation.
Steps to simulate the problem:
- Install a Linux distribution with LVM
- Boot from a Ubuntu 18.04 Live CD
- Try to resize the partition after deactivating it