This is an automated email from the ASF dual-hosted git repository.
siyao 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 ecaa76b669 HDDS-8527. Update Ofs (HCFS) doc to describe shared tmp dir
(#4648)
ecaa76b669 is described below
commit ecaa76b669a44dfef53f3004b1b2937ca5440d16
Author: Neil Joshi <[email protected]>
AuthorDate: Thu May 4 13:52:01 2023 -0600
HDDS-8527. Update Ofs (HCFS) doc to describe shared tmp dir (#4648)
---
hadoop-hdds/docs/content/interface/Ofs.md | 38 +++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdds/docs/content/interface/Ofs.md
b/hadoop-hdds/docs/content/interface/Ofs.md
index 0ad5339411..3c3598b3ed 100644
--- a/hadoop-hdds/docs/content/interface/Ofs.md
+++ b/hadoop-hdds/docs/content/interface/Ofs.md
@@ -160,12 +160,18 @@ $ ozone fs -mkdir -p /volume_1
mkdir: Bucket or Volume name has an unsupported character : _
```
-## Mounts
+## Mounts and Configuring /tmp
In order to be compatible with legacy Hadoop applications that use /tmp/,
we have a special temp mount located at the root of the FS.
This feature may be expanded in the feature to support custom mount paths.
+Currently Ozone supports two configurations for /tmp. The first (default),
+is a tmp directory for each user comprised of a mount volume with a
+user specific temp bucket. The second (configurable through ozone-site.xml),
+a sticky-bit like tmp directory common to all users comprised of a mount
+volume and a common temp bucket.
+
Important: To use it, first, an **admin** needs to create the volume tmp
(the volume name is hardcoded for now) and set its ACL to world ALL access.
Namely:
@@ -175,7 +181,9 @@ $ ozone sh volume create tmp
$ ozone sh volume setacl tmp -al world::a
```
-These commands only needs to be done **once per cluster**.
+These commands only need to be done **once per cluster**.
+
+### For /tmp directory per user (default)
Then, **each user** needs to mkdir first to initialize their own temp bucket
once.
@@ -192,6 +200,32 @@ directory. e.g.:
$ ozone fs -touch /tmp/key1
```
+### For a sharable /tmp directory common to all users
+
+To enable the sticky-bit common /tmp directory, update the ozone-site.xml with
+the following property
+
+```xml
+<property>
+ <name>ozone.om.enable.ofs.shared.tmp.dir</name>
+ <value>true</value>
+</property>
+```
+Then after setting up the volume tmp as **admin**, also configure a tmp bucket
that
+serves as the common /tmp directory for all users, for example,
+```bash
+$ ozone sh bucket create /tmp/tmp
+$ ozone sh volume setacl tmp -a user:anyuser:rwlc \
+ user:adminuser:a,group:anyuser:rwlc,group:adminuser:a tmp/tmp
+```
+where, anyuser is username(s) admin wants to grant access and,
+adminuser is the admin username.
+
+Users then access the tmp directory as,
+```bash
+$ ozone fs -put ./NOTICE.txt ofs://om/tmp/key1
+```
+
## Delete with trash enabled
In order to enable trash in Ozone, Please add these configs to core-site.xml
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]