Accessing RFS from the BMRC login nodes¶
We recommend running RFS transfers inside a tmux(How to use tmux?) session to reduce the risk of interruption if your ssh connection drops or your terminal session is disconnected.
The RFS module provides a simple command-line interface for accessing the Research File Service (RFS) from the cluster.
It uses smbclient internally, but common operations such as listing files, uploading data, downloading data, and transferring directories are exposed through the simpler rfs command.
Load the module¶
Load the module before using RFS:
You can view the available commands at any time with:
Authentication¶
There are three ways to authenticate to RFS. You are welcome to choose whichever method best matches your security preferences and how you intend to use the service.
For most interactive use, the recommended method is:
You will be prompted for your RFS/CONNECT username and password.
The credentials are cached temporarily for the current user, allowing subsequent rfs commands to run without repeatedly asking for your password:
The temporary credentials expire automatically after a limited period.
To remove them immediately, run:
rfs logout removes only the temporary credentials created by rfs auth. It does not remove any permanent credentials file you may have created.
use this method only if you are comfortable with storing credentials in your home directory
If you regularly access RFS, you can create:
with the following contents:
The file must only be readable by you:
When this file exists, rfs can use it automatically without prompting for a password.
Because this file contains your password in plain text, use this method only if you are comfortable storing credentials in your home directory.
Listing files and directories¶
List the root of RFS:
List a specific directory:
or:
list is also accepted as an alias for ls.
RFS is not mounted as a filesystem
The rfs command provides access to RFS through a command-line interface; it does not mount RFS as a directory on the cluster.
As a result, you cannot use the normal Linux cd command to move into an RFS directory. Use rfs ls to browse remote directories and specify the remote path directly when using commands such as rfs put and rfs get.
For example:
Creating directories¶
Create a directory on RFS with:
Uploading files¶
Upload a file to the RFS root:
Upload it to a specific remote directory:
push is also accepted as an alias for put.
Uploading directories¶
Directories are detected automatically when uploading.
For example:
uploads the local results directory and its contents into MYPROJECT.
You can also explicitly request recursive transfer with:
The rfs command automatically enables the required recursive smbclient options.
Downloading files¶
Download a remote file into the current directory:
Download it into a specific local directory:
fetch is also accepted as an alias for get.
Downloading directories¶
Use -r when downloading an entire remote directory:
This downloads the directory and its contents recursively.
Typical workflow¶
For an interactive session:
module load RFS
rfs auth
rfs ls MYPROJECT
rfs get -r MYPROJECT/input /scratch/$USER
# Run your analysis...
rfs put results MYPROJECT/output
rfs logout
Authentication summary¶
| Method | Command / file | Credentials retained? | Typical use |
|---|---|---|---|
| Temporary cache | rfs auth |
Temporarily | Recommended for interactive use |
| Credentials file | ~/.rfs_credentials |
Yes | Frequent or automated access |
| Prompt each time | rfs --prompt ... |
No | Users who do not want credentials retained |
For a full list of available commands and options, run: