summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-06-20 15:59:36 -0500
committerDavid Teigland <teigland@redhat.com>2019-07-31 13:18:58 -0500
commit5ddd1ead2dcaf9594a025a15986b8bac573c81b2 (patch)
tree1aa5c28b306a798f2c592e41c7dc9b65a2049f9e
parentb387d026bd065b99f894a5c7b67d1f0441b583f3 (diff)
downloadlvm2-5ddd1ead2dcaf9594a025a15986b8bac573c81b2.tar.gz
vgchange: don't fail monitor command if vg is exported
When monitoring, skip exported VGs without causing a command failure. The lvm2-monitor service runs 'vgchange --monitor y', so any exported VG on the system would cause the service to fail.
-rw-r--r--tools/vgchange.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c
index 24c22538d..e15fca7cb 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -712,6 +712,8 @@ static int _vgchange_single(struct cmd_context *cmd, const char *vg_name,
};
if (vg_is_exported(vg)) {
+ if (cmd->command->command_enum == vgchange_monitor_CMD)
+ return ECMD_PROCESSED;
log_error("Volume group \"%s\" is exported", vg_name);
return ECMD_FAILED;
}