CLOUDSTACK-5061 - Cloudstack doesn't consider storage overprovisioning factor when using thin Provisioning over VMWare VMFS datastores

Fix is use the storage overprovisioning factor (global configuration parameter "storage.overprovisioning.factor") to calculate total provisioning capacity for storage space allocation over VMFS based storage pools as well.
There are two level of thin provisioning provided in VMware, storage level and file-level (VMDK) thin provisioning. in CloudStack, all volumes are provisioned with thin VMDK format, so at hypervisor level, we ALWAYS do thin provisioning. If storage vendor has the ability to provide storage level thin provisioning in addition to VMDK thin provisioning, it is also allowed since it is transparent to Cloudstack.

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
Sateesh Chodapuneedi 2013-11-06 17:37:22 +05:30
parent 0ec6b9ac99
commit 40a7839323

View File

@ -875,19 +875,10 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
List<CapacityVO> capacities = _capacityDao.search(capacitySC, null);
long totalOverProvCapacity;
if (storagePool.getPoolType() == StoragePoolType.NetworkFilesystem) {
if (storagePool.getPoolType() == StoragePoolType.NetworkFilesystem || storagePool.getPoolType() == StoragePoolType.VMFS) {
BigDecimal overProvFactor = getStorageOverProvisioningFactor(storagePool.getDataCenterId());
totalOverProvCapacity = overProvFactor.multiply(new BigDecimal(storagePool.getCapacityBytes())).longValue();// All
// this
// for
// the
// inaccuracy
// of
// floats
// for
// big
// number
// multiplication.
totalOverProvCapacity = overProvFactor.multiply(new BigDecimal(storagePool.getCapacityBytes())).longValue();
// All this is for the inaccuracy of floats for big number multiplication.
} else {
totalOverProvCapacity = storagePool.getCapacityBytes();
}
@ -1596,7 +1587,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
}
long totalOverProvCapacity;
if (pool.getPoolType() == StoragePoolType.NetworkFilesystem) {
if (pool.getPoolType() == StoragePoolType.NetworkFilesystem || pool.getPoolType() == StoragePoolType.VMFS) {
totalOverProvCapacity = getStorageOverProvisioningFactor(pool.getDataCenterId()).multiply(new BigDecimal(pool.getCapacityBytes()))
.longValue();
} else {