1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

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:
117160b27e

When user sets lvm.conf global/event_activation=0
pvscan service will no longer auto activate any LVs on appeared PVs.
This commit is contained in:
Zdenek Kabelac 2021-02-08 16:28:18 +01:00
parent 018bba897c
commit 2be585b79c

View File

@ -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;