Mounting GP-STOR on Your Cluster
This guide walks you through mounting GP-STOR storage on your cluster using rclone with the WebDAV interface provided by GP-STOR.
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have:
- Access to a GP-STOR account with Nextcloud credentials
rcloneinstalled on your cluster (see Installation)- SSH access to your cluster with appropriate permissions
Installing rclone
Section titled “Installing rclone”If rclone is not already installed on your cluster, you can install it:
curl https://rclone.org/install.sh | sudo bashFor clusters where you don’t have sudo access, use the user installation:
cd ~curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zipunzip rclone-current-linux-amd64.zipcd rclone-*-linux-amd64mkdir -p ~/.local/bincp rclone ~/.local/bin/chmod +x ~/.local/bin/rcloneThen add ~/.local/bin to your PATH in ~/.bashrc:
export PATH="$HOME/.local/bin:$PATH"Create an Application Password in Nextcloud
Section titled “Create an Application Password in Nextcloud”- Log in to your GP-STOR Nextcloud web interface.
- Click on your user avatar in the top right corner and select “Settings”.
- In the left sidebar, click on “Security”.
- Scroll down to the “App passwords” section.
- Enter a name for the app password (e.g., “rclone on cluster”)
- Click “Create new app password”.
- Copy the generated password and store it securely; you will need it for rclone configuration
Configuring rclone for GP-STOR
Section titled “Configuring rclone for GP-STOR”-
Start rclone configuration:
Terminal window rclone config -
Create a new remote by choosing “n” when prompted:
n) New remotes) Set configuration passwordq) Quit confign/s/q> n -
Name your remote (example: gpstor):
name> gpstor -
Choose the WebDAV storage type (enter webdav):
Storage> webdav -
Enter the WebDAV URL (replace USERNAME):
url> https://nextcloud.gp-stor.org/remote.php/dav/files/USERNAME/ -
Select Nextcloud as the vendor:
vendor> nextcloud -
Enter credentials (consider an app password):
user> your_usernamepassword> your_passwordTip: Use an app-specific password from Nextcloud for improved security.
-
Skip bearer token (press Enter), confirm with y, then quit with q.
Mounting GP-STOR Storage
Section titled “Mounting GP-STOR Storage”Create a mount point
Section titled “Create a mount point”mkdir -p ~/gpstor-mountMount the remote
Section titled “Mount the remote”rclone mount gpstor: ~/gpstor-mount --daemon --vfs-cache-mode writesThis mounts your GP-STOR storage at ~/gpstor-mount in the background with write caching enabled.
Verify the mount
Section titled “Verify the mount”ls ~/gpstor-mountYou should see your files and directories from GP-STOR.
Advanced Mount Options
Section titled “Advanced Mount Options”For better performance on HPC clusters, consider these additional options:
rclone mount gpstor: ~/gpstor-mount \ --daemon \ --vfs-cache-mode writes \ --buffer-size 256M \ --vfs-read-chunk-size 128M \ --vfs-read-chunk-size-limit 2G \ --transfers 16Options explained:
--vfs-cache-mode writes: Cache file writes locally before uploading--buffer-size 256M: Use 256MB buffer for transfers--vfs-read-chunk-size 128M: Read files in 128MB chunks--vfs-read-chunk-size-limit 2G: Maximum chunk size--transfers 16: Number of parallel transfers
Using GP-STOR in Job Scripts
Section titled “Using GP-STOR in Job Scripts”Example SLURM script
Section titled “Example SLURM script”#!/bin/bash#SBATCH --job-name=gpstor-job#SBATCH --time=01:00:00#SBATCH --nodes=1#SBATCH --ntasks=1
# Ensure rclone mount existsif ! mountpoint -q ~/gpstor-mount; then mkdir -p ~/gpstor-mount rclone mount gpstor: ~/gpstor-mount --daemon --vfs-cache-mode writes sleep 5 # Give mount time to stabilizefi
# Copy data from GP-STOR to local scratchcp ~/gpstor-mount/input-data/* $TMPDIR/
# Run your computationcd $TMPDIR./your_program
# Copy results back to GP-STORcp output-files/* ~/gpstor-mount/results/
# Optionally unmount when done# fusermount -u ~/gpstor-mountTransferring Data
Section titled “Transferring Data”Copy files to GP-STOR
Section titled “Copy files to GP-STOR”rclone copy /local/path gpstor:remote/path --progressSync directories
Section titled “Sync directories”rclone sync /local/directory gpstor:remote/directory --progressList files
Section titled “List files”rclone ls gpstor:Unmounting
Section titled “Unmounting”To unmount GP-STOR storage:
fusermount -u ~/gpstor-mountOr on macOS:
umount ~/gpstor-mountTroubleshooting
Section titled “Troubleshooting”Mount hangs or is unresponsive
Section titled “Mount hangs or is unresponsive”Try unmounting and remounting with verbose output:
fusermount -u ~/gpstor-mountrclone mount gpstor: ~/gpstor-mount -vPermission denied errors
Section titled “Permission denied errors”Verify your credentials are correct:
rclone config show gpstorUpdate if needed:
rclone config update gpstorSlow performance
Section titled “Slow performance”- Increase buffer sizes and parallel transfers (see Advanced Mount Options)
- Use local scratch space for intensive I/O operations
- Consider using
rclone copyorrclone syncinstead of mounting for large batch transfers
Getting Help
Section titled “Getting Help”If you encounter issues:
- Check the rclone documentation
- Review rclone logs:
rclone mount gpstor: ~/gpstor-mount --log-file=~/rclone.log - Contact the GP-STOR team via our contact page
- Join our virtual office hours for live assistance
Best Practices
Section titled “Best Practices”- Use local scratch for intensive I/O: Copy data from GP-STOR to local scratch (
$TMPDIR) for computation-heavy jobs - Batch transfers: Use
rclone copyorrclone syncfor large data transfers rather than mounting - Clean up mounts: Unmount when done to free resources
- Monitor usage: Keep track of your storage quota through the Nextcloud web interface
- Use app passwords: Generate app-specific passwords in Nextcloud for better security