1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

Obtain VG list from lvmetad before relying on get_vgs, otherwise PVs in VGs

don't appear.
This commit is contained in:
Alasdair Kergon 2012-03-03 17:12:21 +00:00
parent 113f2a0113
commit 59a5361fc4

View File

@ -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;
}