From 7e500a5de87bc11db071d57c90180310a6cb240e Mon Sep 17 00:00:00 2001 From: Koushik Das Date: Thu, 17 Oct 2013 12:17:58 +0530 Subject: [PATCH] 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. --- server/src/com/cloud/storage/VolumeManagerImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java index b680da158b2..faa4ed31914 100644 --- a/server/src/com/cloud/storage/VolumeManagerImpl.java +++ b/server/src/com/cloud/storage/VolumeManagerImpl.java @@ -2245,7 +2245,11 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { + storagePoolId); } - if (!volumeOnSharedStoragePool(vol)) { + if (volumeOnSharedStoragePool(vol)) { + if (destPool.isLocal()) { + throw new InvalidParameterValueException("Migration of volume from shared to local storage pool is not supported"); + } + } else { throw new InvalidParameterValueException( "Migration of volume from local storage pool is not supported"); }