Blame SOURCES/0041-daemon-lvm-Pass-yes-option-to-force-pvresize-RHBZ-14.patch

90a56e
From 8b72cf35f3c758aca31269f454339fdffeccbcf0 Mon Sep 17 00:00:00 2001
90a56e
From: "Richard W.M. Jones" <rjones@redhat.com>
90a56e
Date: Mon, 12 Jun 2017 13:15:34 +0100
90a56e
Subject: [PATCH] daemon: lvm: Pass --yes option to force pvresize
90a56e
 (RHBZ#1460577).
90a56e
MIME-Version: 1.0
90a56e
Content-Type: text/plain; charset=UTF-8
90a56e
Content-Transfer-Encoding: 8bit
90a56e
90a56e
LVM2 >= 2.02.171 requires the ‘--yes’ option to force pvresize to work
90a56e
in various circumstances, eg. reducing the size of an existing PV.
90a56e
90a56e
Pass this flag unconditionally.
90a56e
90a56e
Note this does NOT break earlier versions which just ignore this flag.
90a56e
90a56e
(cherry picked from commit 8a98fe91b889f666c8160f4c23af220247b4b8f3)
90a56e
---
90a56e
 daemon/lvm.c | 1 +
90a56e
 1 file changed, 1 insertion(+)
90a56e
90a56e
diff --git a/daemon/lvm.c b/daemon/lvm.c
90a56e
index a270b13..085e852 100644
90a56e
--- a/daemon/lvm.c
90a56e
+++ b/daemon/lvm.c
90a56e
@@ -625,6 +625,7 @@ do_pvresize_size (const char *device, int64_t size)
90a56e
 
90a56e
   r = command (NULL, &err,
90a56e
                str_lvm, "pvresize",
90a56e
+               "--yes",
90a56e
                "--setphysicalvolumesize", buf,
90a56e
                device, NULL);
90a56e
   if (r == -1) {
90a56e
-- 
90a56e
2.9.4
90a56e