mc admin bucket 命令用来管理 MinIO 服务器中定义的桶,语法如下:
C:\>mc admin bucket -h NAME: mc admin bucket - manage buckets defined in the MinIO server USAGE: mc admin bucket COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...] COMMANDS: remote configure remote target buckets quota manage bucket quota FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
该命令用来管理 MinIO 服务中每个存储桶的存储配额。语法如下:
C:\>mc admin bucket quota -h NAME: mc admin bucket quota - manage bucket quota USAGE: mc admin bucket quota TARGET [--fifo QUOTA | --hard QUOTA | --clear] QUOTA quota accepts human-readable case-insensitive number suffixes such as "k", "m", "g" and "t" referring to the metric units KB, MB, GB and TB respectively. Adding an "i" to these prefixes, uses the IEC units, so that "gi" refers to "gibibyte" or "GiB". A "b" at the end is also accepted. Without suffixes the unit is bytes. 配额接受人类可读的不区分大小写的数字 后缀,如 “k”、“m”、“g” 和 “t”,指的是公制单位 KB, MB、GB 和 TB。在这些前缀中添加 “i”,使用 IEC 单位,所以 “gi” 指的是 “gibibyte” 或 “GiB”。 也接受末尾的“b”。没有后缀的单位是字节。 FLAGS: --fifo value set fifo quota, allowing automatic deletion of older content --hard value set a hard quota, disallowing writes after quota is reached --clear clears bucket quota configured for bucket --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
(1)在 MinIO 上显示为 “mybucket” 配置的存储桶配额。
C:\> mc admin bucket quota myminio/mybucket
(2)为 MinIO 上的存储桶 “mybucket” 设置 FIFO 配额。
C:\> mc admin bucket quota myminio/mybucket --fifo 10GB
(3)在 MinIO 上为存储桶 “mybucket” 设置 1gb 的硬配额。
C:\> mc admin bucket quota myminio/mybucket --hard 1GB
(4)清除 MinIO 上为存储桶 “mybucket” 配置的存储桶配额。
C:\> mc admin bucket quota myminio/mybucket --clear
该命令用来配置远程目标存储桶,语法如下:
C:\> mc admin bucket remote -h NAME: mc admin bucket remote - configure remote target buckets USAGE: mc admin bucket remote COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...] COMMANDS: add add a new remote target edit edit remote target ls list remote target ARN(s) rm remove configured remote target bandwidth Show bandwidth info for buckets on the MinIO server in bits or bytes per second. Ki,Bi,Mi,Gi represent IEC units. FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
该命令提供了 add、edit、ls、rm 等子命令去管理远程目标存储桶,它们具体用法如下:
命令 | 描述 |
add | 添加新的远程目标 |
edit | 编辑已存在的远程目标 |
rm | 删除已存在的远程目标 |
ls | 列出远程目标 ARN |
bandwidth | 以每秒比特数或字节数显示 MinIO 服务器上存储桶的带宽信息 |