Guide to Mounting Storage via SSHFS
Prerequisites
- 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
- SSH Key Pair
Ensure you have an SSH key pair set up. If not, you can generate one using:
Steps to Mount the Storage
- Create a Local Mount Point
First, create a directory on your VM where you would like to mount the remote storage.
- 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
- Verify the Mount
Check if the storage has been mounted successfully by listing the contents of the /res99
directory:
- Unmounting the Storage
When done, unmount the storage using the fusermount
command:
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
.