Skip to content

Commit 7e500a5

Browse files
committed
CLOUDSTACK-4551: Migrating the data volume from NFS to local storage ,underlying disk offering is not changed.
Even though the volume may get migrated from shared to local storage, it is not possible to update the disk offering. The fix is to disallow migration from shared to local store.
1 parent d17024c commit 7e500a5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎server/src/com/cloud/storage/VolumeManagerImpl.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,11 @@ public Volume migrateVolume(MigrateVolumeCmd cmd){
22452245
+ storagePoolId);
22462246
}
22472247

2248-
if (!volumeOnSharedStoragePool(vol)) {
2248+
if (volumeOnSharedStoragePool(vol)) {
2249+
if (destPool.isLocal()) {
2250+
throw new InvalidParameterValueException("Migration of volume from shared to local storage pool is not supported");
2251+
}
2252+
} else {
22492253
throw new InvalidParameterValueException(
22502254
"Migration of volume from local storage pool is not supported");
22512255
}

0 commit comments

Comments
 (0)