summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2021-03-26 14:47:05 -0500
committerDavid Teigland <teigland@redhat.com>2021-03-26 14:47:05 -0500
commit46ecca37f92a725cc37971691829feb35596463a (patch)
tree95e2bbb792d0fe9e61e70c0cee23feeaf0afd641
parent6666c7b2ff9eb8f55a6772580189ad84e71d0573 (diff)
downloadlvm2-dev-dct-pvscan-list-3.tar.gz
pvscan: check for exported vgdev-dct-pvscan-list-3
earlier when creating online files so that it's ignored for --cache --listvg
-rw-r--r--tools/pvscan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c
index 4652e7de4..806df812c 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -1362,6 +1362,12 @@ static int _online_devs(struct cmd_context *cmd, int do_all, struct dm_list *pvs
continue;
}
+ if (vg_is_exported(vg)) {
+ log_print_pvscan(cmd, "PV %s ignore exported VG.", dev_name(dev));
+ release_vg(vg);
+ continue;
+ }
+
/*
* online file phase
* create pvs_online/<pvid>