logo
Manual Pages
Table of Contents

NAME

na_quotas - quota description file

SYNOPSIS

/etc/quotas

DESCRIPTION

The /etc/quotas file describes disk quotas that go into effect when quotas are enabled. All quotas are established on a per-volume basis. If a volume name is not specified in an entry of the /etc/quotas file, the entry applies to the root volume. The following sample /etc/quotas file describes different kinds of quotas:
  # Quota Target      type                    disk  files thold sdisk sfile
  # -------------     -----                   ----  ----- ----- ----- -----
  mhoward             user                    500M  50K
  lfine               user@/vol/home          500M
  tracker             user                       -    -
  stooges             group@/vol/vol0         750M  75K
  /vol/vol0/export    tree                    750M  75K
  mhoward             user@/vol/vol0/export    50M   5K
  stooges             group@/vol/vol0/export  100M  10K
  *                   user@/vol/home          100M  10K     90M   90M    9K
  *                   group@/vol/vol0         500M  70K
  *                   tree                    500M  50K
  *                   user@/vol/vol0/export    20M   2K
  *                   group@/vol/vol0/export  200M  20K    150M
  *                   tree@/vol/home          500M  50K
  corp\bill           user                       -    -    100M
  corp\joe, fin\joe   user                    200M  40K    160M
  corp\sue, sue       user                    100M  20K
  corp\ann            user                    100M    -     90M
  QUOTA_TARGET_DOMAIN corp
  # The following entry will become corp\jim
  jim                 user                    200M   -       -
  # The following entry will become corp\beth
  beth                user                    120M 50K       -
  QUOTA_TARGET_DOMAIN
  QUOTA_PERFORM_USER_MAPPING ON
  # If corp\sam maps to usam, the following entry will become
  #  corp\sam, usam   user .....
  corp\sam            user                     50M
  # If umary maps to corp\mary, the following entry will become
  #  umary, corp\mary user ....
  umary               user                    300M
  QUOTA_PERFORM_USER_MAPPING OFF
The first non-comment line in the file restricts the user mhoward to 500 MB of disk space and 51,200 files in the root volume. The second line restricts the user lfine to 500 MB of disk space in the home volume, but places no restriction on the number of files he can have. You can leave the file limit blank to indicate that no limit is imposed but you cannot omit the value for disk space. The third line places no restriction on either disk usage or file usage by using a limit field of "-". This may be useful for tracking usage on a per-user or per-group basis without imposing any usage limits. The next two lines restrict the stooges group and the /vol/vol0/export qtree to 750 MB and 76,800 files each in the root volume. The fifth column of the /etc/quotas file contains a value for the warning threshold. If an attempt to allocate space for the quota target causes the quota target's disk space usage to exceed the warning threshold value, a warning message is logged on the filer's console. Additionally, an SNMP trap is emitted indicating the condition. The disk space allocation will succeed if no other quota limits are exceeded. The value is specified in bytes. The sixth column specifies a soft disk limit, while the seventh column specifies a soft file limit. They are analogous to the (hard) limits specified in the third and fourth columns, but behave more similarly to the threshold value: when a soft limit is exceeded, a warning message is logged to the filer's console. Additionally, an SNMP trap is emitted indicating the condition. Lastly, when the quota target's usage returns below the soft limit, a warning message and SNMP trap is also generated. An entry in the /etc/quotas file may extend over several lines, but the last five columns (hard limits, warning threshold, and soft limit values) must be on the same line of the quota file. A user is specified by one of the following values: a unix user name, which must appear in the password database (either in the /etc/passwd file on the filer, or in the password NIS map if NIS is enabled on the filer and is being used for the password database); a numerical unix user ID; the pathname of a file owned by that user; a Windows account name, which consists of the domain name and the account name separated by a backslash (if the domain name or the account name contain spaces or other special characters, then the entire name must be enclosed in quotes); the text form of a Windows SID that represents a Windows account; a comma separated list of any of the above items that are to be considered one user quota target (the list can extend to multiple lines, but the last item must be on the same line as the quota type, disk limit, file limit and warning threshold values). A group is specified by one of the following values: a unix group name, which must appear in the group database (either in the /etc/group file on the filer, or in the group NIS map if NIS is enabled on the filer and is being used for the group database); a numerical group ID; the pathname of a a file owned by that group. The user or group identifier for a user or group quota can be followed by an @/vol/volume string, which specifies the volume to which the quota applies. If the string is omitted, the quota applies to the root volume. A quota of type tree can only be applied to a qtree, which is a directory in the root directory of a specified volume. A qtree is created with the qtree create command. User and group quotas can be created inside a qtree, so that the user's or group's use of space or files within that qtree is restricted. This is done by specifying the type as user@tree or group@tree where tree is the name of the qtree. In the example above, we first limit overall usage in the qtree /vol/vol0/export and then we restrict the user mhoward to 50 MB and 5,120 files under the /vol/vol0/export tree. Similarly, the group stooges has been limited to 100 MB of disk space and 10,240 files under the /vol/vol0/export tree. In any operation that creates files or writes to them, all applicable quotas must be satisfied. For example, the user mhoward can write to a file in the /vol/vol0/export tree if all of these requirements are met: his total disk usage in the root volume does not exceed 500 MB his total number of files in the root volume does not exceed 51,200 his usage within the /vol/vol0/export tree does not exceed 50 MB his number of files within the /vol/vol0/export tree does not exceed 5,120 the space already in use in the /vol/vol0/export tree does not exceed 750 MB the number of files in the /vol/vol0/export tree does not exceed 768,000 The asterisk (*) in the /etc/quotas file specifies a default user, group, or tree quota depending on the type. Any user, group, or qtree that is not specifically mentioned in the /etc/quotas file is subject to the limits of the default user, group, or tree. Default user or group quotas can be specified on either a per qtree basis or a per volume basis. Default tree quotas can be specified on a per volume basis. The tree identifier for a qtree quota can be followed by an @/vol/volume string, which specifies the volume to which the quota applies. If the string is omitted, the quota applies to the root volume. Hard disk limits, hard file limits, warning threshold, soft disk limits, and soft file limits in the last five columns of the /etc/quotas file end in ``K'', ``M'', or ``G''. ``K'' indicates kilobytes (or kilofiles). That is, it multiplies the limit by 1,024. Similarly, ``M'' denotes megabytes (or megafiles) and ``G'' denotes gigabytes (or gigafiles). The unit specifiers are not case sensitive so lower-case letters may be used. The default for the disk limits and warning threshold is kilobytes. The QUOTA_TARGET_DOMAIN domain directive can be used to change a user quota target that is a unix name to a user quota target that is a Windows account. It will prepend the domain and a backslash to subsequent user quota targets that are unix user names. It will continue to prepend the unix user name names with the domain name until either the end of the /etc/quotas file or another QUOTA_TARGET_DOMAIN directive is encountered. The QUOTA_PERFORM_USER_MAPPING [ ON | OFF ] directive, when ON, will use the filer's user name mapping support to map user quota targets that are unix user names to their corresponding Windows account names and consider both as one user quota target. It will also map user quota targets that are Windows account names to their corresponding unix user names and consider both as one user quota target. The setting remains until either the end of the /etc/quotas file is reached or another QUOTA_PERFORM_USER_MAPPING directive is encountered. If the directive is omitted or if the directive is OFF, no user name mapping is done.

SEE ALSO

na_qtree(1), na_quota(1), na_rquotad(8), na_usermap.cfg(5)
Table of Contents