ONTAP Discussions

Automatically resizing a large amount of flex vols after manual deletion of data

FabrizioS
592 Views

Hello, I have to resize about 400 flexvols, having partially deleted old data.

My target is to resize exactly to 97% of used space.

Having done the job before on few volumes I used to resize it manually.

Now I'm trying to autoresize volumes using volume options

            space-nearly-full-threshold-percent
            space-full-threshold-percent
            autosize-grow-threshold-percent
            autosize-shrink-threshold-percent

but I can't get the volume autosized.

Maybe I specified wrong values for the above options, can you help me on how to set them to achieve the 97% of used space?

Thank you,

Fabrizio

1 ACCEPTED SOLUTION

FabrizioS
166 Views

Hi,

I achivied the goal.

 

This is an example, based on resizing the volume volimagesaoup23 with size 3.13TB and percent-used 98%

This is the command I run (specifying also a bigger size and a low minimum size to be sure the real size will fall in between)

volume modify -vserver avno-cifs-3 -autosize-mode grow_shrink -autosize-grow-threshold-percent 98 -autosize-shrink-threshold-percent 97 -min-autosize 10GB -size 3.5TB -volume volimagesaoup23

 

and those are the resulting autosized values:

volume                              size            percent-used
volimagesaoup23        3.15TB      97%

 

View solution in original post

3 REPLIES 3

jaikumar
346 Views

I assume , the operations is to reduce the volume size to 97% of its used size and the reason is some of the old data is clean up.

---

Now none of the below volumes options will reduce the volume size automatically.

  • space-nearly-full-threshold-percent
  • space-full-threshold-percent
  • autosize-grow-threshold-percent
  • autosize-shrink-threshold-percent

All the below option in the volume must be be used to automatically grow and shrink according to how much space volume currently require

  • autosize-mode grow_shrink

Automatic shrinking prevents a volume from being larger than needed, freeing space in the aggregate for use by other volumes.

---

Example
The following command enables automatic size changes for a volume called "volume_resize" The volume is configured to begin shrinking when it is 70% full and grow when the volume is 80% full and the volume can grow upto 300TB of size. 


TestCluster::*> volume modify -vserver vsdemo -volume volume_resize -autosize-mode grow_shrink -autosize-grow-threshold-percent 80% -autosize-shrink-threshold-percent 70%  -max-autosize 300t

Volume modify successful on volume VMBootDataStore of Vserver vsdemo.
TestCluster::*>


Note :
* Maximum size of the volume supported have changed over different ONTAP Releases

* Autoshrink can only be used in combination with autogrow to meet changing space demands and is not available alone.

* Thin Volumes will also help in use of physical storage as we use.

FabrizioS
306 Views

Thank you Jakumar.

Mine is NetApp Release 9.5: Thu Dec 13 20:41:33 UTC 2018.

 

As a specialization of your example, to reach the threshold of 97% free I can try to set growth >97% and shrink >96% (bigger than the actual used space).

 

I tried a lot of combinations with a real volume but nothing appens, see below for details.

I also tried to resize to 2TB reaching 50% of used space and set shrink threshold to 51, 50 and 49 %...

There is nothing to do when you modify the parameters, such "wait for X minutes", or the shrink is triggered in real time?

 

I set those values in my real volume volimagesaoup20 that is 96% full to gain the 1% of wasted space.

These are the final settings (note that I tried a lot af combinations of thresholds for shrink, growth, nearly-full):

nas-avno-3::> volume show -volume volimagesaoup20 -fields size , -fields ...

1.04TB size
37.51GB available
1TB used
96% percent-used
97% space-nearly-full-threshold-percent
98% space-full-threshold-percent
98% autosize-grow-threshold-percent
97% autosize-shrink-threshold-percent

FabrizioS
167 Views

Hi,

I achivied the goal.

 

This is an example, based on resizing the volume volimagesaoup23 with size 3.13TB and percent-used 98%

This is the command I run (specifying also a bigger size and a low minimum size to be sure the real size will fall in between)

volume modify -vserver avno-cifs-3 -autosize-mode grow_shrink -autosize-grow-threshold-percent 98 -autosize-shrink-threshold-percent 97 -min-autosize 10GB -size 3.5TB -volume volimagesaoup23

 

and those are the resulting autosized values:

volume                              size            percent-used
volimagesaoup23        3.15TB      97%

 

Public