logo
Manual Pages
Table of Contents

NAME

na_quota - control filer disk quotas

SYNOPSIS

quota on [ -w ] volume quota { off | resize | allow | disallow } volume quota status [ volume ] quota report [ -q ] [ -s ] [ -t ] [ -v ] [ -u | -x ] [ path ] quota logmsg { on [ <interval> ] | off } [ -v <vol> | all ]

DESCRIPTION

A quota limits the amount of disk space and the number of files that a particular user or group can consume. A quota can also restrict the total space and files used in a qtree, or the usage of users and groups within a qtree. A request that would cause a user or group to exceed an applicable quota fails with a ``disk quota exceeded'' error. A request that would cause the number of blocks or files in a qtree to exceed the qtree's limit fails with an ``out of disk space'' error. User and group quotas do not apply to the root user or to the Windows Administrator account; tree quotas, however, do apply even to root and the Windows Administrator account. The quota command controls quotas, and the /etc/quotas file describes the quotas to impose. All quotas are established on a per-volume basis. For further information on the format of the /etc/quotas file, refer to the na_quotas(5) man page. With no arguments, the quota command indicates the quota status (on, off, disabled, etc.) for each volume. This form of the command is deprecated - use the quota status command instead. The following list describes how to use the various quota commands:
quota on volume
activates quotas in the specified volume based on the contents of /etc/quotas. The volume name may be omitted if the system has only one volume. Changing /etc/quotas has no effect until the next time quota on or quota resize is executed. The filer remembers whether quotas are on or off even after a reboot, so quota on should not be added to /etc/rc. When quotas are first turned on, the filer scans the file system to determine current file and space usage for each user and group with a quota. This may take several minutes during which quotas are not in effect, although the file system is still accessible. Executing quota with no arguments during this period indicates that quotas are initializing and reports how much of the initialization process has completed.
When run with the -w option, quota on will not return until the filer has finished scanning the /etc/quotas file and any errors will be printed to the console. When run without the -w option, quota on will return immediately and any errors will be reported through EMS. quota off volume turns quotas off on the specified volume. The volume name may be omitted if the system has only one volume. quota resize volume
adjusts currently active quotas in the specified volume to reflect changes in the /etc/quotas file. For instance, if you edit an entry in /etc/quotas to increase a user's quota, quota resize will cause the change to take effect. The volume name may be omitted if the system has only one volume. quota resize can be used only when quotas are already on. Because it does not rescan the file system to compute usage, quota resize is faster than turning quotas off and then on again. quota resize will apply all updated entries in /etc/quotas; however, it will generally ignore newly added entries. A newly added entry will only take effect if the corresponding user or group has an active quota as a result of updating a file subject to default quotas. quota allow volume
enables quotas on the specified volume. The volume name may be omitted if the system has only one volume. This command is only supported when MultiStore is licensed. By default quotas are enabled on all volumes. The physical filer administrator uses this command to re-enable quotas on a volume after quotas had been disabled by a quota disallow command. quota disallow volume
disables quotas on the specified volume. The volume name may be omitted if the system has only one volume. This command is only supported when MultiStore is licensed. By default quotas are enabled on all volumes. The physical filer administrator can disallow quotas on a volume that contains storage that belongs to one or more vfilers. This will turn quotas off for all vfilers that have storage on that volume. Quotas may not be turned on again until a quota allow command is issued for the volume. quota status [ volume ]
prints the quota status (on, off, disabled, etc.) for the specified volume. If no volume name is specified, the quota status for all volumes in the system is printed.
quota report
prints the current file and space consumption for each user or group with a quota and for each qtree. With a path argument, quota report displays information about all quotas that apply to the file. Space consumption and disk limits are rounded up and reported in multiples of 4 Kbytes.
The formatting options are defined as:
-q
If this option is given, the quota target's ID is displayed in a numeric form. No lookup of the name associated with the target ID is done. For unix user ids and group ids, the ID is displayed as a number. For Windows IDs, the textual form of the SID is displayed.
-s
If this option is given, the soft limit values are printed in the output along with the hard limits.
-t
If this option is given, the warning threshold of the quota entry is included in the quota report output. If this option is omitted, the warning threshold is not included. This option is ignored if the -x option is used.
-v
If this option is given, the name of the vfiler is included in the quota report output. It is only valid if MultiStore is licensed.
-u
If a quota target consists of multiple IDs, the first ID is listed on the first line of the quota report for that entry. The other IDs are listed on the lines following the first line, one ID per line. Each ID is followed by its original quota specifier, if any. Without this option, only one ID is displayed for quota targets with multiple IDs.
-x
If a quota target consists of multiple IDs, all IDs are listed on the first line of the quota report for that entry. They are listed as a comma separated list. Each column of the report output will be separated by a tab character. The threshold column will also be included.
quota logmsg
allows the user to specify a time interval for a volume during which quota messages for that volume will be disabled. With no arguments, the quota logmsg command displays the current interval settings.
The options provided are: on { <interval> }
If this option is specified, quota messages will be logged after every <interval>. If no interval is specified, the system logs messages at the default interval rate of 60 minutes. If continuous logging is desired, an interval of 0 should be specified. Note: message logging may not occur at exactly the same interval rate as specified by user. This might be observed for very small intervals. This is due to the behavior of the logging system that buffers messages instead of outputting them immediately. off If this option is specified, quota messages will not be logged. Logging messages can be resumed with the quota logmsg on option.
-v <vol>
This option may be used to specify a volume name.
all
This option is used to specify an interval that applies to all the volumes in the system.

VFILER CONSIDERATIONS

When run from a vfiler context, (e.g. via the vfiler run command), quota operates on the concerned vfiler and is restricted to the resources owned by this vfiler.

FILES

/etc/quotas
quota configuration file

SEE ALSO

na_rc(5), na_rquotad(8), na_qtree(1), na_vfiler(1)

DIAGNOSTICS

If /etc/quotas is incorrectly formatted, or if a specified file doesn't exist, then quota on prints a warning and does not turn quotas on. If /etc/quotas contains user quota targets that are Windows IDs, then CIFS must be active to turn quotas on or to perform a quota resize operation.

LIMITATIONS

Quotas do not count space consumed by snapshots. Doing so could put users into a state where they couldn't create any new files until all snapshots containing their old files expired, which could take a week or more. That seems like a worse limitation. It is possible for a quota to exceed its limit if files were created before quotas were turned on or during quota initialization.
Table of Contents