quota modify

Prev Next

This command modifies a directory quota.

Usage

quota modify --id ID
             [--name NAME]
             [--enable-email-providers|--disable-email-providers]
           #Options to set directory quota limits
             [--soft-limit LIMIT]
             [--soft-limit-inodes LIMIT]
             [--grace-period PERIOD]
             [--hard-limit LIMIT]       
             [--hard-limit-inodes LIMIT]
           #Options to configure user and group quota rules
             [--enable-user-quota|--disable-user-quota]
             [--default-user-quota LIMITS]
             [--default-group-quota LIMITS]
           #Options to configure quota group membership
             [--quota-groups-ids IDs|--detach-all-quota-groups]

Required Parameters

--id ID

The ID of the quota that you want to modify.

General Options

--name NAME

The name of the quota.

--enable-email-providers

Allows querying providers for email addresses used to send email notifications when a quota limit is exceeded. By default, the querying is allowed.

--disable-email-providers

Prohibits querying providers for email addresses used to send email notifications when a quota limit is exceeded.

Options to Set Directory Quota Limits

--soft-limit LIMIT

The limit of capacity usage.

When this limit is reached, a notification email is sent, and the grace period countdown commences. Writes are blocked only after the grace period expires.

Specify LIMIT as a number followed by units of measure, for example: --soft-limit 1gb

If not specified, no soft limit is applied.

--soft-limit-inodes LIMIT

The limit on the number of directories and unique files that can be created in the quota directory.

When this limit is reached, a notification email is sent, and the grace period countdown commences. Writes are blocked only after the grace period expires.

NOTE: A file with multiple hardlinks is counted only once.

--grace-period PERIOD

A period during which writes to the quota directory are not blocked although a soft limit has been exceeded. 

If the grace period is not set, exceeding a soft limit does not cause blocking of further writes to the quota directory. 

Specify PERIOD as follows:

  • As the number of time units followed by a time unit letter, for example: 10d, 10h, 10m, 10s.

  • The value is case-sensitive, entering 10D or 10H will return an error.

  • In the format [DD] [HH:[MM:]]ss. For example:

    • 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

--hard-limit LIMIT

The limit of capacity usage above which no further writes are allowed.

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

Specify LIMIT as an integer followed by a unit of measure (without a space in between). Valid units are:

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

  • Base2: KiB, MiB, GiB, TiB, PiB, EiB

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

If not specified, no hard limit is applied.

--hard-limit-inodes LIMIT

The limit on the number of directories and unique files that can be created in the quota directory, above which no further writes are allowed.

Note

A file with multiple hardlinks is counted only once.

Specify LIMIT as an integer.

Options to Configure User and Group Quota Rules

--enable-user-quota

Specify this option if you want to enable user and/or group quotas on the quota directory.

If this option is specified, you can set more granular limits for the quota directory as follows:

  • Configure default user and group quota rules using the --default-user-quota and --default-group-quota options.

  • Configure individual quota rules for particular users and/or groups using a set of userquota * commands.

--disable-user-quota

Disables user and/or group quotas on the quota directory.

--default-user-quota LIMITS

This option is used together with --is-user-quota to define default quota rules that will apply to any user for which no individual quota is set. Note that if both default quota rules and individual quotas are defined, the individual quotas override the default ones.

Specify LIMITS as a comma-separated list of options in single quotes.

For example: --default-user-quota 'soft_limit=4gb,hard_limit=20gb,soft_limit_inodes=600,hard_limit_inodes=9000,grace_period=00:10:00'

--default-group-quota LIMITS

This option is used together with --is-user-quota to define default quota rules that will apply to any group for which no individual quota is set. Note that if both default quota rules and individual quotas are defined, the individual quotas override the default ones.

Specify LIMITS as a comma-separated list of options in single quotes.

For example: --default-group-quota 'soft_limit=4gb,hard_limit=20gb,soft_limit_inodes=600,hard_limit_inodes=9000,grace_period=00:10:00'

Options to Configure Quota Group Membership

--quota-groups-ids IDs

Includes the directory quota into a quota group.

Specify IDs as a comma-separated list of quota IDs, for example: --quota-groups-ids 1,4,7

--detach-all-quota-groups

Removes the directory quota from all quota groups.

Example

To set the grace period to 8 hours:

vcli: admin> quota modify --id 4  --grace-period 8h
Are you sure you want to modify the quota? [y/N] y