[linux-lvm] [PATCH] [vgreduce] add suggestion message for mirror LVs

Heming Zhao heming.zhao at suse.com
Wed Jan 15 02:44:30 UTC 2020


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 <heming.zhao at suse.com>
---
 tools/vgreduce.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/vgreduce.c b/tools/vgreduce.c
index b001ccbbd7..4a4202e868 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.");
 	}
 
-- 
2.24.0





More information about the linux-lvm mailing list