diff options
author | Petr Rockai <prockai@redhat.com> | 2012-02-23 13:11:07 +0000 |
---|---|---|
committer | Petr Rockai <prockai@redhat.com> | 2012-02-23 13:11:07 +0000 |
commit | dae0822698327e81f467c3594141d70cdafca331 (patch) | |
tree | 673c87128df8e56be79703a799c83d12acbe5b19 /tools/vgscan.c | |
parent | 182d1f60d2fb1bbadef2974fa55278f553b04ed9 (diff) | |
download | lvm2-dae0822698327e81f467c3594141d70cdafca331.tar.gz |
The lvmetad client-side integration. Only active when use_lvmetad = 1 is set in
lvm.conf *and* lvmetad is running.
Diffstat (limited to 'tools/vgscan.c')
-rw-r--r-- | tools/vgscan.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/vgscan.c b/tools/vgscan.c index 4e12914c6..df0486f24 100644 --- a/tools/vgscan.c +++ b/tools/vgscan.c @@ -24,13 +24,14 @@ static int vgscan_single(struct cmd_context *cmd, const char *vg_name, vg->fid->fmt->name); check_current_backup(vg); + lvmetad_vg_update(vg); /* keep lvmetad up to date */ return ECMD_PROCESSED; } int vgscan(struct cmd_context *cmd, int argc, char **argv) { - int maxret, ret; + int maxret, ret, lvmetad; if (argc) { log_error("Too many parameters on command line"); @@ -44,6 +45,8 @@ int vgscan(struct cmd_context *cmd, int argc, char **argv) persistent_filter_wipe(cmd->filter); lvmcache_destroy(cmd, 1); + lvmetad = lvmetad_active(); + lvmetad_set_active(0); /* do not rely on lvmetad info */ log_print("Reading all physical volumes. This may take a while..."); @@ -56,6 +59,7 @@ int vgscan(struct cmd_context *cmd, int argc, char **argv) maxret = ret; } + lvmetad_set_active(lvmetad); /* restore */ unlock_vg(cmd, VG_GLOBAL); return maxret; } |