This is an automated email from the ASF dual-hosted git repository.
sammichen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new a19221c37a HDDS-8630. Document relationship of namespace quota and FS
Trash (#4846)
a19221c37a is described below
commit a19221c37ab6c078278675c8afea68f692baabae
Author: Sumit Agrawal <[email protected]>
AuthorDate: Fri Jun 16 14:41:34 2023 +0530
HDDS-8630. Document relationship of namespace quota and FS Trash (#4846)
---
hadoop-hdds/docs/content/feature/Quota.md | 25 +++++++++++++++++++++++++
hadoop-hdds/docs/content/feature/Quota.zh.md | 24 ++++++++++++++++++++++++
2 files changed, 49 insertions(+)
diff --git a/hadoop-hdds/docs/content/feature/Quota.md
b/hadoop-hdds/docs/content/feature/Quota.md
index afa68b98e1..5f5fbf58e6 100644
--- a/hadoop-hdds/docs/content/feature/Quota.md
+++ b/hadoop-hdds/docs/content/feature/Quota.md
@@ -63,6 +63,31 @@ e. Linked bucket will consume namespace quota of volume.
f. If the cluster is upgraded from old version less than 1.1.0, use of quota
on older volumes and buckets(We can confirm by looking at the info for the
volume or bucket, and if the quota value is -2 then volume or bucket is old) is
not recommended. Since the old key is not counted to the bucket's namespace
quota, the quota setting is inaccurate at this point.
+g. For FSO bucket, while files and directory moving to trash, trash will
consume extra namespace for below cases:
+- for internal directory path of trash in the bucket, i.e.
/.trash/<user>/<current or timestamp>
+- for extra path created while moving file / directory to trash present at
some hierarchy.
+ eg:
+
+```
+- source: /<vol>/<bucket>/dir1/dir2/file.txt
+Scenario 1:
+- move file.txt to trash (while delete operation)
+- trash created with "dir1 and dir2" as extra namespace to have same path as
source in trash:
+ /<vol>/<bucket>/.trash/<user>/current/dir1/dir2/file.txt
+ So this will consume extra name space of "2"
+
+Scenaro 2:
+- move dir2 to trash (while delete operation)
+- trash created with "dir1" as extra namespace
+ /<vol>/<bucket>/.trash/<user>/current/dir1/dir2/file.txt
+ So this will consume extra namespace of "1" for dir1
+
+Scenario 3:
+- move dir1 to trash (while delete operation), in this case, no extra
namespace is required
+ /<vol>/<bucket>/.trash/<user>/current/dir1/dir2/file.txt
+
+```
+
### Note:
- For FSO bucket with recursive deletion of directory, release of quota
happens asynchronously after sub directories and files are removed (when
directory is removed, recursive deletion can be in-progress in background).
diff --git a/hadoop-hdds/docs/content/feature/Quota.zh.md
b/hadoop-hdds/docs/content/feature/Quota.zh.md
index 7d1c7307f5..011b10e049 100644
--- a/hadoop-hdds/docs/content/feature/Quota.zh.md
+++ b/hadoop-hdds/docs/content/feature/Quota.zh.md
@@ -61,6 +61,30 @@ menu:
f.
如果集群从小于1.1.0的旧版本升级而来,则不建议在旧volume和bucket(可以通过查看volume或者bucket的info确认,如果quota值是-2,那么这个volume或者bucket就是旧的)上使用配额。由于旧的key没有计算到bucket的命名空间配额中,所以此时配额设置是不准确的。
+g. 对于FSO bucket, 对移动到垃圾桶的文件和目录,垃圾桶将在以下情况下占用额外的命名空间:
+- 对于桶中垃圾的内部目录路径,即 `/.trash/<user>/<current or timestamp>`
+- 用于将文件/目录移动到垃圾桶中对应层次结构时创建的额外路径。例如:
+
+```
+- 来源:/<vol>/<bucket>/dir1/dir2/file.txt
+场景 1:
+- 将 file.txt 移至回收站(删除操作时)
+- 使用“dir1”和“dir2” 在垃圾桶中创建与来源相同的路径
+ /<vol>/<bucket>/.trash/<user>/current/dir1/dir2/file.txt
+ 所以这将消耗“2”的额外名称空间
+
+场景 2:
+- 将 dir2 移至垃圾箱(删除操作时)
+- 使用“dir1”在垃圾桶中创建与来源相同的路径
+ /<vol>/<bucket>/.trash/<user>/current/dir1/dir2/file.txt
+ 所以这将为 dir1 消耗额外的命名空间“1”
+
+场景 3:
+- 将 dir1 移动到垃圾桶(删除操作时),在这种情况下,不需要额外的命名空间
+ /<vol>/<bucket>/.trash/<user>/current/dir1/dir2/file.txt
+
+```
+
### 笔记
- 对于FSO bucket,当递归删除目录时,配额将在子目录和文件被异步删除后释放(当目录被删除时,递归删除在后台进行)。
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]