volume autosize

Set/Display the autosize settings of the flexible volume.

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The volume autosize command allows the user to specify the maximum size that a volume will automatically grow to when it is out of space or the minimum size that it will shrink to when the amount of used space is below a certain threshold. If only the volume/Vserver name is specified then the current settings are displayed. This command is not supported on Infinite Volumes.

Parameters

-vserver <vserver name> - Vserver Name
This parameter can be used to specify the Vserver on which the volume is located.
-volume <volume name> - Volume Name
This parameter specifies the volume for which the user wants to set or display the autosize configuration.
{ [-maximum-size {<integer>[KB|MB|GB|TB|PB]}] - Maximum Autosize
This parameter allows the user to specify the maximum size to which a flexible volume can grow. The default for FlexVol volumes is 120% of the volume size. If the value of this parameter is invalidated by manually resizing the volume or is invalid when the autosize feature is enabled, the maximum size is reset to 120% of the volume size. The value for -maximum-size cannot be set larger than the platform-dependent maximum FlexVol volume size. If you specify a larger value, the value of -maximum-size is automatically reset to the supported maximum without returning an error.
[-minimum-size {<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 -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.
[-grow-threshold-percent <percent>] - Grow Threshold Used Space Percentage
This parameter specifies the used space threshold for the automatic growth of the volume. When the volume’s used space becomes greater than this threshold, the volume will automatically grow unless it has reached the maximum autosize. This parameter is not supported on Infinite Volumes.
[-shrink-threshold-percent <percent>] - Shrink Threshold Used Space Percentage
This parameter specifies the used space threshold for the automatic shrinking of the volume. When the amount of used space in the volume drops below this threshold, the volume will shrink unless it has reached the specified minimum size. This parameter is not supported on Infinite Volumes.
[-mode {off|grow|grow_shrink}] - Autosize Mode
This 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.
By default, -mode is off for new FlexVol volumes, except for DP mirrors, for which the default value is grow_shrink. The grow and grow_shrink modes work together with Snapshot autodelete to automatically reclaim space when a volume is about to become full. The volume parameter -space-mgmt-try-first controls the order in which these two space reclamation policies are attempted.
| [-reset [true]]} - Autosize Reset
This option allows the user to reset the values of autosize, max-autosize, min-autosize, autosize-grow-threshold-percent, autosize-shrink-threshold-percent and autosize-mode to their default values based on the current size of the volume. For example, the max-autosize value will be set to 120% of the current size of the volume.

Examples

The following example sets the autosize settings on a volume named vol1. The maximum size to grow is 1TB and autogrow is enabled.

 cluster1::> vol autosize vol1 -maximum-size 1t -mode grow
   (volume autosize)
 vol autosize: Flexible volume 'vs1:vol1' autosize settings UPDATED.

The following example shows the autosize settings on a volume named vol1. The maximum size to grow is 1TB and autogrow is enabled.

 cluster1::> vol autosize vol1 
   (volume autosize)
 Volume autosize is currently ON for volume 'vs1:vol1'.                    
 The volume is set to grow to a maximum of 1t.