diff options
author | David Teigland <teigland@redhat.com> | 2021-03-26 14:47:05 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2021-03-26 14:47:05 -0500 |
commit | 46ecca37f92a725cc37971691829feb35596463a (patch) | |
tree | 95e2bbb792d0fe9e61e70c0cee23feeaf0afd641 | |
parent | 6666c7b2ff9eb8f55a6772580189ad84e71d0573 (diff) | |
download | lvm2-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.c | 6 |
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> |