diff options
author | David Teigland <teigland@redhat.com> | 2019-06-20 15:59:36 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2019-06-20 15:59:36 -0500 |
commit | 82b137ef2f7f1b6fc1bbf83918750037835a9568 (patch) | |
tree | 63269f7ed317b5c32c9cf0b8b66d4b69489695d3 /tools/vgchange.c | |
parent | 556dcd2c6b82ead3a5aa50211f08f9d69be13fe1 (diff) | |
download | lvm2-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.c | 2 |
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; } |