FUSE implementation of iRODS Client written in Golang
Users are able to mount an iRODS Collection (multiple Collections or DataObjects are also available) on the directory hierarchy. Doing so, data stored on iRODS can be accessed via the directory hierarchy as if they are in local disks.
Pre-built binaries can be found in Release in the repository. Checkout tarballs attached as assets in a release.
iRODS FUSE only works on Linux systems. MacOS (osx) is not supported as FUSE library is not open-source anymore. The binaries run on any Linux distros (e.g., Ubuntu 18.x, Ubuntu 20.x, CentOS 7, or CentOS 8) without requiring any dependencies. Use correct release binaries for your OS and architecture.
Links for iRODS FUSE: https://github.com/cyverse/irodsfs/releases
iRODS FUSE requires libFUSE library to provide file system mount in linux. libFUSE can be installed using linux package managers, such as yum or apt.
In Ubuntu,
sudo apt-get install -y fuseIn CentOS,
sudo yum install -y fuseThis only applies to users who run iRODS FUSE inside docker containers
To use libFUSE in Docker containers, users should launch the docker container in privileged mode using --privileged option.
docker run -ti --privileged <docker_image_name> /bin/bashiRODS FUSE is written in Go. So Go is required to build iRODS FUSE. Note that once iRODS FUSE is built, it does not require Go for running.
To install Go, please refer official installation guide.
To build, some common build essentials, such as Make, are required.
In Ubuntu,
sudo apt-get install -y makeIn CentOS,
sudo yum install -y makeClone the source repository using git or download the zip file of the source.
Clone the source repository using git and build.
git clone https://github.com/cyverse/irodsfs
cd irodsfs
make buildDownload the zip file of the source and build.
curl -L -o irodsfs.zip https://github.com/cyverse/irodsfs/archive/refs/heads/main.zip
unzip irodsfs.zip
cd irodsfs-main
make buildAfter successful build, you will be able to find the binary in bin directory.
Install the latest release for the current Linux architecture with:
curl -fsSL https://raw.githubusercontent.com/cyverse/irodsfs/main/install.sh | bashThe installer downloads the matching GitHub Release archive and installs both
/usr/bin/irodsfs and /sbin/mount.irodsfs. The latter lets mount -t irodsfs ... find the iRODSFS mount helper. This installation does not create
or use a systemd service. Before installing, it verifies that /dev/fuse and
either fusermount3 or fusermount are available.
Usage:
irodsfs [flags] [mount_point]
Flags:
-c, --config string Config file or directory (default: ~/.irods)
-u, --username string iRODS username
--client_username string iRODS client username (for proxy auth)
-p, --password string iRODS password
--url string iRODS URL (e.g., irods://user:pass@host:port/zone/path)
-f, --foreground Run in foreground (default: run as daemon)
-d, --debug Enable debug mode
--readonly Mount read-only
--uid int UID of file/directory owner (default: current user)
--gid int GID of file/directory owner (default: current group)
--sys_user string System user of file/directory owner
--read_ahead_max int Read-ahead buffer size in bytes
--read_write_max int Max read/write size in bytes
--no_transaction Disable iRODS transaction (may improve performance)
-o, --fuse_option strings Additional FUSE mount options
--pool_endpoint string iRODS FUSE Pool Service endpoint
--data_root string Data root directory path
--log_path string Log file path
--instance_id string Instance ID
-v, --version Print version
-h, --help Print help
For a non-anonymous user, if no password is supplied through the configuration,
--password, or the iRODS URL, irodsfs prompts for iRODS Password when it
starts. The entered password is not echoed. This requires an interactive
terminal; provide the password through configuration or a command-line option
when running non-interactively.
irodsfs uses the following exit statuses during startup. They are a stable
process interface for supervisors such as irodsfsd.
| Status | Meaning |
|---|---|
0 |
Normal exit. |
1 |
Unclassified startup failure. |
10 |
Configuration failure before filesystem creation, including work-directory creation or configuration validation. |
11 |
Initial iRODS authentication failure while creating the filesystem. |
Statuses 10 and 11 apply only before the filesystem has been created;
runtime FUSE failures continue to use the ordinary failure status unless a
future documented status is added.
An iRODS user iychoi mounts a collection /iplant/home/iychoi in iRODS Server data.cyverse.org on a local directory /mount/irods.
- iRODS User:
iychoi - iRODS Password:
my_password - iRODS Host:
data.cyverse.org - iRODS Port:
1247 - iRODS Zone:
iplant - iRODS Collection to mount:
/iplant/home/iychoi - Local directory to mount:
/mount/irods
Run irodsfs.
./bin/irodsfs --url irods://iychoi:my_password@data.cyverse.org:1247/iplant/home/iychoi /mount/irodsAfter mounting, irodsfs will be executed in the background. Use -f to run in foreground instead.
Test access the mount.
ls /mount/irodsAn iRODS user iychoi mounts a collection /iplant/home/iychoi in iRODS Server data.cyverse.org on a local directory /mount/irods.
- iRODS User:
iychoi - iRODS Password:
my_password - iRODS Host:
data.cyverse.org - iRODS Port:
1247 - iRODS Zone:
iplant - iRODS Collection to mount:
/iplant/home/iychoi - Local directory to mount:
/mount/irods
Create a config.yaml file.
irods_host: data.cyverse.org
irods_port: 1247
irods_user_name: iychoi
irods_zone_name: iplant
irods_user_password: my_password
path_mappings:
- irods_path: /iplant/home/iychoi
mapping_path: /
resource_type: dirThen run irodsfs with --config or -c option.
./bin/irodsfs -c config.yaml /mount/irodsAfter mounting, irodsfs will be executed in the background.
Test access the mount.
ls /mount/irodsAn iRODS user iychoi mounts a collection /iplant/home/iychoi in iRODS Server data.cyverse.org on a local directory /mount/irods with PAM Authentication (with SSL).
- iRODS User:
iychoi - iRODS Password:
my_password - iRODS Host:
data.cyverse.org - iRODS Port:
1247 - iRODS Zone:
iplant - iRODS Collection to mount:
/iplant/home/iychoi - Local directory to mount:
/mount/irods - Authentication Scheme:
pam_password - CA Cert File:
/home/iychoi/.irods/ca_cert.pem - Encryption Key Size:
32 - Encryption Algorithm:
AES-256-CBC - Encryption Salt Size:
8 - Hash Rounds:
16
Create a config.yaml file.
irods_host: data.cyverse.org
irods_port: 1247
irods_user_name: iychoi
irods_zone_name: iplant
irods_user_password: my_password
irods_authentication_scheme: "pam_password"
irods_ssl_ca_certificate_file: "/home/iychoi/.irods/ca_cert.pem"
irods_encryption_key_size: 32
irods_encryption_algorithm: "AES-256-CBC"
irods_encryption_salt_size: 8
irods_encryption_num_hash_rounds: 16
path_mappings:
- irods_path: /iplant/home/iychoi
mapping_path: /
resource_type: dirThen run irodsfs with --config or -c option.
./bin/irodsfs -c config.yaml /mount/irodsAfter mounting, irodsfs will be executed in the background.
Test access the mount.
ls /mount/irodsAn iRODS user iychoi mounts a collection /iplant/home/iychoi/mount1 and /iplant/home/iychoi/mount2 in iRODS Server data.cyverse.org under a local directory /mount/irods.
- iRODS User:
iychoi - iRODS Host:
data.cyverse.org - iRODS Port:
1247 - iRODS Zone:
iplant - iRODS Collections to mount:
/iplant/home/iychoi/mount1and/iplant/home/iychoi/mount2 - Local directory to mount:
/mount/irods
Create a config.yaml file.
irods_host: data.cyverse.org
irods_port: 1247
irods_user_name: iychoi
irods_zone_name: iplant
irods_user_password: my_password
path_mappings:
- irods_path: /iplant/home/iychoi/mount1
mapping_path: /mount1
resource_type: dir
- irods_path: /iplant/home/iychoi/mount2
mapping_path: /mount2
resource_type: dirThen run irodsfs with --config or -c option.
./bin/irodsfs -c config.yaml /mount/irodsAfter mounting, irodsfs will be executed in the background.
Test access the mount.
ls /mount/irodsAn iRODS user iychoi has iCommands config in ~/.irods.
Run irodsfs without any --config or -c option.
./bin/irodsfs /mount/irodsAfter mounting, irodsfs will be executed in the background.
Test access the mount.
ls /mount/irodsiRODS FUSE can connect to an irodsfs-pool service to share iRODS connections across multiple mount instances, reducing the number of connections to the iRODS server.
./bin/irodsfs -c config.yaml --pool_endpoint localhost:8021 /mount/irodsOr set it in the config file:
pool_endpoint: "localhost:8021"The log level can be set using log_level in the configuration file.
There are 6 log levels configurable (case-insensitive):
- "PANIC"
- "FATAL"
- "WARN"
- "INFO"
- "DEBUG"
- "TRACE"
To set the log level, add a log_level field to the config file.
irods_host: data.cyverse.org
irods_port: 1247
irods_user_name: iychoi
irods_zone_name: iplant
irods_user_password: my_password
log_level: FATAL
path_mappings:
- irods_path: /iplant/home/iychoi
mapping_path: /
resource_type: dirTo mount a collection as read-only, use the --readonly flag or set readonly: true in the config file.
./bin/irodsfs -c config.yaml --readonly /mount/irodsIt is recommended to use fusermount command to unmount iRODS FUSE as it does not require admin permission.
fusermount -u /mount/irodsIt may fail unmounting with device is busy error if you have processes accessing the mount (e.g., shell). In the case, close the processes first and retry unmounting.
Otherwise, you can also try lazy-unmount, which will mark to unmount after the processes using the mount are closed.
fusermount -u -z /mount/irodsIt is also possible to use umount command to unmount iRODS FUSE. But in this case, you will need admin permission (or sudo).
sudo umount /mount/irods