Go to main content

Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.x

Exit Print View

Updated: September 2017
 
 

Setting User or Group Quotas (CLI)

Quotas can be set for a user or group at the project or filesystem level.

  1. Go to shares, select a project, then select a share, as shown in this example:
    hostname:> shares select default select eschrock
  2. Enter users, then list to see the current users.
    hostname:shares default/eschrock> users          
    hostname:shares default/eschrock users> list
    USER       NAME                            USAGE  QUOTA  SOURCE
    user-000   root                             321K      -       -
    user-001   ahl                             9.94K      -       -
    user-002   eschrock                        20.0G      -       -
    

    Note -  Any user that is not consuming any space on the filesystem, and does not have any quota set, does not appear in the list of active users.
  3. Enter select and the name= of the user.
    hostname:shares default/eschrock users> select name=eschrock 
    hostname:shares default/eschrock user-002> get               
                              name = eschrock      
                          unixname = eschrock
                            unixid = 132651
                           winname = (unset)
                             winid = (unset)
                             usage = 20.0G
                             quota = (unset)
                            source = (unset)
  4. Enter quota= and a value. Enter commit and done.

    Note -  To clear a quota, set the value to '0'.
    hostname:shares default/eschrock user-002> set quota=100G
                             quota = 100G (uncommitted)       
    hostname:shares default/eschrock user-002> commit
    hostname:shares default/eschrock user-002> done  
    
  5. To set a quota for such a user or group, use the quota command, after which the name and quota can be set.

    The Source column displays "local" if the quota was set at the filesystem level, "default" if set at the project level, or "-" if no quota was set. In the following example, the default user quota set at the project level is 50 GB.

    If a default user or group quota was set at the project level, this procedure overrides that value.

    hostname:shares default/eschrock users> quota  
    hostname:shares default/eschrock users quota (uncomitted)> set name=bmc
                              name = bmc (uncommitted)                      
    hostname:shares default/eschrock users quota (uncomitted)> set quota=default
                             quota = default (uncommitted)                       
    hostname:shares default/eschrock users quota (uncomitted)> commit
    hostname:shares default/eschrock users> list                     
    USER       NAME                            USAGE  QUOTA  SOURCE
    user-000   root                             321K      -       -
    user-001   ahl                             9.94K      -       -
    user-002   eschrock                        20.0G   100G   local
    user-003   bmc                                 -   50G  default

Related Topics