mc admin bucket quota

Syntax

The mc admin bucket quota command configures, displays, or clears a hard quota on a bucket. When a bucket reaches its configured hard quota, MinIO AIStor rejects further write operations until data is removed to bring usage below the limit.

See Bucket Quotas for a complete overview of quota behavior and monitoring.

mc admin [GLOBALFLAGS] bucket quota ALIAS/BUCKET [FLAGS]

Parameters

ALIAS/BUCKET

Required

The alias of the MinIO AIStor cluster and the target bucket, in the format ALIAS/BUCKET.

For example: myminio/mybucket

--hard

Optional

Set a hard quota on the bucket. The value must include a size unit suffix, for example 1gb, 10gb, or 500mb.

When the total size of objects in the bucket reaches this limit, MinIO AIStor rejects any further PUT operations.

--clear

Optional

Remove the quota configuration from the bucket.

Global flags

This command supports any of the global flags.

Examples

Set a hard quota

The following command sets a 1 GB hard quota on the mybucket bucket:

mc admin bucket quota myminio/mybucket --hard 1gb

View the current quota

The following command displays the quota configuration for the mybucket bucket:

mc admin bucket quota myminio/mybucket

Clear a quota

The following command removes the quota from the mybucket bucket:

mc admin bucket quota myminio/mybucket --clear

Permissions

This command requires one of the following admin permissions:

Permission Description
admin:SetBucketQuota Required to set or clear a bucket quota.
admin:GetBucketQuota Required to view the current bucket quota.