Richard W.M. Jones
2017-Jun-12 12:17 UTC
[Libguestfs] [PATCH] daemon: lvm: Pass --yes option to force pvresize (RHBZ#1460577).
LVM2 >= 2.02.171 requires the ‘--yes’ option to force pvresize to work in various circumstances, eg. reducing the size of an existing PV. Pass this flag unconditionally. Note this does NOT break earlier versions which just ignore this flag. --- daemon/lvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/lvm.c b/daemon/lvm.c index c186a5a5e..6c57046ff 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -625,6 +625,7 @@ do_pvresize_size (const char *device, int64_t size) r = command (NULL, &err, str_lvm, "pvresize", + "--yes", "--setphysicalvolumesize", buf, device, NULL); if (r == -1) { -- 2.12.0
Pino Toscano
2017-Jun-12 14:33 UTC
Re: [Libguestfs] [PATCH] daemon: lvm: Pass --yes option to force pvresize (RHBZ#1460577).
On Monday, 12 June 2017 14:17:57 CEST Richard W.M. Jones wrote:> LVM2 >= 2.02.171 requires the ‘--yes’ option to force pvresize to work > in various circumstances, eg. reducing the size of an existing PV. > > Pass this flag unconditionally. > > Note this does NOT break earlier versions which just ignore this flag. > ---LGTM, sigh lvm... Thanks, -- Pino Toscano