Setting Default User and Group Quotas

Starting in the Oracle Solaris 11.3 release, you can set a default user quota or a default group quota that is applied automatically for anyone who does not have a specific quota defined. Similar to specific user and group quotas, default user and group quotas are not inheritable to descendent file systems. In addition, if a default user or group quota is set on a top-level file system, space consumed in descendent file systems is not charged to the top-level file system's default quota.

You can set a default user quota on a large shared file system. For example:

$ zfs set defaultuserquota=30gb students/labstaff/admindata

Using a default user quota on a large shared file system allows you to restrict growth without specifying individual user quotas. You can also monitor who is using the top-level file system.

$ zfs userspace students/labstaff/admindata
TYPE        NAME     USED  QUOTA  SOURCE   
POSIX User  admin1  2.00G    30G  default  
POSIX User  admin2  4.00G    30G  default  
POSIX User  root       3K    30G  default  

In the above example, each user that does not have an existing quota is allowed 30GB of disk space in students/labstaff/admindata. Contrasting this behavior to setting a 30GB file system quota on students/labstaff/admindata, means that a cumulative quota of 30GB would apply to all users who didn't have an existing quota.

You can set a default group quota in a similar way. For example, the following syntax sets a 120GB quota on the students/math file system. You can use the zfs groupspace command to track usage of a top-level file system with a default group quota.

$ zfs set defaultgroupquota=120g students/math
$ zfs groupspace students/math
TYPE         NAME       USED  QUOTA  SOURCE   
POSIX Group  root         6K   120G  default  
POSIX Group  students  40.0G   120G  default