Microsoft Virtualization Discussions

autosize IncrementSize set to 3% - cDOT

JSHACHER11
4,237 Views

 

 

Hi

 

I would like to set 'autosize' increment size to 3% of the volume, in all volumes (respectively) across the board - how can that be done please?

 

cDOT 8.2.3

 

 

$vols = Get-NcVol

Foreach ($vol in $vols) {
Set-NcVolAutosize -Name $vol -IncrementSize << 3% of the volume size
}

 

 

thank you

5 REPLIES 5

JGPSHNTAP
4,211 Views

Set-NcVolAutosize [-Name] <String> -Mode <String> [-MinimumSize <String>] [-GrowThresholdPercent <Int32>] [-ShrinkThresholdPercent <Int32>] [-VserverContext <String>] [-Controller <NcController[]>]
[[-MaximumSize] <String>] [[-IncrementSize] <String>] [<CommonParameters>]

 

man set-ncvolautosize -full

 

what's wrong with using -growthresholdpercent

JSHACHER11
4,208 Views

that is the percentage of when the autogrow will kick in. for example, if the volume reach 92%, the volume will be increased. what I am after is the increment size (by how much to increase when the threshold had been reached) and that cannot take percentage so I am looking for a way to script a calculation of 3% of each volume and use that in -IncrementSize

 

thanks for the help

 

 

JGPSHNTAP
4,204 Views

This should get you started

get-navol | % {

 $v = get-navolsize $_.name
$3pct = ($v.volumesize *.03)/1mb
 write-host "Volume Name:" $_.name "size: " $3pct
}

JSHACHER11
4,200 Views

thank you

 

it did get me started though it still doesn't resolve my issue. I cannot use $3pct as the variable in -IncrementSize

JSHACHER11
4,124 Views

so this option (increment size by percentage) is available in the cDOT commands:

 

[-autosize-increment-percent | -p <percent>] - Autosize Increment Percent

 

why isn't it available in PoSh?

 

 

-IncrementSize <String>
Specify the flexible volume's increment size using the following format

<number>[k|m|g|t]

 

Can it be included  in 3.3 please?

 

 

Thank you

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
Public