[pve-devel] [qemu-server 1/5] get_replicatable_volumes: skip volumes on shared storage

Dietmar Maurer dietmar at proxmox.com
Tue Jun 13 08:38:54 CEST 2017


Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 PVE/QemuConfig.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm
index 8a8cb5b..05447dc 100644
--- a/PVE/QemuConfig.pm
+++ b/PVE/QemuConfig.pm
@@ -73,6 +73,12 @@ sub get_replicatable_volumes {
 
 	return if !$volid;
 
+	my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, $noerr);
+	return if !$storeid;
+
+	my $scfg = storage_config($storecfg, $storeid);
+	return if $scfg->{shared};
+
 	return if PVE::QemuServer::drive_is_cdrom($drive);
 
 	return if !$cleanup && defined($drive->{replicate}) && !$drive->{replicate};
-- 
2.11.0




More information about the pve-devel mailing list