summaryrefslogtreecommitdiff
path: root/tools/vgchange.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-06-20 15:59:36 -0500
committerDavid Teigland <teigland@redhat.com>2019-06-20 15:59:36 -0500
commit82b137ef2f7f1b6fc1bbf83918750037835a9568 (patch)
tree63269f7ed317b5c32c9cf0b8b66d4b69489695d3 /tools/vgchange.c
parent556dcd2c6b82ead3a5aa50211f08f9d69be13fe1 (diff)
downloadlvm2-82b137ef2f7f1b6fc1bbf83918750037835a9568.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.
Diffstat (limited to 'tools/vgchange.c')
-rw-r--r--tools/vgchange.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c
index d6d4f9175..a17f4566f 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -631,6 +631,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;
}