[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]