mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
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.
This commit is contained in:
parent
bbaabb8a59
commit
1248f94a42
@ -616,7 +616,7 @@ xx(lvs,
|
|||||||
|
|
||||||
xx(lvscan,
|
xx(lvscan,
|
||||||
"List all logical volumes in all volume groups",
|
"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"
|
"lvscan\n"
|
||||||
"\t[-a|--all]\n"
|
"\t[-a|--all]\n"
|
||||||
"\t[-b|--blockdevice]\n"
|
"\t[-b|--blockdevice]\n"
|
||||||
|
@ -189,6 +189,8 @@ static int _pvscan_lvmetad(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
dev_t devno;
|
dev_t devno;
|
||||||
activation_handler handler = NULL;
|
activation_handler handler = NULL;
|
||||||
|
|
||||||
|
cmd->include_foreign_vgs = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return here immediately if lvmetad is not used.
|
* Return here immediately if lvmetad is not used.
|
||||||
* Also return if locking_type=3 (clustered) as we
|
* Also return if locking_type=3 (clustered) as we
|
||||||
|
@ -47,6 +47,8 @@ int vgscan(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
lvmcache_destroy(cmd, 1, 0);
|
lvmcache_destroy(cmd, 1, 0);
|
||||||
|
|
||||||
if (arg_count(cmd, cache_long_ARG)) {
|
if (arg_count(cmd, cache_long_ARG)) {
|
||||||
|
cmd->include_foreign_vgs = 1;
|
||||||
|
|
||||||
if (lvmetad_active()) {
|
if (lvmetad_active()) {
|
||||||
if (!lvmetad_pvscan_all_devs(cmd, NULL))
|
if (!lvmetad_pvscan_all_devs(cmd, NULL))
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
|
Loading…
Reference in New Issue
Block a user