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.
This commit is contained in:
Richard W.M. Jones
2017-06-12 13:15:34 +01:00
parent 1f1cd11cf0
commit 8a98fe91b8

View File

@@ -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) {