[lvm-devel] master - pvscan: for init only autoactivate vg for named dev

David Teigland teigland at sourceware.org
Mon Apr 8 15:39:34 UTC 2019


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6b89c0d4b78d11b50328a6df73234524699eabb1
Commit:        6b89c0d4b78d11b50328a6df73234524699eabb1
Parent:        417724efe260723889ca4013dd7fff80bb5375c3
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Tue Feb 26 16:39:43 2019 -0600
Committer:     David Teigland <teigland at redhat.com>
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(-)

diff --git a/tools/pvscan.c b/tools/pvscan.c
index f0944cd..74e0b96 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;
 	}




More information about the lvm-devel mailing list