1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +03:00

pvscan: do activation when lvmetad is not running

When pvscan --cache -aay fails to connect to lvmetad it will
simply exit and do nothing.  Change this so that it will
skip the lvmetad cache step and do the activation step from
disk.
This commit is contained in:
David Teigland 2016-06-15 14:19:18 -05:00
parent ae0a8740c5
commit 15da467b52

View File

@ -315,7 +315,7 @@ static int _pvscan_cache(struct cmd_context *cmd, int argc, char **argv)
dm_list_init(&found_vgnames);
dm_list_init(&pp.changed_vgnames);
if (!lvmetad_used()) {
if (!lvmetad_used() && !arg_is_set(cmd, activate_ARG)) {
log_verbose("Ignoring pvscan --cache command because lvmetad is not in use.");
return ret;
}
@ -341,6 +341,13 @@ static int _pvscan_cache(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED;
}
if (!lvmetad_used() && do_activate) {
log_verbose("Activating all VGs without lvmetad running.");
all_vgs = 1;
devno_args = 0;
goto activate;
}
/*
* Scan all devices when no args are given.
*/