ONTAP Discussions
ONTAP Discussions
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?
Solved! See The Solution
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:
[-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.
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
It looks to be that is the reason. Thank you.
@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
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.
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:
[-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.