diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-02-08 16:28:18 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-02-08 23:18:44 +0100 |
commit | 2be585b79c71b8f70c0252af5f09dbd5e6103030 (patch) | |
tree | f757921d48b32e84d27724b1c72ab060d347dde0 /tools/pvscan.c | |
parent | 018bba897ca13521988eb36a89fd054e15feb231 (diff) | |
download | lvm2-2be585b79c71b8f70c0252af5f09dbd5e6103030.tar.gz |
pvscan: support disabled event_activation
In past we had this control with use_lvmetad check for
pvscan --cache -aay
Howerer this got lost with lvmetad removal commit:
117160b27e510dceb1ed6acf995115c040acd88d
When user sets lvm.conf global/event_activation=0
pvscan service will no longer auto activate any LVs on appeared PVs.
Diffstat (limited to 'tools/pvscan.c')
-rw-r--r-- | tools/pvscan.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c index dc24f4e34..f7aaf8ab9 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -1581,6 +1581,12 @@ int pvscan_cache_cmd(struct cmd_context *cmd, int argc, char **argv) dm_list_init(&complete_vgnames); + if (do_activate && + !find_config_tree_bool(cmd, global_event_activation_CFG, NULL)) { + log_verbose("Ignoring pvscan --cache -aay because event_activation is disabled."); + return ECMD_PROCESSED; + } + if (arg_is_set(cmd, major_ARG) + arg_is_set(cmd, minor_ARG)) devno_args = 1; |