Skip to content

Commit 160aad5

Browse files
author
Eugenio Grosso
committed
storage: add NVMeTCP storage pool type
NVMe-oF over TCP (NVMe-TCP) is conceptually a separate storage fabric from Fibre Channel / iSCSI: it speaks the NVMe command set rather than SCSI, identifies namespaces by EUI-128 NGUIDs rather than WWNs, and on Linux is multipathed natively by the nvme driver rather than by device-mapper multipath. Giving it its own StoragePoolType lets the KVM agent dispatch the adaptive driver to a dedicated NVMe-oF adapter (added in the next commit) without polluting the existing Fibre Channel code path. The new value is wired into the same format-routing and derivePath fall-through paths that already special-case FiberChannel in KVMStorageProcessor: NVMe-TCP volumes are also RAW and carry their device path in DataObjectTO.path rather than in a managedStoreTarget detail.
1 parent a852c64 commit 160aad5

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

api/src/main/java/com/cloud/storage/Storage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ public static enum StoragePoolType {
183183
Linstor(true, true, EncryptionSupport.Storage),
184184
DatastoreCluster(true, true, EncryptionSupport.Unsupported), // for VMware, to abstract pool of clusters
185185
StorPool(true, true, EncryptionSupport.Hypervisor),
186-
FiberChannel(true, true, EncryptionSupport.Unsupported); // Fiber Channel Pool for KVM hypervisors is used to find the volume by WWN value (/dev/disk/by-id/wwn-<wwnvalue>)
186+
FiberChannel(true, true, EncryptionSupport.Unsupported), // Fiber Channel Pool for KVM hypervisors is used to find the volume by WWN value (/dev/disk/by-id/wwn-<wwnvalue>)
187+
NVMeTCP(true, true, EncryptionSupport.Unsupported); // NVMe over TCP (NVMe-oF/TCP) Pool for KVM hypervisors; volumes are identified by EUI-128 NGUID (/dev/disk/by-id/nvme-eui.<eui>)
187188

188189
private final boolean shared;
189190
private final boolean overProvisioning;

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ public Answer copyTemplateToPrimaryStorage(final CopyCommand cmd) {
376376
StoragePoolType.RBD,
377377
StoragePoolType.PowerFlex,
378378
StoragePoolType.Linstor,
379-
StoragePoolType.FiberChannel).contains(primaryPool.getType())) {
379+
StoragePoolType.FiberChannel,
380+
StoragePoolType.NVMeTCP).contains(primaryPool.getType())) {
380381
newTemplate.setFormat(ImageFormat.RAW);
381382
} else {
382383
newTemplate.setFormat(ImageFormat.QCOW2);
@@ -409,7 +410,8 @@ public Answer copyTemplateToPrimaryStorage(final CopyCommand cmd) {
409410

410411
public static String derivePath(PrimaryDataStoreTO primaryStore, DataTO destData, Map<String, String> details) {
411412
String path = null;
412-
if (primaryStore.getPoolType() == StoragePoolType.FiberChannel) {
413+
if (primaryStore.getPoolType() == StoragePoolType.FiberChannel
414+
|| primaryStore.getPoolType() == StoragePoolType.NVMeTCP) {
413415
path = destData.getPath();
414416
} else {
415417
path = details != null ? details.get("managedStoreTarget") : null;
@@ -3175,7 +3177,8 @@ private Storage.ImageFormat getFormat(StoragePoolType poolType) {
31753177
StoragePoolType.RBD,
31763178
StoragePoolType.PowerFlex,
31773179
StoragePoolType.Linstor,
3178-
StoragePoolType.FiberChannel).contains(poolType)) {
3180+
StoragePoolType.FiberChannel,
3181+
StoragePoolType.NVMeTCP).contains(poolType)) {
31793182
return ImageFormat.RAW;
31803183
} else {
31813184
return ImageFormat.QCOW2;

0 commit comments

Comments
 (0)