You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "rp- (via GitHub)" <gi...@apache.org> on 2026/09/07 09:33:29 UTC

Re: [PR] Linstor 4.22 shared storagepool support [cloudstack]

rp- commented on code in PR #13910:
URL: https://github.com/apache/cloudstack/pull/13910#discussion_r3948403621


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java:
##########
@@ -658,10 +658,16 @@ public Answer copyVolumeFromPrimaryToSecondary(final CopyCommand cmd) {
         final String secondaryStorageUrl = nfsStore.getUrl();
         KVMStoragePool secondaryStoragePool = null;
 
+        boolean srcConnected = false;
         try {
             final String volumeName = UUID.randomUUID().toString();
 
             final String destVolumeName = volumeName + "." + ImageFormat.QCOW2.getFileExtension();
+            // the source volume may not be attached anywhere (e.g. a detached volume being
+            // migrated between pools); connect it so storage drivers that expose devices on
+            // demand (e.g. Linstor shared storage pools) provide the device for the copy
+            srcConnected = storagePoolMgr.connectPhysicalDisk(
+                    primaryStore.getPoolType(), primaryStore.getUuid(), srcVolumePath, null);

Review Comment:
   true, I trimmed it down to a one liner comment. but I think it has a bit of value, as it isn't obvious for other storages why a connect is needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org