pvscan --cache and vgscan --cache scan devices to refresh lvmetad,
and they should also refresh the lvmetad copy of foreign vgs.
xx(lvscan,
"List all logical volumes in all volume groups",
- PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | ENABLE_FOREIGN_VGS,
+ PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT,
"lvscan\n"
"\t[-a|--all]\n"
"\t[-b|--blockdevice]\n"
dev_t devno;
activation_handler handler = NULL;
+ cmd->include_foreign_vgs = 1;
+
/*
* Return here immediately if lvmetad is not used.
* Also return if locking_type=3 (clustered) as we
lvmcache_destroy(cmd, 1, 0);
if (arg_count(cmd, cache_long_ARG)) {
+ cmd->include_foreign_vgs = 1;
+
if (lvmetad_active()) {
if (!lvmetad_pvscan_all_devs(cmd, NULL))
return ECMD_FAILED;