[pve-devel] [qemu-container] Add unused mountpoints.

Wolfgang Link w.link at proxmox.com
Mon Jun 12 14:09:08 CEST 2017


We will also replicate unused volumes which are in the config.
---
 PVE/QemuConfig.pm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
index 8a8cb5b..ab93aea 100644
--- a/PVE/QemuConfig.pm
+++ b/PVE/QemuConfig.pm
@@ -99,6 +99,15 @@ sub get_replicatable_volumes {
         });
     }
 
+    # add 'unusedX' volumes to volhash
+    foreach my $key (keys %$conf) {
+	my $value = $conf->{$key};
+	if ($key =~ m/^unused/) {
+	    my $drive = PVE::QemuServer::parse_drive($key, $value);
+	    $test_volid->($drive->{file}, $drive);
+	}
+    }
+
     return $volhash;
 }
 
-- 
2.11.0





More information about the pve-devel mailing list