-
Notifications
You must be signed in to change notification settings - Fork 615
HDDS-4594. Add namespace quota to documentation #1736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
0fb1382
2054a00
ecea67e
86a955d
faa32ed
db4feec
61e9b6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,20 @@ menu: | |
|
|
||
| f. 如果volume quota被启用,那么bucket quota将不能被清除。 | ||
|
|
||
| 2. 命名空间配额 | ||
|
|
||
| 管理员应当能够定义一个Volume或Bucket可以使用多少命名空间。目前支持命名空间的配额设置为: | ||
|
|
||
| a. 默认情况下volume和bucket的命名空间配额不启用(即无限配额)。 | ||
|
|
||
| b. 当volume命名空间配额启用时,该volume的bucket数目不能超过此配额。 | ||
|
|
||
| c. 当bucket的命名空间配额启用时,该bucket的key数目不能超过此配额。 | ||
|
|
||
| d. Linked bucket不消耗命名空间配额。 | ||
|
|
||
| e. 如果集群从小于1.1.0的旧版本升级而来,则不建议在旧volume和bucket(可以通过查看volume或者bucket的info确认,如果quota值是-2,那么这个volume或者bucket就是旧的)上使用配额。由于旧的key没有计算到bucket的命名空间配额中,所以此时配额设置是不准确的。 | ||
|
|
||
| ## 客户端用法 | ||
| ### Storage space级别配额 | ||
| Storage space级别配额允许使用 KB(k),MB(m),GB(g),TB(t), PB(p)等单位。表示将使用多少个存储空间。 | ||
|
|
@@ -70,10 +84,35 @@ bin/ozone sh bucket setquota --space-quota 10GB /volume1/bucket1 | |
|
|
||
| bucket的总配额 不应大于其Volume的配额。让我们看一个例子,如果我们有一个10MB的Volume,该volume下所有bucket的大小之和不能超过10MB,否则设置bucket quota将失败。 | ||
|
|
||
| ### Namespace quota | ||
| 命名空间配额是一个数字,其代表由多少个名字能够使用。这个数字不能超过Java long数据类型的最大值。 | ||
|
|
||
| #### Volume Namespace quota | ||
| ```shell | ||
| bin/ozone sh volume create --namespace-quota 100 /volume1 | ||
| ``` | ||
| 这意味着将volume1的命名空间配额设置为100。 | ||
|
|
||
| ```shell | ||
| bin/ozone sh volume setquota --namespace-quota 1000 /volume1 | ||
| ``` | ||
| 此行为将volume1的命名空间配额更改为1000。 | ||
|
|
||
| #### Bucket Namespace quota | ||
| ```shell | ||
| bin/ozone sh bucket create --namespace-quota 100 /volume1/bucket1 | ||
| ``` | ||
| 这意味着bucket1允许我们使用100的命名空间。 | ||
|
|
||
| ```shell | ||
| bin/ozone sh bucket setquota --namespace-quota 1000 /volume1/bucket1 | ||
| ``` | ||
| 该行为将bucket1的命名空间配额更改为1000。 | ||
|
|
||
| #### 清除volume和bucket的配额 | ||
| ```shell | ||
| bin/ozone sh volume clrquota --space-quota /volume1 | ||
| bin/ozone sh bucket clrquota --space-quota /volume1/bucket1 | ||
| bin/ozone sh volume clrquota --space-quota --namespace-quota /volume1 | ||
| bin/ozone sh bucket clrquota --space-quota --namespace-quota /volume1/bucket1 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's something wrong with the directory structure. At present is: We can change it to:
or
…… |
||
| ``` | ||
| #### 查看volume和bucket的quota值以及usedBytes | ||
| ```shell | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether 'e' in Storage Space applies equally to Namespace quota. If so, we need to list.