Storage

Add storage to Neurodesktop

Drag and Drop support

You can drag-and-drop files into the browser window to get files into the Neurodesktop. This will then start a file upload:

{538BB51E-0FEB-46EA-B1B8-FDF122776735}

To download files from the desktop using the same mechanism you need to open the guacamole settings by pressing CTRL-ALT-SHIFT (Control-Command-Shift on Mac). This will open a menu on the side:

{A12EDB8A-3D01-4524-A7B5-24E5E94FB418}

where you can click on “Shared Drive”:

{645953A1-5D11-48C7-9DFB-25D4339EEA34}

and a click (or double clink on Mac) on the file will start the download.

You can browse into folders in the shared drive by clicking (double clicking on Mac) on them. To get back to the base of the shared drive, press on the drive icon in the top left of the side menu (just below the “Shared Drive” title).

To close the side menu, click on CTRL-ALT-SHIFT once more (Control-Command-Shift on Mac).

Data directory connection to the host computer

If you are running Neurodesktop on your own hardware there will be a direct connection between the “Storage” folder on the Destkop, which is a link to “/neurodesktop-storage” and a “neurodesktop-storage” folder on your C-drive (Windows) or home directory (Mac/Linux). This connection can be used for data processing and data transfer.

Mounting external storage on your host-computer

The -v C:/neurodesktop-storage:/neurodesktop-storage part of the docker command links the directory “neurodesktop-storage” on the “C drive” of your Windows computer to the directory /neurodesktop-storage inside the Desktop environment. Everything you store in there will be available inside the desktop and on the host computer. You can also mount additional directories by adding another -v parameter set (e.g. -v D:/moredata:/data) - this will mount the directory moredata from your D drive to /data inside neurodesktop. Improtant: the mountpoint inside neurodesktop should be named /data (or anything from this list: https://github.com/NeuroDesk/neurocontainers/blob/master/recipes/globalMountPointList.txt) - otherwise most of the tools will not be able to access the data.

Here is an example for Windows adding another storage directory:

docker run --shm-size=1gb -it --privileged --name neurodesktop -v C:/neurodesktop-storage:/neurodesktop-storage -v D:/moredata:/data -p 8080:8080 -h neurodesktop-20220813 vnmd/neurodesktop:20220813

Cloud-storage

Another way to get your data into Neurodesktop is to use a cloud storage provider like CloudStor, Dropbox, OneDrive and their sync tools like OwnCloud, Nextcloud or very flexible tools like rclone or davfs2. Another good option could be to utilize Globus for large amounts of data.

Nextcloud and Owncloud desktop clients

Under the menu item “Accessories” you can find “Nextcloud” and “ownCloud” desktop sync clients that you can configure with your cloud service accounts.

To connect for example to your AARNET cloudstor account you can start the ownCloud client and enter the Server Address:

https://cloudstor.aarnet.edu.au/plus/

Then generate an app-password here: https://cloudstor.aarnet.edu.au/plus/settings/personal?sectionid=security

Mounting webdav storage using davfs2

Another option is to directly mount webdav storage. Here is an example how to mount CloudStor into Neurodesktop:

sudo mount -t davfs https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/ /data/

It then asks you for a username and password, which you can generate here: https://cloudstor.aarnet.edu.au/plus/settings/personal?sectionid=security

Rclone

Rclone is a command line tool that enables the interaction with various cloud services. Here is an example how to setup rclone with CloudStor Aarnet:

  • start the configuration in a terminal window rclone config
  • Create a new remote: n
  • Provide a name for the remote: CloudStor
  • For the “Storage” option choose: webdav
  • As “url” set: https://cloudstor.aarnet.edu.au/plus/remote.php/webdav/
  • As “vendor” set OwnCloud: 2
  • Set your CloudStor username after generating an access token https://cloudstor.aarnet.edu.au/plus/settings/personal?sectionid=security
  • Choose to type in your own password: y
  • Enter the Password / Token from the CloudStor App passwords page and confirm it again:
  • Leave blank the bearer_token: <hit Enter>
  • No advanced config necessary: <hit Enter>
  • accept the configuration: <hit Enter>
  • Quit the config: q
  • Now we can download data to the HPC easily: rclone copy --progress --transfers 8 CloudStor:/raw-data-for-science-paper .
  • or upload data to CloudStor: rclone copy --progress --transfers 8 . CloudStor:/data-processed

Globus

We also provide the globus client, so you can transfer large amounts of data between globus endpoints and Neurodesktop. You can configure it by running:

/opt/globusconnectpersonal/globusconnectpersonal-*/globusconnectpersonal

Once authenticated you can go to the globus file-manager https://app.globus.org/file-manager and your neurodesktop instance will be an endpoint for globus.

Mount volume using SSHFS

It is theoretically possible to mount an SSH target inside Neurodesktop, but it’s not a very reliable way of mounting storage:

sshfs -o allow_root USER@TARGET_HOST:TARGET_PATH SOURCE_PATH

A better option is to use scp and copy data from an SSH endpoint:

scp /neurodesk/myfile user@remoteserver:/data/

An alternative is to mount the SSHFS target into a parent directory on your local machine or VM and then use the -v option in the docker run command to bind the parent directory of the SSHFS mount. NOTE: the SSHFS has to be mounted to a subdirectory inside a parent directory which is then bound to the docker container. If you directly bind to the mounted directory itself, your Neurodesktop container will stop being able to access it if the SSHFS mount disconnects and will not be able to access it again without restarting the Neurodesktop container.

For example, on a local Linux machine or VM:

sshfs -o allow_root USER@TARGET_HOST:TARGET_PATH/MyData SOURCE_PATH/SSHFS_Mounts/MyData

Then add the following line to the docker run command when starting Neurodesktop (note the rshared flag):

-v /SSHFS_Mounts:/data:rshared \

TIP: If you use key pair authentication instead of password for your SSHFS mount, you can use the reconnect flag to reconnect automatically if the connection drops:

sshfs -o IdentityFile=~/.ssh/id_rsa,allow_root,ServerAliveInterval=5,ServerAliveCountMax=3 USER@TARGET_HOST:TARGET_PATH/MyData SOURCE_PATH/SSHFS_Mounts/MyData
Last modified May 12, 2022 : Update storage.md (396bfa2f)