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

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


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

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index fc3a283..fc08172 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -1279,6 +1279,15 @@ sub get_replicatable_volumes {
         });
     }
 
+    # add 'unusedX' volumes to volhash
+    foreach my $key (keys %$conf) {
+	my $value = $conf->{$key};
+	if ($key =~ m/^unused/) {
+	    my $mountpoint = $class->parse_ct_rootfs($value);
+	    $test_volid->($mountpoint->{volume}, $mountpoint);
+	}
+    }
+
     return $volhash;
 }
 
-- 
2.11.0





More information about the pve-devel mailing list