Setting ZFS Quotas
You can use the quota
property to set a limit on the amount of disk space a file system can use. In addition, you can use the reservation
property to guarantee that a specified amount of disk space is available to a file system. Both properties apply to the file system on which they are set and all descendents of that file system.
That is, if a quota is set on the tank/home
file system, the total amount of disk space used by tank/home
and all of its descendents cannot exceed the quota. Similarly, if tank/home
is given a reservation, tank/home
and all of its descendents draw from that reservation. The amount of disk space used by a file system and all of its descendents is reported by the used
property.
The refquota
and refreservation
properties are used to manage file system space without accounting for disk space consumed by descendents, such as snapshots and clones.
In this Oracle Solaris release, you can set a user or a group quota on the amount of disk space consumed by files that are owned by a particular user or group. The user and group quota properties cannot be set on a volume, on a file system before file system version 4, or on a pool before pool version 15.
Consider the following points to determine which quota and reservation features might best help you manage your file systems:
-
The
quota
andreservation
properties are convenient for managing disk space consumed by file systems and their descendents. -
The
refquota
andrefreservation
properties are appropriate for managing disk space consumed by file systems. -
Setting the
refquota
orrefreservation
property higher than thequota
orreservation
property has no effect. If you set thequota
orrefquota
property, operations that try to exceed either value fail. It is possible to a exceed aquota
that is greater than therefquota
. For example, if some snapshot blocks are modified, you might actually exceed thequota
before you exceed therefquota
. -
User and group quotas provide a way to more easily manage disk space with many user accounts, such as in a university environment.
-
A convenient way to set a quota on a large file system for many different users is to set a default user or group quota.
For more information about setting quotas and reservations, see Setting Quotas on ZFS File Systems and Setting Reservations on ZFS File Systems.