Bucket Quotas
MinIO AIStor supports setting hard quotas on buckets to limit the total amount of data a bucket can store. When a bucket reaches its configured quota, MinIO AIStor rejects further write operations to that bucket until data is removed to bring usage below the limit.
Set a hard quota
Use mc admin bucket quota to set a hard quota on a bucket.
The --hard flag specifies the maximum storage size for the bucket.
mc admin bucket quota ALIAS/BUCKET --hard SIZE
Replace SIZE with a value and unit suffix, for example 1gb, 10gb, or 500mb.
The following example sets a 1 GB hard quota on the mybucket bucket:
mc admin bucket quota myminio/mybucket --hard 1gb
When the total size of objects in the bucket reaches the quota, MinIO AIStor returns an error for any further PUT operations.
Verify the quota
To view the current quota configuration for a bucket:
mc admin bucket quota ALIAS/BUCKET
Clear a quota
To remove the quota from a bucket:
mc admin bucket quota ALIAS/BUCKET --clear
Required permissions
The user or service account performing quota operations must have the following admin permissions:
| Permission | Description |
|---|---|
admin:SetBucketQuota |
Allows setting or clearing a bucket quota. |
admin:GetBucketQuota |
Allows retrieving the current bucket quota. |
The built-in consoleAdmin policy includes both of these permissions.
Monitoring
MinIO AIStor exposes bucket quota metrics for integration with Prometheus or other monitoring systems:
- v3 metric:
minio_cluster_usage_buckets_quota_total_bytes(labels:bucket) - v2 metric:
minio_bucket_quota_total_bytes(labels:bucket,server)
See Metrics and Alerts for more information on configuring monitoring.