Default quota type

Default quotas automatically create other quotas for users or groups in a specified directory.

A default quota specifies a policy for new entities that match a trigger. The default-user@/ifs/cs becomes specific-user@/ifs/cs for each specific-user that is not otherwise defined.

For example, you can create a default-user quota on the /ifs/dir-1 directory, where that directory is owned by the root user. The default-user type automatically creates a domain on that directory for root and adds the usage there:
my-OneFS-1# mkdir /ifs/dir-1
my-OneFS-1# isi quota quotas create /ifs/dir-1 default-user
my-OneFS-1# isi quota quotas ls --path=/ifs/dir-1 
Type         AppliesTo  Path       Snap  Hard  Soft  Adv  Used
---------------------------------------------------------------
default-user DEFAULT    /ifs/dir-1 No    -     -     -    0b
user         root       /ifs/dir-1 No    -     -     -    0b
---------------------------------------------------------------
Now add a file owned by a different user (admin):
my-OneFS-1# touch /ifs/dir-1/somefile
my-OneFS-1# chown admin /ifs/dir-1/somefile
my-OneFS-1# isi quota quotas ls --path=/ifs/dir-1
Type         AppliesTo  Path       Snap  Hard  Soft  Adv  Used
---------------------------------------------------------------
default-user DEFAULT    /ifs/dir-1 No    -     -     -    0b
user         root       /ifs/dir-1 No    -     -     -    26b
user         admin      /ifs/dir-1 No    -     -     -    0b
---------------------------------------------------------------
Total: 3

In this example, the default-user type created a specific-user type automatically (user:admin) and added the new usage to it. Default-user does not have any usage because it is used only to generate new quotas automatically. Default-user enforcement is copied to a specific-user (user:admin), and the inherited quota is called a linked quota. In this way, each user account gets its own usage accounting.

Defaults can overlap. For example, default-user@/ifs/dir-1 and default-user@/ifs/cs both may be defined. If the default enforcement changes, OneFS storage quotas propagate the changes to the linked quotas asynchronously. Because the update is asynchronous, there is some delay before updates are in effect. If a default type, such as every user or every group, is deleted, OneFS deletes all children that are marked as inherited. As an option, you can delete the default without deleting the children, but it is important to note that this action breaks inheritance on all inherited children.

Continuing with the example, add another file owned by the root user. Because the root type exists, the new usage is added to it.

my-OneFS-1# touch /ifs/dir-1/anotherfile
my-OneFS-1# isi quota ls -v --path=/ifs/dir-1 --format=list
      Type: default-user
 AppliesTo: DEFAULT
      Path: /ifs/dir-1
      Snap: No
Thresholds
          Hard : -
          Soft : -
           Adv : -
         Grace : -
     Usage
            Files : 0
    With Overhead : 0.00b
     W/O Overhead : 0.00b
      Over: -
  Enforced: No
 Container: No
    Linked: -
----------------------------------------------------------------------
      Type: user
 AppliesTo: root
      Path: /ifs/dir-1
      Snap: No
Thresholds
          Hard : -
          Soft : -
           Adv : -
         Grace : -
     Usage
            Files : 2
    With Overhead : 3.50K
     W/O Overhead : 55.00b
      Over: -
  Enforced: No
 Container: No
    Linked: Yes
-----------------------------------------------------------------------
      Type: user
 AppliesTo: admin
      Path: /ifs/dir-1
      Snap: No
Thresholds
          Hard : -
          Soft : -
           Adv : -
         Grace : -
     Usage
            Files : 1
    With Overhead : 1.50K
     W/O Overhead : 0.00b
      Over: -
  Enforced: No
 Container: No
    Linked: Yes

The enforcement on default-user is copied to the specific-user when the specific-user allocates within the type, and the new inherited quota type is also a linked quota.

Note Image

Configuration changes for linked quotas must be made on the parent quota that the linked quota is inheriting from. Changes to the parent quota are propagated to all children. To override configuration from the parent quota, unlink the quota first.