mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Obtain VG list from lvmetad before relying on get_vgs, otherwise PVs in VGs
don't appear.
This commit is contained in:
parent
113f2a0113
commit
59a5361fc4
@ -165,6 +165,10 @@ int pvscan(struct cmd_context *cmd, int argc, char **argv)
|
||||
persistent_filter_wipe(cmd->filter);
|
||||
lvmcache_destroy(cmd, 1);
|
||||
|
||||
/* populate lvmcache */
|
||||
if (!lvmetad_vg_list_to_lvmcache(cmd))
|
||||
stack;
|
||||
|
||||
log_verbose("Walking through all physical volumes");
|
||||
if (!(pvslist = get_pvs(cmd))) {
|
||||
unlock_vg(cmd, VG_GLOBAL);
|
||||
@ -177,8 +181,8 @@ int pvscan(struct cmd_context *cmd, int argc, char **argv)
|
||||
pv = pvl->pv;
|
||||
|
||||
if ((arg_count(cmd, exported_ARG)
|
||||
&& !(pv_status(pv) & EXPORTED_VG))
|
||||
|| (arg_count(cmd, novolumegroup_ARG) && (!is_orphan(pv)))) {
|
||||
&& !(pv_status(pv) & EXPORTED_VG)) ||
|
||||
(arg_count(cmd, novolumegroup_ARG) && (!is_orphan(pv)))) {
|
||||
dm_list_del(&pvl->list);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user