Skip to content

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:

module load RFS

You can view the available commands at any time with:

rfs -h

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:

rfs auth

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:

rfs auth
rfs ls
rfs put results.csv MYPROJECT/results
rfs get MYPROJECT/data.csv

The temporary credentials expire automatically after a limited period.

To remove them immediately, run:

rfs logout

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:

~/.rfs_credentials

with the following contents:

username = your_username
password = your_password
domain = AD-OAK

The file must only be readable by you:

chmod 600 ~/.rfs_credentials

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.

If you do not want credentials to be stored or temporarily cached, use:

rfs --prompt ls

or, for example:

rfs --prompt put results.csv MYPROJECT

You will be asked for your password for that command only.

The password is not retained for subsequent commands.

Listing files and directories

List the root of RFS:

rfs ls

List a specific directory:

rfs ls MYPROJECT

or:

rfs ls MYPROJECT/data

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:

rfs ls MFOLDER
rfs ls MYFOLDER/ProjectA

Creating directories

Create a directory on RFS with:

rfs mkdir MYPROJECT/results

Uploading files

Upload a file to the RFS root:

rfs put results.csv

Upload it to a specific remote directory:

rfs put results.csv MYPROJECT/results

push is also accepted as an alias for put.

Uploading directories

Directories are detected automatically when uploading.

For example:

rfs put results MYPROJECT

uploads the local results directory and its contents into MYPROJECT.

You can also explicitly request recursive transfer with:

rfs put -r results MYPROJECT

The rfs command automatically enables the required recursive smbclient options.

Downloading files

Download a remote file into the current directory:

rfs get MYPROJECT/results.csv

Download it into a specific local directory:

rfs get MYPROJECT/results.csv /scratch/$USER

fetch is also accepted as an alias for get.

Downloading directories

Use -r when downloading an entire remote directory:

rfs get -r MYPROJECT/results /scratch/$USER

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:

rfs -h