mc admin bucket quota
Changed in version RELEASE.2022-12-13T00-23-28Z: mc admin bucket quota replaced by:
Description
The mc admin bucket quota command manages per-bucket
storage quotas.
Use mc admin on MinIO Deployments Only
MinIO does not support using mc admin commands with other
S3-compatible services, regardless of their claimed compatibility with MinIO
deployments.
Units of Measurement
The mc admin bucket quota --hard flag
accepts the following case-insensitive suffixes to represent the unit of the
specified size value:
Suffix |
Unit Size |
|---|---|
|
KB (Kilobyte, 1000 Bytes) |
|
MB (Megabyte, 1000 Kilobytes) |
|
GB (Gigabyte, 1000 Megabytes) |
|
TB (Terrabyte, 1000 Gigabytes) |
|
KiB (Kibibyte, 1024 Bites) |
|
MiB (Mebibyte, 1024 Kibibytes) |
|
GiB (Gibibyte, 1024 Mebibytes) |
|
TiB (Tebibyte, 1024 Gibibytes) |
Omitting the suffix defaults to bytes.
Examples
Configure a Hard Quota on a Bucket
Use mc admin bucket quota with the
--hard flag to specify a hard quota
on a bucket. Hard quotas prevent the bucket size from growing past the specified
limit.
mc admin bucket quota TARGET/BUCKET --hard LIMIT
Replace
TARGETwith thealiasof a configured MinIO deployment. ReplaceBUCKETwith the name of the bucket on which to set the hard quota.Replace
LIMITwith the maximum size to which the bucket can grow. For example, to set a hard limit of 10 Terrabytes, specify10t. See Units of Measurement for supported units.
Retrieve Bucket Quota Configuration
Use mc admin bucket quota to retrieve the current quota configuration
for a bucket:
mc admin bucket quota TARGET/BUCKET
Replace TARGET with the alias of a configured
MinIO deployment. Replace BUCKET with the name of the bucket on which to
retrieve the quota.
Clear Configured Bucket Quota
Use mc admin bucket quota with the
--clear flag to clear all quotas from
a bucket.
mc admin bucket quota TARGET/BUCKET --clear
Replace
TARGETwith thealiasof a configured MinIO deployment. ReplaceBUCKETwith the name of the bucket on which to clear the quota.
Syntax
mc admin bucket quota has the following syntax:
mc admin bucket quota TARGET [ARGUMENTS]
mc admin bucket quota supports the following arguments:
- TARGET
The full path to the bucket for which the command creates the quota. Specify the
aliasof the MinIO deployment as a prefix to the path. For example:mc admin bucket quota play/mybucket
Omit all other arguments to return the current quota settings for the specified bucket.
- --hard
Sets a maximum limit to the bucket storage size. The MinIO server rejects any incoming
PUTrequest whose contents would exceed the bucket’s configured quota.For example, a hard limit of
10GBwould prevent adding any additional objects if the bucket reaches10GBof size.See Units of Measurement for supported unit sizes.