1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

vgcfgrestore: Remove the VG from lvmetad before overwriting it.

This commit is contained in:
Petr Rockai 2013-09-18 10:34:38 +02:00
parent c2dd0a832a
commit a6af611ae1

View File

@ -57,6 +57,14 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED;
}
if (lvmetad_active()) {
struct volume_group *vg = lvmetad_vg_lookup(cmd, vg_name, NULL);
if (vg) {
lvmetad_vg_remove(vg);
release_vg(vg);
}
}
cmd->handles_unknown_segments = 1;
if (!(arg_count(cmd, file_ARG) ?