From ba92acc96ff317d12f974a9f8fdef8332ff61fbf Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 21 Jan 2022 03:04:18 -0800 Subject: [PATCH] Updated S3 Bucket Quota (markdown) --- S3-Bucket-Quota.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/S3-Bucket-Quota.md b/S3-Bucket-Quota.md index 4a17e88..6dcf9c7 100644 --- a/S3-Bucket-Quota.md +++ b/S3-Bucket-Quota.md @@ -1,4 +1,14 @@ -The bucket quota management is implemented by admin scripts in `weed shell`. +# How it works + +There are two aspects of quota management: "quota configuration" and "quota enforcement". + +"Quota Configuration" is done in by admin scripts in `weed shell`, where you can set/remove/enable/disable bucket quota. + +"Quota Enforcement" is actually also one admin script, which you can run it regularly by adding it to `master.toml`. It will check whether one bucket is over the limit or not, and configure the bucket to be read only or not. + +The bucket read only attribute is checked when filer process write requests. If the bucket is read only, the creation and update requests on this bucket will be denied, except deletion. + +# Quota Configuration and Enforcement **1. View current bucket usage** @@ -22,6 +32,7 @@ updated quota for bucket b1 b3 size:10280 file:3 ``` + **3. Enforce the quota, and found it should be set to read only.** The filer configuration is changed to read only for this bucket.