ONTAP Discussions

How to prevent Auto-size minimum from changing after an auto-grow

philipb
2,942 Views

IHAC that wants the volume minimum size to remain the same even after an auto-size grow occurs.  With current functionality, after growing, the new minimum is change to that new size.  it appears to be a straightforward request.  Are we missing something?

1 ACCEPTED SOLUTION

Mjizzini
2,860 Views

You can use the autosize command specifying mode  "grow-shrink" and  "minimum-size".

 

[-mode {off|grow|grow_shrink}] - Autosize ModeThis parameter specifies the autosize mode for the volume. The supported autosize modes are:

  • off - The volume will not grow or shrink in size in response to the amount of used space.
  • grow - The volume will automatically grow when used space in the volume is above the grow threshold.
  • grow_shrink - The volume will grow or shrink in size in response to the amount of used space.

 

 

[-minimum-size {<integer>[KB|MB|GB|TB|PB]}] - Minimum AutosizeThis parameter specifies the minimum size to which the volume can automatically shrink. If the volume was created with the grow_shrink autosize mode enabled, then the default minimum size is equal to the initial volume size. If the value of the -minimum-size parameter is invalidated by a manual volume resize or is invalid when autosize is enabled, the minimum size is reset to the volume size. This parameter is not supported on Infinite Volumes.

 

 More about volume autosize.

View solution in original post

4 REPLIES 4

pedro_rocha
2,933 Views

Hello,

 

Please check if this answers your question:

 

"As a volume grows, the maximum number of files it can contain might be automatically increased. When a volume is shrunk, the maximum number of files it can contain is left unchanged, and a volume cannot be automatically shrunk below the size that corresponds to its current maximum number of files. For this reason, it might not be possible to automatically shrink a volume all the way to its original size."

 

From here.

 

Regards,

Pedro Rocha

 

philipb
2,926 Views

It looks to be that is the reason.  Thank you.

ralfk
2,907 Views

@pedro_rocha wrote:

 

"As a volume grows, the maximum number of files it can contain might be automatically increased. When a volume is shrunk, the maximum number of files it can contain is left unchanged, and a volume cannot be automatically shrunk below the size that corresponds to its current maximum number of files. For this reason, it might not be possible to automatically shrink a volume all the way to its original size."

 


This does not go into full detail and I do not thing it to be the cause, but I am not sure - more Details would be required, like  Autosupport, etc.

ONTAP does by default reserve one inode (or "file") per 32k volume size. This is the "files" parameter of a volume. When the volume is grown on parameter "size" manually (or via autosize configuration), the "files" parameter does grow automatically up to a certain point, I think its ~760 GBytes / ~20 Million files.

There is a kb article, explaining this in more detail - search "inode" on https://kb.netapp.com/:

https://kb.netapp.com/Advice_and_Troubleshooting/Data_Storage_Software/ONTAP_OS/What_is_an_inode%3F


https://kb.netapp.com/Advice_and_Troubleshooting/Data_Storage_Software/ONTAP_OS/How_to_decrease_the_number_of_inodes_for_a_volume


https://kb.netapp.com/Advice_and_Troubleshooting/Data_Storage_Software/ONTAP_OS/How_to_increase_the_maximum_number_of_volume_inodes_or_files


https://kb.netapp.com/Advice_and_Troubleshooting/Data_Storage_Software/ONTAP_OS/Inode_number_keeps_at_21251126%2C_which_doesn't_increase_to_desired_va...


You actually can shrink the "files" parameter but you can not shrink it to anything below th maximum numer of files the volume did hold at any point in the past. So if the volume grows to 760GB and files is adjusted to 20M, if the max amount of files in that volume had never exceeded e.g. 5000, you can shrink the "files" parameter to 5000 again but never below 5000 anymore.

Please refer to the manpage of "volume modify" by executing the command "man volume modify", might the min-autosize have been invalidated by a manual volume resize?

[-min-autosize {<integer>[KB|MB|GB|TB|PB]}] - Minimum Autosize
This parameter specifies the minimum size to which the volume can automatically shrink. If the volume was created with the grow_shrink autosize mode enabled, then the default minimum size is equal to the initial volume size. If
the value of the -min-autosize parameter is invalidated by a manual volume resize, the minimum size is reset to the volume size.

Mjizzini
2,861 Views

You can use the autosize command specifying mode  "grow-shrink" and  "minimum-size".

 

[-mode {off|grow|grow_shrink}] - Autosize ModeThis parameter specifies the autosize mode for the volume. The supported autosize modes are:

  • off - The volume will not grow or shrink in size in response to the amount of used space.
  • grow - The volume will automatically grow when used space in the volume is above the grow threshold.
  • grow_shrink - The volume will grow or shrink in size in response to the amount of used space.

 

 

[-minimum-size {<integer>[KB|MB|GB|TB|PB]}] - Minimum AutosizeThis parameter specifies the minimum size to which the volume can automatically shrink. If the volume was created with the grow_shrink autosize mode enabled, then the default minimum size is equal to the initial volume size. If the value of the -minimum-size parameter is invalidated by a manual volume resize or is invalid when autosize is enabled, the minimum size is reset to the volume size. This parameter is not supported on Infinite Volumes.

 

 More about volume autosize.

Public