Oracle Solaris ZFS Administration Guide

ZFS User and Group Quotas

Solaris 10 10/09 Release: In previous Solaris releases, you could apply quotas and reservations to ZFS file systems to manage and reserve disk space.

In this Solaris release, you can set a quota on the amount of disk space consumed by files that are owned by a particular user or group. You might consider setting user and group quotas in an environment with a large number of users or groups.

You can set a user quota by using the zfs userquota property. To set a group quota, use the zfs groupquota property. For example:


# zfs set userquota@user1=5G tank/data
# zfs set groupquota@staff=10G tank/staff/admins

You can display a user's or a group's current quota setting as follows:


# zfs get userquota@user1 tank/data
NAME       PROPERTY         VALUE            SOURCE
tank/data  userquota@user1  5G               local
# zfs get groupquota@staff tank/staff/admins
NAME               PROPERTY          VALUE             SOURCE
tank/staff/admins  groupquota@staff  10G               local

Display general quota information as follows:


# zfs userspace tank/data
TYPE        NAME   USED  QUOTA  
POSIX User  root     3K   none  
POSIX User  user1     0    5G  

# zfs groupspace tank/staff/admins
TYPE         NAME   USED  QUOTA  
POSIX Group  root     3K   none  
POSIX Group  staff     0    10G  

You can display an individual user's disk space usage by viewing the userused@user property. A group's disk space usage can be viewed by using the groupused@group property. For example:


# zfs get userused@user1 tank/staff
NAME        PROPERTY        VALUE           SOURCE
tank/staff  userused@user1  213M            local
# zfs get groupused@staff tank/staff
NAME        PROPERTY         VALUE            SOURCE
tank/staff  groupused@staff  213M             local

For more information about setting user quotas, see Setting ZFS Quotas and Reservations.