]> sourceware.org Git - lvm2.git/commitdiff
pvscan, vgscan: include foreign vgs with --cache
authorDavid Teigland <teigland@redhat.com>
Wed, 25 Feb 2015 21:41:15 +0000 (15:41 -0600)
committerDavid Teigland <teigland@redhat.com>
Wed, 25 Feb 2015 21:46:27 +0000 (15:46 -0600)
pvscan --cache and vgscan --cache scan devices to refresh lvmetad,
and they should also refresh the lvmetad copy of foreign vgs.

tools/commands.h
tools/pvscan.c
tools/vgscan.c

index 5cd7c2d151c8b99b2830d48510c4a2f4d2d6984f..719c507b7500744d25c0d1e615fa70220cc712ab 100644 (file)
@@ -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"
index 4ab2ff7964c6885ef18e71fe569b9545aa39bbb4..a04a4b2826ef97b8c2c3307180f49de69ce45b7a 100644 (file)
@@ -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
index b3af9bca0cdf54564ea558f6aabfaf63b439e614..7328a096d8544f63f83082b7b29b05ad2150b058 100644 (file)
@@ -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;
This page took 0.03796 seconds and 5 git commands to generate.