Active IQ Unified Manager Discussions

Resize a volume

warrenb
5,895 Views

So; I'm creating a workflow to create a CIFS share on an existing volume. The first step is to find the user specified volume and increase the size of it by the desired size of the CIFS share (plus a little room for snapshots). I cannot, however, get the workflow to correctly set the TargetSize parameter for the ResizeVolume command.

I've tried using a finder to find the volume and then defined a new volume using the paramters of the found volume and adding the user requested size to size_mb. This does nothing.

Am I missing something simple here?

Thanks,

Warren

1 ACCEPTED SOLUTION

yaronh
5,896 Views

Hi Warren,

It seems you are handling it right.

The steps to do it are the following:

1) Find the volume to resize via a finder and populate it in a variable (Let's say "orig_vol")

2) Define a volume object (Let's say "resized_vol") and set (At the minimum) it's natural key attributes ("array" and "name", as "orig_vol.array" and "orig_vol.name" accordingly)

3) Set the new size in one of 2 ways in "resized_vol.size_mb":

  1. Absolute => orig_vol.size_mb + $ShareSize
  2. Relative  => "+" + $ShareSize

If the original volume was 50MB and you'd like to add 30MB => The value of "resized_vol.size_mb" would result to 80 or +30

Both of these may work. Just remember that the size is in accordance with the SnapReserve percentage.

Please let me know if you require further assistance.

Regards,

Yaron Haimsohn

Workflow Automation team

View solution in original post

5 REPLIES 5

yaronh
5,897 Views

Hi Warren,

It seems you are handling it right.

The steps to do it are the following:

1) Find the volume to resize via a finder and populate it in a variable (Let's say "orig_vol")

2) Define a volume object (Let's say "resized_vol") and set (At the minimum) it's natural key attributes ("array" and "name", as "orig_vol.array" and "orig_vol.name" accordingly)

3) Set the new size in one of 2 ways in "resized_vol.size_mb":

  1. Absolute => orig_vol.size_mb + $ShareSize
  2. Relative  => "+" + $ShareSize

If the original volume was 50MB and you'd like to add 30MB => The value of "resized_vol.size_mb" would result to 80 or +30

Both of these may work. Just remember that the size is in accordance with the SnapReserve percentage.

Please let me know if you require further assistance.

Regards,

Yaron Haimsohn

Workflow Automation team

intellect
5,227 Views

hey when i do the third step.....

3) Set the new size in one of 2 ways in "resized_vol.size_mb":

  1. Absolute => orig_vol.size_mb + $ShareSize
  2. Relative  => "+" + $ShareSize

IT CONCATINATES the new volume size with old volume size ....like if old volume is 1024MB and new volume input is 1024MB then its giving 10241024 as volume size. Instead it should add them 1024+1024=2048 MB. Kindly help guys how to add size . ASAP

yaronh
5,198 Views

I'd guess that somehow your user input (In my case $ShareSize) is somehow a string and not a number.

Look at the functions and user input definitions and transform it to a number.

 

That's what I can offer easily, without looking at the actual setup.

 

Yaron

intellect
5,174 Views

Ok yaron, Still i am not able to fix it. I will start from beginning what i am doing

step 1: i made a new workflow then i chose "resize volume command" .

step 2: I was asked to fill attributes "Define volume" i chose from dropdown " by searching for an existing volume" later i used a finder "Find volume by name in a given array" fed attribute like volume name with $volume_name and other attribute Array IP or name with $controller_name . later i am using query search for $volume_name and $controller_name.

 

now from here on i dont know which command i should take or what next should be done. So that i can resize my volume. I need to add space to existing volume. I have your above post but i am unable to do as said .Kindly help

JoelEdstrom
5,157 Views

Hi There,

 

I had the same problem and ended up using a custom MVEL function to get around the string/integer mismatch issue and prevents the two from simply being concatenated.

 

This (very hastily written) function has fixed my issues:

 

def sumDigitsDouble(numberone, numbertwo) 
{
   return (int)((double)numberone) + ((double)numbertwo);
}

 

And then call it from the workflow like any other WFA function where there might be a combination of integers and strings.

 

Does this help?

Public