Skip to content

Guide to Mounting Storage via SSHFS

Prerequisites

  1. SSHFS Installation
    SSHFS must be installed on your OpenStack VM. If not, you can install it using the package manager of your distribution. For example, on Ubuntu:
sudo apt update
sudo apt install sshfs
  1. SSH Key Pair
    Ensure you have an SSH key pair set up. If not, you can generate one using:
ssh-keygen

Steps to Mount the Storage

  1. Create a Local Mount Point
    First, create a directory on your VM where you would like to mount the remote storage.
sudo mkdir /res99
  1. Mount the Storage with SSHFS
    Use the sshfs command to mount the remote directory to your local mount point. Replace YOUR_USERNAME with your actual username on transfer1.bsc.es.
sshfs YOUR_USERNAME@transfer1.bsc.es:/gpfs/archive/resdata/res99/ /res99
  1. Verify the Mount
    Check if the storage has been mounted successfully by listing the contents of the /res99 directory:
ls /res99
  1. Unmounting the Storage
    When done, unmount the storage using the fusermount command:
fusermount -u /res99

Notes

  • To use SSH keys for authentication instead of a password, copy your public key (~/.ssh/id_rsa.pub) to ~/.ssh/authorized_keys on transfer1.bsc.es.
ssh-copy-id YOUR_USERNAME@transfer1.bsc.es
  • SSHFS mounts are not persistent across reboots by default. For permanence, consider adding the sshfs command to your system's startup scripts or using /etc/fstab.