If you're not against building your own code, you can apply a small
patch that should enable it. When I developed the initial resize call,
it actually allowed root resize, but I wasn't confident that it made
sense to put it in the final product because root disks are managed by
service offerings, and it allows you to violate that service offering.
I imagine a global config option would need to be added to explicitly
turn it on.
Here's a 4.2 version of the patch:
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java
b/server/src/com/cloud/storage/VolumeManagerImpl.java
index 1d6b44f..4ef57ed 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -1110,17 +1110,12 @@ public class VolumeManagerImpl extends
ManagerBase implements VolumeManager {
"Volume should be in ready state before
attempting a resize");
}
- if (!volume.getVolumeType().equals(Volume.Type.DATADISK)) {
- throw new InvalidParameterValueException(
- "Can only resize DATA volumes");
- }
-
/*
* figure out whether or not a new disk offering or size parameter is
* required, get the correct size value
*/
if (newDiskOffering == null) {
- if (diskOffering.isCustomized()) {
+ if (diskOffering.isCustomized() ||
volume.getVolumeType().equals(Volume.Type.ROOT)) {
newSize = cmd.getSize();
if (newSize == null) {
@@ -1135,6 +1130,10 @@ public class VolumeManagerImpl extends
ManagerBase implements VolumeManager {
+ " cannot be resized, need to specify a disk
offering");
}
} else {
+ if (!volume.getVolumeType().equals(Volume.Type.DATADISK)) {
+ throw new InvalidParameterValueException(
+ "Can only resize DATA volumes via new disk offering");
+ }
if (newDiskOffering.getRemoved() != null
|| !DiskOfferingVO.Type.Disk.equals(newDiskOffering
On Mon, Jan 20, 2014 at 3:09 AM, Bharat Kumar <[email protected]> wrote:
> Hi Nux,
>
> I also don’t know when or in what version this will be available.
>
> Thanks.
> Bharat.
>
> On 20-Jan-2014, at 3:15 pm, Nux! <[email protected]> wrote:
>
>> On 20.01.2014 05:25, Bharat Kumar wrote:
>>> Hi Nux,
>>> This for the root disk resize feature, we do not have it in this
>>> release. so I think we need to remove this box form the UI.
>>> created a bug to track this
>>> Bug link https://issues.apache.org/jira/browse/CLOUDSTACK-5909
>>
>> Thanks Bharat,
>>
>> Do you know roughly in which version this will be available? I've been
>> waiting for it since I started using ACS. :)
>>
>> Regards,
>> Lucian
>>
>> --
>> Sent from the Delta quadrant using Borg technology!
>>
>> Nux!
>> www.nux.ro
>