quota create

Prev Next

This command creates a quota.

Usage
quota create --name NAME
             --path PATH
             [--grace-period GRACE-PERIOD]
             [--soft-limit SOFT-LIMIT]
             [--hard-limit HARD-LIMIT]
             [--create-dir]
             [--hard-limit-inodes HARD-LIMIT-INODES]
             [--soft-limit-inodes SOFT-LIMIT-INODES]
             [--is-user-quota]
             [--enable-email-providers]
             [--disable-email-providers]
             [--default-user-quota DEFAULT_USER_QUOTA]
             [--default-group-quota DEFAULT_GROUP_QUOTA]
Required Parameters

--name NAME

Specifies the name of the quota.

--path PATH

Specifies a path to a directory in the element store to which the quota applies.

The quota applies to the entire directory, including all subdirectories. If a quota configured on a subdirectory is bigger than the quota on its parent directory, the more restrictive quota applies.

You can specify a non existent directory if you add the --create-dir option to create the directory.

Options

--grace-period GRACE-PERIOD

Triggers an alarm and blocks write operations to the directory if the storage usage continues to exceed the soft limit for a specified time period. 

If no grace period is set, the directory is only blocked if and when usage reaches the hard limit. 

Specify GRACE_PERIOD in the format: [DD] [HH:[MM:]]ss or as an integer followed by d for days, h for hours, m for minutes, or s for seconds. Examples:

  • To specify 30 days, 20 hours, 15 minutes and 10 seconds: --grace-period 30 20:15:10.

  • To specify 18 hours: --grace-period 18:00.

  • To specify 7 days: --grace-period 7d

--soft-limit SOFT-LIMIT

Sets a storage usage soft limit. Warnings of exceeding the quota are issued when this limit is reached.

If not specified, no soft limit is applied.

--hard-limit HARD-LIMIT

Sets a storage usage limit. No writes are allowed beyond this limit.

When the hard limit is reached, the HARD_EXCEEDED alarm is triggered.

The value must be a complete integer and must be specified with a unit of measurement. Do not insert a space between the value and the unit of measurements. Valid units are:

  • Base 10: KB, MB, GB, TB, PB, EB,

  • Base 2: KiB, MiB, GiB, TiB, PiB, EiB

The units are case-insensitive. For example: 4gb is valid. 

If not specified, no hard limit is applied.

--create-dir

Creates the directory if the directory does not exist.

Required if the directory doesn't exist.

--hard-limit-inodes HARD-LIMIT-INODES

Sets a limit on the number of directories and unique files under the path. No writes are allowed beyond this limit. A file with multiple hardlinks is counted only once.

--soft-limit-inodes SOFT-LIMIT-INODES

Sets a soft limit on the number of directories and unique files under the path. Warnings of exceeding the quota are issued when the limit is reached. A file with multiple hardlinks is counted only once.

--is-user-quota

Enables the ability to configure user and/or group quotas on the quota directory,

--enable-email-providers

Relevant for user quotas, enables querying of providers for user email addresses used to send email notifications to users when they exceed user quotas. (Enabled by default.)

--disable-email-providers

Relevant for user quotas, disables querying of providers for user addresses used to send email notifications to users when they exceed user quotas.

--default-user-quota DEFAULT_USER_QUOTA

Specifies the configuration of a default user quota. If configured, the default user quota is applied to users without individual quotas.

For example: --default-user-quota 'soft_limit=4,hard_limit=20,soft_limit_inodes=6,hard_limit_inodes=9,grace_period=00:10:00'

--default-group-quota DEFAULT_GROUP_QUOTA

Specifies the configuration of a default group quota. If configured, the default group quota is applied to groups without individual quotas.

For example: --default-group-quota 'soft_limit=4,hard_limit=20,soft_limit_inodes=6,hard_limit_inodes=9,grace_period=00:10:00'

Example
vcli: admin> quota create --name quota1 --path /dev --grace-period 30 20:15:10 --soft-limit 1tb --hard-limit 2tb --create-dir --hard-limit-inodes 5000 --soft-limit-inodes 4800