Skip to main content

volume quota modify

Contributors
Suggest changes

Modify quota state for volumes

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

Description

This command allows you to modify the following quota attributes for one or more volumes:

  • Quota state

  • Whether quota exceeded messages are logged or not

  • Frequency with which quota exceeded messages are logged

Modifications to the quota state for a volume creates a job to perform the quota state changes for that volume. You can monitor the progress of the job by using the job show and job watch-progress commands.

Parameters

-vserver <vserver name> - Vserver Name

This specifies the name of the Vserver on which the volume whose quota attributes you are modifying is located.

-volume <volume name> - Volume Name

This specifies the name of the volume whose quota attributes you are modifying.

[-state <quota_state>] - Quota State

This parameter optionally modifies the quota state to one of the following:

  • off - This indicates that quotas be deactivated for the specified volume.

  • on - This indicates that quotas be activated for the specified volume.

  • resize - This indicates that the quota limits be resized according to the values specified in the quota policy assigned to the Vserver. Note that quotas must be activated first for a volume before a resize operation can be performed.

Both quota activation and quota resize operations apply the quota rules configured for the volume within the quota policy that is currently assigned to the Vserver. These quota rules are managed by using the commands in the volume quota policy rule menu. Quotas, when activated for a volume, go through an initialization process. As part of the quota initialization all the quota rules are applied to the volume. In addition, a filesystem scanner is started to scan the entire filesystem within the volume to bring the quota accounting and reporting up to date. The quota job finishes after the filesystem scanner is started on the volume. The quota state for the volume is initializing until the filesystem scanner finishes scanning the entire filesystem. After the scanning is complete, the quota state will be on .

When quotas are resized, the quota state is resizing until the resizing operation finishes. As part of this operation, the quota limits for quotas currently in effect are resized to the limits currently configured for the volume. After the quota resize operation finishes, the quota state will be on .

Quota state changes can also be performed using the commands volume quota on , volume quota off and volume quota resize .

[-logging {on|off}] - Logging Messages

This parameter optionally specifies whether quota exceeded syslog/EMS messages are logged in the system log messages. When it is set to on , quota exceeded messages are generated when the user exceeds the quota's disk limit or the file limit through a NFS/CIFS operation or any operation within the Data ONTAP software. When set to off no quota exceeded messages are generated. This parameter can be changed only after quotas are activated for a volume.

[-logging-interval <text>] - Logging Interval

This parameter optionally specifies a logging interval, which indicates the frequency with which quota exceeded messages are generated. You can specify a logging interval in the <integer><suffix> format, where suffix can be minutes (m ), hours (h ), or days (d ), but not combinations thereof (in other words, 90m is a valid logging interval, but 1h30m is not a valid logging interval). You can modify the logging interval only when the logging is on . When quotas are first activated, the logging parameter is automatically set to on , and the logging interval set to 1h . If continuous logging is required, an interval of 0m should be specified. This parameter can be changed only after quotas are activated for a volume.

Note quota message logging may not occur at exactly the same interval rate as specified by the user, especially for very small intervals. This is due to the behavior of the logging system that buffers messages instead of outputting them immediately. Setting the logging interval to 0m can cause lots of quota exceeded messages to be logged in the system log messages.
[-foreground <true>] - Foreground Process

This parameter optionally specifies whether the job created by quota state modify operation runs as a foreground process. The default setting is false (that is, the quota state modify operation runs in the background). When set to true , the command will not return until the job completes.

Examples

The following example activates quotas on the volume named vol1 , which exists on Vserver vs0 .

cluster1::> volume quota modify -vserver vs0 -volume vol1 -state on
[Job 24] Job is queued: Quota ON Operation on vserver vs0 volume vol1.

The following example turns on quota message logging and sets the logging interval to 4 hours.

cluster1::> volume quota modify -vserver vs0 -volume vol1 -logging on -logging-interval 4h

The following example resizes quota limits on a volume.

cluster1::> volume quota modify -vserver vs0 -volume vol1 -state resize -foreground true
[Job 80] Job succeeded: Successful