Skip to contentSkip to conversation

master - pvscan: for init only autoactivate vg for named dev

PATCH David Teigland 1 participant 1 message Apr 8, 2019

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6b89c0d4b78d11b50328a6df73234524699eabb1
Commit:        6b89c0d4b78d11b50328a6df73234524699eabb1
Parent:        417724efe260723889ca4013dd7fff80bb5375c3
Author:        David Teigland <[email protected]>
AuthorDate:    Tue Feb 26 16:39:43 2019 -0600
Committer:     David Teigland <[email protected]>
CommitterDate: Fri Apr 5 12:46:39 2019 -0500

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).

---
 tools/pvscan.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
tools/pvscan.c +1 -3
index f0944cd..74e0b96 100644
@@ -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;
 	}