diff --git a/tools/commands.h b/tools/commands.h index 5cd7c2d15..719c507b7 100644 --- a/tools/commands.h +++ b/tools/commands.h @@ -616,7 +616,7 @@ xx(lvs, 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" diff --git a/tools/pvscan.c b/tools/pvscan.c index 4ab2ff796..a04a4b282 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -189,6 +189,8 @@ static int _pvscan_lvmetad(struct cmd_context *cmd, int argc, char **argv) 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 diff --git a/tools/vgscan.c b/tools/vgscan.c index b3af9bca0..7328a096d 100644 --- a/tools/vgscan.c +++ b/tools/vgscan.c @@ -47,6 +47,8 @@ int vgscan(struct cmd_context *cmd, int argc, char **argv) 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;