From a9897da30a62ab5f53c4160490f0360a7ba57b4a506f51abdc72be8c1c26a6e0 Mon Sep 17 00:00:00 2001 From: Gang He Date: Mon, 2 Mar 2020 02:23:05 +0000 Subject: [PATCH] Accepting request 779867 from home:hmzhao:branches:openSUSE:Factory - vgreduce --removemissing with cache devices will remove lvs (bsc#1157736) + bug-1157736-add-suggestion-message-for-mirror-LVs.patch OBS-URL: https://build.opensuse.org/request/show/779867 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=267 --- ...dd-suggestion-message-for-mirror-LVs.patch | 30 +++++++++++++++++++ lvm2.changes | 6 ++++ lvm2.spec | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 bug-1157736-add-suggestion-message-for-mirror-LVs.patch diff --git a/bug-1157736-add-suggestion-message-for-mirror-LVs.patch b/bug-1157736-add-suggestion-message-for-mirror-LVs.patch new file mode 100644 index 0000000..8cb44b9 --- /dev/null +++ b/bug-1157736-add-suggestion-message-for-mirror-LVs.patch @@ -0,0 +1,30 @@ +From d53bfae273677975bd805bfaa3d7e7cd995aaa52 Mon Sep 17 00:00:00 2001 +From: Heming Zhao +Date: Wed, 15 Jan 2020 02:44:30 +0000 +Subject: [PATCH] add suggestion message for mirror LVs + +Currently the error messages are not clear. This very easy to +guide user to execute "--removemissing --force", it is dangerous +and will make the LVs to be destroied. + +Signed-off-by: Zhao Heming +--- + tools/vgreduce.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/vgreduce.c b/tools/vgreduce.c +index b001ccb..4a4202e 100644 +--- a/tools/vgreduce.c ++++ b/tools/vgreduce.c +@@ -67,6 +67,8 @@ static int _consolidate_vg(struct cmd_context *cmd, struct volume_group *vg) + cmd->handles_missing_pvs = 1; + log_error("There are still partial LVs in VG %s.", vg->name); + log_error("To remove them unconditionally use: vgreduce --removemissing --force."); ++ log_error("To remove them unconditionally from mirror LVs use: vgreduce" ++ " --removemissing --mirrorsonly --force."); + log_warn("WARNING: Proceeding to remove empty missing PVs."); + } + +-- +1.8.3.1 + diff --git a/lvm2.changes b/lvm2.changes index 1fcf5ac..fc5b908 100644 --- a/lvm2.changes +++ b/lvm2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 27 09:36:00 UTC 2020 - heming.zhao@suse.com + +- vgreduce --removemissing with cache devices will remove lvs (bsc#1157736) + + bug-1157736-add-suggestion-message-for-mirror-LVs.patch + ------------------------------------------------------------------- Thu Jan 9 10:00:30 UTC 2020 - ghe@suse.com diff --git a/lvm2.spec b/lvm2.spec index a8e1bcf..c131ab9 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -92,6 +92,7 @@ Patch0034: bug-1150021_03-label-Use-bcache_abort_fd-to-ensure-blocks-are-no Patch0035: bug-1150021_04-bcache-add-unit-test.patch Patch0036: bug-1150021_05-bcache-bcache_invalidate_fd-only-remove-prefixes-on.patch Patch0037: bug-1150021_06-fix-dev_unset_last_byte-after-write-error.patch +Patch0038: bug-1157736-add-suggestion-message-for-mirror-LVs.patch # SUSE patches: 1000+ for LVM # Never upstream Patch1001: cmirrord_remove_date_time_from_compilation.patch @@ -182,6 +183,7 @@ Volume Manager. %patch0035 -p1 %patch0036 -p1 %patch0037 -p1 +%patch0038 -p1 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1