Solaris ZFS Administration Guide

ZFS User and Group Quotas

Solaris Express Community Edition, build 114: In previous Solaris releases, you could apply quotas and reservations to ZFS file systems to manage and reserve space.

In this Solaris release, you can set a quota on the amount of 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 user or group quotas by using the zfs userquota and zfs groupquota properties as follows:


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

You can display a user's or 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 individual user or group space usage by viewing the userused@user and groupused@group properties as follows:


# 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.