summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-02-26 16:39:43 -0600
committerDavid Teigland <teigland@redhat.com>2019-04-05 12:46:39 -0500
commit6b89c0d4b78d11b50328a6df73234524699eabb1 (patch)
tree7d00fe1f989357a54152e4940813c64650be731a
parent417724efe260723889ca4013dd7fff80bb5375c3 (diff)
downloadlvm2-6b89c0d4b78d11b50328a6df73234524699eabb1.tar.gz
pvscan: for init only autoactivate vg for named dev
When pvscan is run for the initialization case (the first pvscan run on the system), it scans all devs and creates online files for all PVs it finds. Previously it would then autoactivate every complete VG, but change this to only autoactive the (complete) VG corresponding to the named device arg(s).
-rw-r--r--tools/pvscan.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c
index f0944cdfa..74e0b965b 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -1066,9 +1066,7 @@ int pvscan_cache_cmd(struct cmd_context *cmd, int argc, char **argv)
if (_online_pvid_files_missing()) {
log_verbose("pvscan all devices to initialize available PVs.");
- _online_files_remove(_pvs_online_dir);
- _online_files_remove(_vgs_online_dir);
- _online_pvscan_all_devs(cmd, complete_vgnames, NULL);
+ _online_pvscan_all_devs(cmd, complete_vgnames, &add_devs);
_unlock_online();
goto activate;
}