User and Group Settings
Viewing Current Usage
Regardless of whether user and group quotas are in use, current usage on a per-user or
per-group basis can be queried for filesystems and projects. Storage pools created on older versions
of software may need to apply Updates in Oracle ZFS Storage Appliance Customer Service Manual
before making use of this feature. After applying the deferred update, it
may take some time for all filesystems to be upgraded to a version that support per-user and
per-group usage and quotas.
Viewing Current Usage in the BUI
-
To view the current usage in the BUI, go to Shares > Shares > General.
-
In the Space Usage - Users and Groups section click the User or Group drop down to select User
or Group and query the current usage for any given user or group within a share or across a
project.
-
Type the name of the User or Group that you want to query. The query progresses as you
type.
When the lookup is completed, the current usage is displayed. In addition, the "Show All" link
shows a dialog with a list of current usage of all users or groups. This dialog can only query for a
particular type - users or groups - and does not support querying both at the same time. This list
displays the canonical UNIX and Windows name (if mappings are enabled), as well as the usage and
(for filesystems) quota.
Viewing Current Usage in the CLI
-
In the CLI, use the users and groups commands in the
context of a particular project or share.
-
Use, the show command to display current usage in a tabular form.
-
To retrieve the usage for a particular user or group, select the user or group you want and
use the get command.
clownfish:> shares select default
clownfish:shares default> users
clownfish:shares default users> list
USER NAME USAGE
user-000 root 325K
user-001 ahl 9.94K
user-002 eschrock 20.0G
clownfish:shares default users> select name=eschrock
clownfish:shares default user-002> get
name = eschrock
unixname = eschrock
unixid = 132651
winname = (unset)
winid = (unset)
usage = 20.0G
Setting User or Group Quotas
Quotas can be set on a user or group at the filesystem level. These enforce physical data
usage based on the POSIX or Windows identity of the owner or group of the file or directory. There
are some significant differences between user and group quotas and filesystem and project data
quotas:
-
User and group quotas can only be applied to filesystems.
-
User and group quotas are implemented using delayed enforcement. This
means that users will be able to exceed their quota for a short period of time before data is
written to disk. Once the data has been pushed to disk, the user will receive an error on new
writes, just as with the filesystem-level quota case.
-
User and group quotas are always enforced against referenced data. This means that snapshots
do not affect any quotas, and a clone of a snapshot will consume the same amount of effective quota,
even though the underlying blocks are shared.
-
User and group reservations are not supported.
-
User and group quotas, unlike data quotas, are stored with the regular filesystem data. This
means that if the filesystem is out of space, you will not be able to make changes to user and group
quotas. You must first make additional space available before modifying user and group
quotas.
-
User and group quotas are sent as part of any remote replication. It is up to the
administrator to ensure that the name service environments are identical on the source and
destination.
-
NDMP backup and restore of an entire share will include any user or group quotas. Restores
into an existing share will not affect any current quotas.
Set User or Group Quotas Using the BUI
-
In the BUI, go to Shares > Shares > General.
-
In the Space Usage - Users and Groups section click the User or Group drop down to select User
or Group and query the current usage for any given user or group within a share or across a
project.
-
In the browser, user quotas are managed from the general tab, under Space Usage -> Users & Groups.
As with viewing usage, the current usage is shown as you type a user or group. Once you have
finished entering the user or group name and the current usage is displayed, the quota can be set by
checking the box next to "quota" and entering a value into the size field. To disable a quota,
uncheck the box. Once any changes have been applied, click the 'Apply' button to make changes.
-
While all the properties on the page are committed together, the user and group quota are
validated separately from the other properties. If an invalid user and group is entered as well as
another invalid property, only one of the validation errors may be displayed. Once that error has
been corrected, an attempt to apply the changes again will show the other error.
Set User or Group Quotas Using the CLI
Identity Management
User and group quotas leverage the Identity Mapping service on the ZFSSA.
This allows users and groups to be specified as either UNIX or Windows identities, depending on the
environment. Like file ownership, these identities are tracked in the following ways:
-
If there is no UNIX mapping, a reference to the windows ID is stored.
-
If there is a UNIX mapping, then the UNIX ID is stored.
This means that the canonical form of the identity is the UNIX ID. If the mapping is changed
later, the new mapping will be enforced based on the new UNIX ID. If a file is created by a Windows
user when no mapping exists, and a mapping is later created, new files will be treated as a
different owner for the purposes of access control and usage format. This also implies that if a
user ID is reused (i.e. a new user name association created), then any existing files or quotas will
appear to be owned by the new user name.
It is recommended that any identity mapping rules be established before attempting to actively
use filesystems. Otherwise, any change in mapping can sometimes have surprising results.