JindoFuse provides Portable Operating System Interface (POSIX) support for Object Storage Service (OSS) and OSS-HDFS. It lets you mount an OSS bucket or OSS-HDFS path as a local directory, so standard Linux tools — ls, mkdir, cat, cp, and more — work directly against OSS or OSS-HDFS.
JindoFuse does not implement the full POSIX specification. It is optimized for workloads that access OSS or OSS-HDFS through a file system interface. Before you start, check the Supported POSIX operations section to confirm that the operations your workload requires are supported.
Prerequisites
Before you begin, make sure you have:
JindoSDK installed and configured
In an E-MapReduce (EMR) cluster: JindoSDK is pre-installed. To access OSS-HDFS, use EMR V3.42.0 or later, or EMR V5.8.0 or later.
In a non-EMR environment: install JindoSDK first. See Deploy JindoSDK in an environment other than EMR. To access OSS-HDFS, JindoSDK V4.X or later is required.
The required FUSE (Filesystem in Userspace) dependencies installed (see Install dependencies)
An OSS bucket or OSS-HDFS path to mount
Valid Alibaba Cloud credentials (AccessKey ID and AccessKey Secret) with read or write permissions on the target bucket
Install dependencies
Clusters running EMR V3.44.0 or later, EMR V5.10.0 or later, or JindoSDK V4.6.2 or later already have the required dependencies. Skip this section if your cluster meets any of these conditions.
For older clusters, the required dependencies differ by JindoSDK version:
JindoSDK 4.5.0 or earlier — install fuse3:
# CentOS
sudo yum install -y fuse3 fuse3-devel
# Debian
sudo apt install -y fuse3 libfuse3-devJindoSDK 4.5.1 or later — build and install libfuse 3.7 or later. The following commands compile fuse-3.11:
# Build dependencies (Debian: apt install -y pkg-config meson ninja-build)
sudo yum install -y meson ninja-build
# CentOS only: install a newer C++ compiler from devtoolset-8
sudo yum install -y scl-utils
sudo yum install -y alinux-release-experimentals
sudo yum install -y devtoolset-8-gcc devtoolset-8-gdb devtoolset-8-binutils devtoolset-8-make devtoolset-8-gcc-c++
sudo su -c "echo 'source /opt/rh/devtoolset-8/enable' > /etc/profile.d/g++.sh"
source /opt/rh/devtoolset-8/enable
sudo ln -s /opt/rh/devtoolset-8/root/bin/gcc /usr/local/bin/gcc
sudo ln -s /opt/rh/devtoolset-8/root/bin/g++ /usr/local/bin/g++
# Download and compile libfuse
wget https://github.com/libfuse/libfuse/releases/download/fuse-3.11.0/fuse-3.11.0.tar.xz
xz -d fuse-3.11.0.tar.xz
tar xf fuse-3.11.0.tar
cd fuse-3.11.0/
mkdir build; cd build
meson ..
sudo ninja installMount JindoFuse
Create a local mount point:
mkdir -p <mount_point>Replace
<mount_point>with a local path, for example/mnt/oss.Mount the OSS or OSS-HDFS path:
jindo-fuse <mount_point> -ouri=<oss_path>Replace
<oss_path>with the OSS or OSS-HDFS path to map. The path can be the root directory or a subdirectory of a bucket, for exampleoss://examplebucket.cn-shanghai.oss-dls.aliyuncs.com/subdir/. OSS and OSS-HDFS mount commands are identical — only the endpoint in the path differs. This command starts a daemon process in the background.Verify that JindoFuse is running:
ps -ef | grep jindo-fuseIf the
jindo-fuseprocess is listed with the expected startup parameters, the mount is active.
Access files through the mount point
With JindoFuse mounted at /mnt/oss/, use standard Linux commands to work with your files:
# List the top-level contents
ls /mnt/oss/
# Create a directory
mkdir /mnt/oss/dir1
# Write a file
echo "hello world" > /mnt/oss/dir1/hello.txt
# Read the file back
cat /mnt/oss/dir1/hello.txt
# Output: hello world
# Delete a directory and its contents
rm -rf /mnt/oss/dir1/Unmount JindoFuse
To unmount a mount point, run:
umount <mount_point>Alternatively, pass -oauto_unmount when mounting. With this option, sending SIGINT to the jindo-fuse process automatically unmounts the mount point before the process exits:
killall -9 jindo-fuseSupported POSIX operations
Most standard file system operations work on both OSS and OSS-HDFS. The table below lists all supported operations and highlights where OSS differs from OSS-HDFS.
| Operation | Description | OSS | OSS-HDFS |
|---|---|---|---|
getattr() | Get file attributes | Supported | Supported |
mkdir() | Create a directory | Supported | Supported |
rmdir() | Delete a directory | Supported | Supported |
unlink() | Delete a file | Supported | Supported |
rename() | Rename a file | Supported | Supported |
read() | Sequential read | Supported | Supported |
pread() | Random read | Supported | Supported |
write() | Sequential write | Supported | Supported |
pwrite() | Random write | Not supported | Supported |
flush() | Flush data to kernel cache | JindoFuse earlier than 6.7.0: append mode only. JindoFuse 6.7.0 and later: supported by default. See How flush() works in OSS. | Supported |
fsync() | Flush data to disk | Append mode only | Supported |
release() | Release a file | Supported | Supported |
readdir() | Read a directory | Supported | Supported |
create() | Create a file | Supported | Supported |
open() O_APPEND | Open in append mode | Supported. See AppendObject limits. | Supported |
open() O_TRUNC | Open in overwrite mode | Supported | Supported |
ftruncate() | Truncate an open file | Not supported | Supported |
truncate() | Truncate a closed file | Not supported | Supported |
lseek() | Set read/write position | Not supported | Supported |
chmod() | Change file permissions | Not supported | Supported |
access() | Check file permissions | Supported | Supported |
utimes() | Change timestamps | Not supported | Supported |
setxattr() | Set extended attributes | Not supported | Supported |
getxattr() | Get extended attributes | Not supported | Supported |
listxattr() | List extended attributes | Not supported | Supported |
removexattr() | Remove extended attributes | Not supported | Supported |
lock() | POSIX file lock | Not supported | Supported |
fallocate() | Pre-allocate disk space | Not supported | Supported |
symlink() | Create a symbolic link | Not supported | Supported for internal use only; cache acceleration is not supported |
readlink() | Read a symbolic link | Not supported | Supported |
Advanced usage
Mount parameters
Pass parameters at mount time to control JindoFuse behavior. Parameters specified at mount time take precedence over values in the configuration file.
jindo-fuse <mount_point> -ouri=[<oss_path>] -ofs.oss.endpoint=[<endpoint>] -ofs.oss.accessKeyId=[<access_key_id>] -ofs.oss.accessKeySecret=[<access_key_secret>]| Parameter | Required | Minimum version | Description | Example |
|---|---|---|---|---|
uri | Yes | JindoData 4.3.0 | OSS path to mount (root or subdirectory) | -ouri=oss://examplebucket/ |
f | No | JindoData 4.3.0 | Run JindoFuse in the foreground instead of as a daemon. Enable terminal logs when using this option. | -f |
d | No | JindoData 4.3.0 | Enable debug mode (also runs in the foreground). Enable terminal logs when using this option. | -d |
auto_unmount | No | JindoData 4.3.0 | Automatically unmount the mount point when the JindoFuse process exits | -oauto_unmount |
ro | No | JindoData 4.3.0 | Mount in read-only mode; write operations are rejected | -oro |
direct_io | No | JindoData 4.3.0 | Bypass the page cache for reads and writes | -odirect_io |
kernel_cache | No | JindoData 4.3.0 | Use the kernel cache to improve read performance | -okernel_cache |
auto_cache | No | JindoData 4.3.0 | Similar to kernel_cache, but invalidates the cache when file size or modification time changes. Enabled by default. | — |
entry_timeout | No | JindoData 4.3.0 | How long to cache directory entry names, in seconds. Default: 60. Set to 0 to disable caching. | -oentry_timeout=60 |
attr_timeout | No | JindoData 4.3.0 | How long to cache file attributes, in seconds. Default: 60. Set to 0 to disable caching. | -oattr_timeout=60 |
negative_timeout | No | JindoData 4.3.0 | How long to cache failed lookups, in seconds. Default: 60. Set to 0 to disable caching. | -onegative_timeout=0 |
max_idle_threads | No | JindoData 4.3.0 | Number of idle threads available for kernel callbacks. Default: 10. | -omax_idle_threads=10 |
xengine | No | JindoData 4.3.0 | Enable the local cache acceleration feature | -oxengine |
pread | No | JindoData 4.5.1 | Use random reads instead of sequential reads. Use this for workloads with far more random reads than sequential reads. | -opread |
no_symlink | No | JindoData 4.5.1 | Disable symbolic link support | -ono_symlink |
no_writeback | No | JindoData 4.5.1 | Disable write-back caching | -ono_writeback |
no_flock | No | JindoData 4.5.1 | Disable flock file locking | -ono_flock |
no_xattr | No | JindoData 4.5.1 | Disable extended attribute (xattr) support | -ono_xattr |
Configuration parameters
Set these parameters in the JindoSDK configuration file. Mount-time parameters override them.
| Parameter | Default | Description |
|---|---|---|
logger.dir | /tmp/bigboot-log | Log directory. Created automatically if it does not exist. |
logger.sync | false | false = write logs asynchronously |
logger.consolelogger | false | Print logs to the terminal |
logger.level | 2 | Minimum log level to write. 0=TRACE, 1=DEBUG, 2=INFO, 3=WARN, 4=ERROR, 5=CRITICAL, 6=OFF |
logger.verbose | 0 | Minimum verbose log level to write (0–99). 0 disables verbose logs. |
logger.cleaner.enable | false | Enable automatic log cleanup |
fs.oss.endpoint | — | Endpoint for accessing JindoFS, for example oss-cn-xxx.aliyuncs.com |
fs.oss.accessKeyId | — | AccessKey ID for JindoFS |
fs.oss.accessKeySecret | — | AccessKey Secret for JindoFS |
FAQ
How do I identify the cause of an error?
JindoFuse can only surface the error codes preset by the operating system, which are often not specific enough to diagnose the root cause. For detailed error messages from JindoSDK, check the jindosdk.log file in the directory specified by the logger.dir configuration parameter (default: /tmp/bigboot-log).
How flush() works in OSS
The behavior of flush() on OSS depends on the JindoFuse version:
JindoFuse earlier than 6.7.0:
Append mode: Closing a file (
close()) triggersflush(), which flushes buffered data to the kernel cache and then writes it to OSS viaAppendObject. See AppendObject limits for restrictions.Other modes:
flush()has no effect. Data is not written to OSS when the file is closed.
JindoFuse 6.7.0 and later:
The fs.oss.fuse.flush.enable parameter defaults to true. With this setting:
flush()writes data to OSS regardless of how the file was opened (open(),O_APPEND, or other modes), without affecting OSS-HDFS.Data is written using
PutObjector multipart upload (MPU), notAppendObject.Calling
flush()on an existing object, or callingflush()twice on a new object, increases I/O costs because JindoFuse must re-read and re-upload the data.
Set fs.oss.fuse.flush.enable=false to revert to append-mode-only behavior.