logo

Manual Pages


Table of Contents

NAME

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
  # -------------     -----                     ----    -----
  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
  *                   group@/vol/vol0           500M    70K
  *                   user@/vol/vol0/export      20M     2K
  *                   group@/vol/vol0/export    200M    20K

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.

A user or group is specified by one of the following values:

a user or group name, which must appear in the password or group database (either in the /etc/passwd or /etc/group file on the filer, or in the password or group NIS map if NIS is enabled on the filer and is being used for the password or group database);

a numerical user or group ID;

the pathname of a file owned by that user or 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 or quota qtree 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 or a group quota depending on the type. Any user or group that is not specifically mentioned in the /etc/quotas file is subject to the limits of the default user or group. Default user or group quotas can be specified on a per qtree basis or a per volume basis.

Disk and file size limits in the third and fourth columns of the /etc/quotas file ends 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 default for the disk limit is kilobytes.

SEE ALSO

na_qtree(1), na_quota(1), na_rquotad(8)


Table of Contents