Bucket quotas don't work the way people think they work, as they cannot enforce hard limits. Deprecate in docs while we sort out what to do with the commands. The future replacement is MinIO Enterprise Catalog. Staged: http://192.241.195.202:9000/staging/deprecate-bucket-quota/linux/reference/minio-mc-deprecated.html See: https://github.com/minio/mc/pull/5011 https://github.com/minio/mc/pull/5012
3.1 KiB
mc quota set
minio
Table of Contents
mc quota set
RELEASE.2022-12-13T00-23-28Z
mc quota set
replaced
mc admin bucket quota --hard
.
RELEASE.2024-07-31T15-58-33Z
mc quota set
is deprecated.
Description
The mc quota set
assigns a hard quota limit to a bucket beyond which MinIO does not allow
writes.
Units of Measurement
The mc quota set --size
flag accepts the following
case-insensitive suffixes to represent the unit of the
specified size value:
Suffix | Unit Size |
---|---|
k |
KB (Kilobyte, 1000 Bytes) |
m |
MB (Megabyte, 1000 Kilobytes) |
g |
GB (Gigabyte, 1000 Megabytes) |
t |
TB (Terabyte, 1000 Gigabytes) |
ki or kib |
KiB (Kibibyte, 1024 Bites) |
mi or mib |
MiB (Mebibyte, 1024 Kibibytes) |
gi or gib |
GiB (Gibibyte, 1024 Mebibytes) |
ti or tib |
TiB (Tebibyte, 1024 Gibibytes) |
Omitting a suffix defaults to bytes
.
Examples
Configure a Hard Quota on a Bucket
Use mc quota set
with the ~mc quota set --size
flag to specify a hard quota
on a bucket. Hard quotas prevent the bucket size from growing past the
specified limit.
mc quota set TARGET/BUCKET --size LIMIT
- Replace
TARGET
with thealias <mc alias>
of a configured MinIO deployment. ReplaceBUCKET
with the name of the bucket on which to set the hard quota. - Replace
LIMIT
with the maximum size to which the bucket can grow as an integer and, as desired, a suffix. For example, to set a hard limit of 10 Terabytes, specify10t
.
Syntax
mc quota set
has
the following syntax:
mc quota set TARGET --size LIMIT
mc quota set
supports the following arguments:
TARGET
The full path to the bucket for which the command creates the quota.
Specify the alias <mc alias>
of the MinIO deployment as a
prefix to the path. For example:
mc quota set play/mybucket --size 10Gi
--size
Sets a maximum limit to the bucket storage size. The MinIO server
rejects any incoming PUT
request whose contents would
exceed the bucket's configured quota.
For example, a hard limit of 10G
would prevent adding
any additional objects if the bucket reaches 10 gigabytes of size.