quota report [ path ]
quota qtree [ name ]
The quota command controls quotas, and /etc/quotas describes the quotas to impose. Here is a sample /etc/quotas:
# Quota Target type disk files # ------------- ----- ----- ----- /home/user/mhoward user 500M 50K /home/user/lfine user 500M 50K /home/group/stooges group 750M 75K /export tree 750M 75K
This file restricts the users mhoward and lfine to 500 mega-bytes of disk space and 50 thousand files each. It restricts the stooges group and the /export subtree to 750 mega-bytes and 75 thousand files each. Since the filer doesn't know how to map user and group names to user and group IDs (UIDs and GIDs), a file with the appropriate UID or GID is specified instead. That is, the first line in the quota file puts a quota on the user that owns /home/user/mhoward. Paths are relative to the root of the filer's file system.
Quotas of type tree can only be applied to "quota trees," which are directories created in / using the quota qtree command described below.
Disk and file size limits in the third and fourth columns of /etc/quotas can end in "K" as an abbreviation for kilobytes (or kilofiles), or "M" as an abbreviation for megabytes (or megafiles). For the disk limit, a "G" may also be used for gigabytes. The default for the disk limit is kilobytes.
quota on activates quotas based on the contents of /etc/quotas. Changing /etc/quotas has no effect until the next time quota on 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 without arguments during this period indicates that quotas are initializing and tells how much of the initialization process has completed.
quota off turns quotas off.
quota report prints the current file and space consumption for each user or group with a quota. With a path argument, quota report displays information about all quotas that apply to the file.
quota qtree name creates a new quota tree named /name. A quota tree is similar to a partition in that files inside of a quota tree cannot be moved outside of it, and vice versa. A quota tree is more flexible than a partition because the quota that restricts its size can be changed at any time. Quota trees can only be created in /. A newly created quota tree has no file or size limit. To impose a quota, update /etc/quotas and run quota off followed by quota on. With no argument, quota qtree lists all existing quota trees. To delete a quota tree, simply remove it from the file system.
It is possible for a quota to exceed its limit if files were created before quotas were turned on or during quota initialization.