ZFS user and group quotas
ZFS allows quotas to be defined for each file system, but currently lacks the ability to define user and group quotas inside a file system (you can create one file system per user to get around this). This issue is being addressed, and user and group quotas will soon be part of opensolaris. Here is a blurb from the ARC case that was submitted to address this issue:
“A. SUMMARY
This case adds support to ZFS for user/group quotas & per-uid/gid space
tracking.
B. PROBLEM
Enterprise customers often want to know who is using space, based on
what uid and gid owns each file.
Education customers often want to apply per-user quotas to hundreds of
thousands of users. In these situations, the number of users and/or
existing infrastructure prohibits using one filesystem per user and
setting filesystem-wide quotas.
1. Overview
Each filesystem keeps track of how much space inside it is owned by each
user (uid) and group (gid). This is the amount of space “referenced”,
so relationships between filesystems, descendents, clones, and snapshots
are ignored, and each tracks their “user used” and “group used”
independently. This is the same policy behind the “referenced”,
“refquota”, and “refreservation” properties. The amount of space
charged is the amount of space reported by struct stat’s st_blocks and
du(1).
Both POSIX ids (uid & gid) and untranslated SIDs are supported (eg, when
sharing filesystems over SMB without a name service translation set up).
ZFS will now enforce quotas on the amount of space referenced by files
owned by particular users and groups. Enforcement may be delayed by
several seconds. In other words, users may go a bit over their quota
before the system notices that they are over quota and begins to refuse
additional writes with EDQUOT. This decision was made to get the
feature to market in a reasonable time, with a minimum of engineering
resources expended. The design and implementation do not preclude
implementing strict enforcement at a later date.”
This will be pretty sweet, and universities and other institutions that supports lots of users will be super happy when this feature is integrated!







