From 31943693c7947a9a8971b48176ac7fc222d4dacc Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Thu, 3 Jun 2010 12:45:05 +0000 Subject: Require partial option in lvchange --refresh for partials LVs. We must not refresh LV if some PVs are missing and partial activation was not requested. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=598886 --- tools/toollib.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/toollib.c') diff --git a/tools/toollib.c b/tools/toollib.c index 4022a328..e6791e23 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -1248,6 +1248,12 @@ int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv) { int r = 0; + if (!cmd->partial_activation && (lv->status & PARTIAL_LV)) { + log_error("Refusing refresh of partial LV %s. Use --partial to override.", + lv->name); + goto out; + } + r = suspend_lv(cmd, lv); if (!r) goto_out; -- cgit