]> git.proxmox.com Git - qemu-server.git/commitdiff
deactivate volumes after clone to other node
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 19 Nov 2013 07:15:54 +0000 (08:15 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 19 Nov 2013 07:15:54 +0000 (08:15 +0100)
PVE/API2/Qemu.pm

index c8a2738db3e3190b8b686ceba8ae728a752ca950..925b2ad5452c6f37cc32ecb818e54a33f7838594 100644 (file)
@@ -2252,6 +2252,9 @@ __PACKAGE__->register_method({
                    PVE::QemuServer::update_config_nolock($newid, $newconf, 1);
 
                     if ($target) {
+                       # always deactivate volumes - avoid lvm LVs to be active on several nodes
+                       PVE::Storage::deactivate_volumes($storecfg, $vollist);
+
                        my $newconffile = PVE::QemuServer::config_file($newid, $target);
                        die "Failed to move config to node '$target' - rename failed: $!\n"
                            if !rename($conffile, $newconffile);