Chapter 2 NAS Head 2-111
Hard Limits/Soft Limits: Same as KB Limits above, but applies to the number of
files rather than their size.
To define a quota, locate the desired user on the list, and double click the user entry.
This will pop up a window which will allow you to define hard and soft KB limits,
as well as hard and soft file limits. You can choose Default, No Limit, or Custom via
radio buttons. Default applies the quotas defined for the default user, if any. No
Limit allows unlimited storage, and Custom allows you to define a quota in KB, MB
or GB. Click “apply” to set the newly defined quota, or click cancel to close the
window with no changes.
If the user does not appear in the list, click the add button. Select the UNIX or
Windows radio button, and select a user from the list. You can also type in a
username, but the account must already exist on the Sun StorEdge 5310 NAS.
Having selected the user, proceed as above to define a quota.
How do I configure user and group quotas at the CLI?
All quota operations are also available at the CLI, as follows:
There are four commands available which control quotas.
quotaon /volumename: This enables quotas for a particular volume.
quotaoff /volumename: This disables quotas for a particular volume
quota: This command is used to set quotas. The official syntax is as follows:
quota [-g|-u] /VOLUME|/* NAME|ID|NAME/ID [bh=KB] [bs=KB] [fh=N] [fs=N]
-g and -u are used to specify a user or group name or GID/UID for display or setting
/VOLUME is mandatory, as all quotas are volume specific
A "block" is one KB, bh= defines a hard quota in blocks, bs= defines a soft quota in
blocks, fh= and fs= define hard and soft quotas for number of files.
A soft quota may be exceeded temporarily, for a period of seven days. After the
seven days, writes from this user will be denied due to quota.
A hard quota cannot be exceeded and will return an error upon the attempt. The
most common implementation is to use hard quotas only.
It is permissible to use a user/group name instead of UID/GID, but the mapping
must be present in /etc/passwd.nis. UID/GID will always work.
example: "quota -u 100 /vol1 bs=1000000 bh-2000000" sets the soft quota for UID 100
to 1GB and the hard quota to 2GB.