Manual Pages


Table of Contents

NAME

na_quotas - quota description file

SYNOPSIS

/etc/quotas

DESCRIPTION

The /etc/quotas file defines 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.

If any of the fields in the quota file contain special characters (#,-@) put the field in quotes ("@field#with,special-chars").

An entry in the quotas file can extend to multiple lines. However, the files, threshold, soft disk and soft files fields must be on the same line as the disk field; otherwise, they are ignored.

If you do not want to specify a value for a field in the middle of an entry, use a dash (-).

A line starting with a pound sign (#) is considered to be a comment.

If a quota target is affected by several /etc/quotas entries, the most restrictive entry or combination of entries applies.

The /etc/quotas file supports two types of character encoding: Unicode and root volume UNIX encoding (the language is specified for the root volume using the vol lang command).

You can edit the file from a PC or UNIX workstation. A file saved in a Unicode-capable editor, like Notepad, will be in Unicode. Otherwise it will be in the root volume UNIX encoding. Standard Generalized Markup Language (SGML) entities are allowed only in the root volume UNIX encoding.

Format of each entry:

target type[@vol] disk [files] [thres] [sdisk] [sfiles]

For example:

  # Quota Target      type                 disk  files thold sdisk sfile
  # -------------     -----                ----  ----- ----- ----- -----

  # Restrict user 'bob' to have 100M of space in the qtree '/vol/home'.
  # Also, allow him to create 10,240 files and warn him when he goes
  # over 90M and/or 9,216 files
  bob                 user@/vol/home       100M  10K   90M   90M   9K

target
Specifies an explicit user, group or qtree to which the quota is being applied. An asterisk (*) applies the quota as a default to all members of the type specified in the entry that do not have an explicit quota in /etc/quotas.

user
A user can be specfied as a: unix user name, numerical user ID, windows account name, Windows SID or a comma separated list of multiple users.

-
A unix user name, as defined in the /etc/passwd file or in the password NIS map e.g. jsmith or "user,#special,chars"

-
A numerical unix user ID (If you specify 0 (root), no limits you set will be enforced, but usage will still be tracked.) e.g. 20

- The pathname of a file owned by that user
e.g. /vol/file_owned_by_jsmith

(NOTE: The quota restrictions only apply to the user that owns the file, not the file itself.)

- A Windows account name, which consists
of the domain name and the account name separated by a backslash e.g. "tech support\john#smith" or corp\jsmith

(NOTE: A file created by a member of the BUILTIN\Administrators group is owned by the BUILTIN\Administrators group, not by the member. When determining the amount of disk space or the number of files used by that user, Data ONTAP does not count the files that are owned by the BUILTIN\Administrators group.)

-
The text form of a Windows SID that represents a Windows account e.g. S-1-5-32-544

- If you want
to specifiy multiple users that are to be affected by a quota, use a comma separated list of the users. Each user in this list may be one of: unix user name, numerical user ID, file pathname, Windows account or Windows SID. e.g. john,jess,steph

e.g.
jsmith,23,"/vol/,qtree",/vol/file

(NOTE: The list may 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.) group
May be one of the following:

-
Unix group name, as defined in the /etc/group file or in the group NIS map e.g. eng1

- A numerical group ID
e.g. 30

(NOTE: If the group ID is 0 (root), no limits you set will be enforced, but usage will still be tracked.)

- The pathname of a file owned by that group
e.g. /vol/vol1/archive

(NOTE: Specifying a file or directory does not affect the quota on that file or directory, only the GID.)

tree
May be one of the following:

- Complete path name to an existing qtree
e.g. /vol/vol0/qtree

-
If the qtree contains special characters, put the path in quotes. e.g "/vol/vol0/,qtree,with,special#chars"

default
An asterisk (*) is used to specify a default quota. This quota will be applied to users, groups or qtrees that are not specifically mentioned in the /etc/quotas file. This includes new users, groups or qtrees created after the default entry takes effect. e.g. * group 500m

(Apply a 500M restriction to all groups in the root vol.)

- Default
user and group quotas can be specified on a per qtree or per volume basis. e.g. * user@/vol/vol0/qtree 500M

- Default qtree quotas can be specified on a
per volume basis. e.g. * tree@/vol/vol0 500M

(NOTE: If the volume/qtree string is omitted from the type, the quota applies to the root volume.)

type[@/vol/dir/qtree_path]
Specifies what type the target is: user, group or tree. If the type is user or group, this field can optionally restrict this user or group quota to a specific volume or qtree.
user
- Restrict quota to the root volume e.g. bill user 500m

-
Restrict quota to a specific volume e.g. bill user@/vol/vol1 500m

- Restrict quota to a specific qtree
e.g.
bill user@/vol/vol1/qtree 500m

- Restrict quota to a specific qtree
with special characters
e.g.
bill "user@/vol/vol1/,tree#@" 500m

group
- Restrict quota to the root volume e.g. dev group 500m

-
Restrict quota to a specific volume e.g. dev group@/vol/vol1 500m

- Restrict quota to a specific qtree
e.g.
dev group@/vol/vol1/qtree 500m

- Restrict quota to a specific qtree
with special characters (#,/..)
e.g.
dev "group@/vol/vol1/,qtree,@#" 500m

tree
- Restrict qtree in the target qtree e.g.
"/vol/vol0/,qtree#with,special,chars" tree 500m

-
Restrict all qtrees in the specified volume e.g. * tree@/vol/vol0 500M

disk The maximum amount of disk space that can be used by the target within the root volume, specified volume or qtree. The value in this field represents a hard limit that cannot be exceeded. Do not leave this field blank.
e.g. 10K, 100M, 5G, 5g,
Rules for specifying a value in this field: - This field may be "-" to indicate no limit, which is useful for tracking usage on a per-user/ per-group basis. (See example 3 below.)

- K is equivalent to 1,024
bytes, M means 2^20 bytes and G means 2^30 bytes. (Disk limits cannot be specified in terms of terabytes.)

-
If you omit K, M or G, Data ONTAP assumes K.

- It is not case sensitive.
Thus K, k, M, m, G or g all work.

- The value must be an integer.

-
If the quota limit is larger than the amount of space available in the volume, the quota will still be enabled and a warning will be printed to the console.

- Disk space limits are always rounded up to
the nearest multiple of 4KB for translation into 4KB disk blocks.

- The maximum value you can enter
for this field is 16TB.

files The maximum number of files that can be created by the target in the root volume specified volume or qtree. This is a hard limit that cannot be exceeded.
e.g. 12,000 , 2K , 1G , Rules for specifying a value in this field:

- Use a hyphen (-)
if you don't want to impose a limit on the number of files.

-
This field may be left blank to indicate no limit. If you leave this field blank, you cannot specify values for threshold, soft disk or soft files.

- Not case sensitive, i.e. K/k, M/m and
G/g all work. K is equivalent to 1,024 files, M means 2^20 files and G means 2^30 files. You can omit the K, M or G. e.g. 100 (Means the maximum number of files is 100)

- The maximum value you
can enter in the files field is 3G.

-
If you do not specify K, M or G, Data ONTAP uses the literal value. K is not assumed in this case.

- The value must be an integer.

- The files field must be on the
same line as the disk field. Otherwise, the files field is ignored.

threshold
The disk space usage point at which a warning of approaching quota limits is logged to the storage system's console and a SNMP trap is generated. If a write causes the quota target to exceed the threshold, the write still succeeds as long as no other limits are exceeded.
e.g. 5G , 5g , 100M , 10K , Rules for specifying a value in this field:

- Same as the disk field.

-
The threshold field must be on the same line as the disk field. Otherwise, the threshold field is ignored.

soft disk
Same as the threshold field except that when the target's usage goes back under the soft disk limit, another syslog message and SNMP trap are generated. e.g. 5G , 5g , 100M , 10K , Rules for specifying a value in this field:

- Same as the disk field.

- The soft disk field must be
on the same line as the disk field. Otherwise, the soft disk field is ignored.

soft files
Same as soft disk, but for files. Specifies the number of files that the quota target can use before a warning is issued.
e.g. 1000, 5G , 5g , 100M , 10K , Rules for specifying a value in this field:

- Same as the files field.

- The soft file field must be
on the same line as the disk field. Otherwise, the soft file field is ignored.

domain directive
The QUOTA_TARGET_DOMAIN <domain> directive applies to all lines following it in the /etc/quotas file. When a domain is specified, the domain and a backslash are prepended to user names. See examples below.

user mapping directive

The QUOTA_PERFORM_USER_MAPPING directive applies to all lines following it in the /etc/quotas file. When ON, Data ONTAP's user name mapping support will be enabled. This means that unix user names will be mapped to their corresponding Windows account names and will be treated as a single quota target.

When OFF, this mapping does not occur. Quota user mapping is OFF unless explicitly enabled by using this directive. See examples below.

EXAMPLES

  # Quota Target      type                 disk  files thold sdisk sfile
  # -------------     -----                ----  ----- ----- ----- -----

  # Restrict the user 'mhoward' to 500M of disk space and 51,200 files in
  # the root volume
  mhoward             user                 500M  50K

  # Restrict the user 'lfine' to 500M of disk space, but give no
  # restriction on the number of files
  lfine               user@/vol/home       500M

  # Place no restriction on either disk or file usage for the user
  # 'tracker.'  (Useful for tracking usage on a per-user or per-group
  # basis.)
  tracker             user                 -    -

  # Restrict the group 'stooges', and the qtree 'export' to 750MB and
  # 76,800 files
  stooges             group@/vol/vol0      750M  75K
  /vol/vol0/export    tree                 750M  75K

  # Restrict mhoward's usage in the export qtree to 50MB and 5,120
  # files
  mhoward          user@/vol/vol0/export   50M   5K

  # Restrict the group 'stooges' to 100MB and 10,240 files in the export
  # qtree
  stooges          group@/vol/vol0/export  100M  10K

  # Quota Target      type                 disk  files thold sdisk sfile
  # -------------     -----                ----  ----- ----- ----- -----

  # Restrict all users, except the ones in this file, to have 100M
  # of space in the qtree '/vol/home'.  Also, allow them to create 10,240
  # files and warn them when they go over 90M and/or 9,216 files
  *                   user@/vol/home       100M  10K   90M   90M   9K

  # Restrict all groups, except ones in this file, to have less than
  # 500M of space and 70K files in the vol '/vol/vol0'.
  *                   group@/vol/vol0      500M  70K

  # Restrict all other qtrees in the root volume to be less than 500M in
  # size and have less than 50K files
  *                   tree                 500M  50K

  # Restrict all other users in the qtree '/vol/vol0/export' to use less
  # than 20M of space and 2K files
  *                user@/vol/vol0/export   20M   2K

  # Restrict all other groups in the qtree '/vol/vol0/export' to use less
  # than 200M of space and 20K files.  Warn if they go over 150M.
  *                group@/vol/vol0/export  200M  20K   150M

  # Restrict the qtree '/vol/home' to a max size of 500M and 50K files
  *                   tree@/vol/home       500M  50K

  # Monitor the Window's user 'bill' in the domain 'corp' and warn him if
  # his usage goes over 100M
  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      type                 disk  files thold sdisk sfile
  # -------------     -----                ----  ----- ----- ----- -----
  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 .....
  30 blocks
  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

SEE ALSO

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


Table of Contents