summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-02-25 15:41:15 -0600
committerDavid Teigland <teigland@redhat.com>2015-02-25 15:46:27 -0600
commit1248f94a429faa245968a9efe04250f27a53bc18 (patch)
treefac27c567b0aa4a5e3ef8af482427388f936dc01
parentbbaabb8a59980995dfa94948589034c6a93b9f5a (diff)
downloadlvm2-1248f94a429faa245968a9efe04250f27a53bc18.tar.gz
pvscan, vgscan: include foreign vgs with --cache
pvscan --cache and vgscan --cache scan devices to refresh lvmetad, and they should also refresh the lvmetad copy of foreign vgs.
-rw-r--r--tools/commands.h2
-rw-r--r--tools/pvscan.c2
-rw-r--r--tools/vgscan.c2
3 files changed, 5 insertions, 1 deletions
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;