mc quota set
The mc quota set command sets a hard quota on a bucket.
When the total size of objects in the bucket reaches this limit, MinIO AIStor rejects any further PUT operations.
See Bucket Quotas for a complete overview of quota behavior and monitoring.
Syntax
Parameters
ALIAS
Required
The alias of the MinIO AIStor cluster, in the format ALIAS.
For example: myminio
BUCKET
Required
The name of the target bucket, in the format BUCKET.
For example: mybucket
--size
Required
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.
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 quota set myminio/mybucket --size 1GB
Set a 500 MB hard quota
The following command sets a 500 MB hard quota on the mybucket bucket:
mc quota set myminio/mybucket --size 500MB
Permissions
The user or service account performing this operation must have the following admin permission:
| Permission | Description |
|---|---|
admin:SetBucketQuota |
Required to set or clear a bucket quota. |
The built-in consoleAdmin policy includes this permission.
Behavior
S3 compatibility
The mc command-line tool is built for compatibility with the AWS S3 API and is tested with MinIO AIStor and AWS S3 for expected functionality and behavior.
MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported.
While mc commands may work as documented, any such usage is at your own risk.