]> sourceware.org Git - lvm2.git/commitdiff
vgcfgrestore: Remove the VG from lvmetad before overwriting it.
authorPetr Rockai <prockai@redhat.com>
Wed, 18 Sep 2013 08:34:38 +0000 (10:34 +0200)
committerPetr Rockai <prockai@redhat.com>
Wed, 18 Sep 2013 08:37:29 +0000 (10:37 +0200)
tools/vgcfgrestore.c

index 36396c33f4cbe05bd2033fb67e1683f63e10c628..f5608368111412f03f397b91cc0406db8538a44a 100644 (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) ?
This page took 0.039774 seconds and 5 git commands to generate.