Voltage Park: mounting shared storage
Mount persistent storage volumes on Voltage Park instances using Network File System (NFS) protocol.
Overview
Voltage Park persistent volumes use NFS (Network File System) version 3 protocol for high-performance network-attached storage. Each volume is accessible via a virtual IP address and supports concurrent access from multiple instances.
Protocol: NFS v3
Connection: Virtual IP-based
Performance: Parallel connections via nconnect option
Prerequisites
Before starting, ensure you have:
- Created a volume with provider:
voltage-parkvia the Spheron dashboard (Create Volume page) - Attached the volume to your Voltage Park instance
- Retrieved the volume's virtual IP address from:
- Instance Details drawer → "Mounting your storage volume" section, or
- Volumes page
- SSH access to your Voltage Park instance
Mounting process
Connect to your instance
SSH into your Voltage Park GPU instance using the connection details from the instance's Details drawer:
ssh ubuntu@<your-instance-ip>See SSH Connection Setup for detailed connection instructions.
Install NFS dependencies
Ensure the Network File System client is installed on your instance:
sudo apt install nfs-commonCreate mount directory
Create a directory where you'll mount the storage volume:
sudo mkdir /dataCommon choices include:
/data: simple and clear/mnt/storage: standard mount location/workspace: for ML/AI projects
Configure file system table
Add the volume configuration to /etc/fstab to enable automatic mounting. Replace <virtualIP> with your volume's virtual IP address:
echo '<virtualIP>:/data /data nfs rw,nconnect=16,nfsvers=3 0 0' | sudo tee -a /etc/fstab<virtualIP>:/data: remote NFS server and export path/data: local mount pointnfs: filesystem typerw: read-write accessnconnect=16: use 16 connections for better performancenfsvers=3: NFS version 3 protocol0 0: no dump, no fsck on boot
echo '192.168.100.50:/data /data nfs rw,nconnect=16,nfsvers=3 0 0' | sudo tee -a /etc/fstabMount the volume
Mount the volume using the configuration in /etc/fstab:
sudo mount -aThis command mounts all filesystems defined in /etc/fstab that are not already mounted.
Verify mount
Confirm the volume mounted successfully:
df -hLook for your storage volume in the output. You should see a line showing your volume's virtual IP mounted at /data:
Filesystem Size Used Avail Use% Mounted on
...
192.168.100.50:/data 100G 1.0G 99G 1% /dataSet permissions (optional)
Make the mounted storage writable by your user:
sudo chown ubuntu:ubuntu /dataReplace ubuntu:ubuntu with your username if different.
Use your mounted volume
Access the storage
Once mounted, use the storage like any local directory:
# Navigate to the storage
cd /data
# Create files and directories
mkdir my-project
echo "Hello, storage!" > my-project/readme.txt
# List contents
ls -lh /data/Check storage usage
Monitor your volume's space usage:
# Check space on the mounted volume
df -h /data
# Check detailed disk usage
du -sh /data/*Work with large datasets
The mounted volume is ideal for:
- ML/AI training datasets
- Model checkpoints and artifacts
- Shared data across multiple instances
- Persistent application data
# Example: Download dataset to storage
cd /data
wget https://example.com/large-dataset.tar.gz
tar -xzf large-dataset.tar.gzUnmount shared storage
Unmount shared storage when swapping out the attached storage volume, detaching the volume from the instance, or terminating the instance.
Unmount the volume
sudo umount /dataIf you get a "target is busy" error, ensure no processes are using the storage:
# Check what's using the storage
lsof /data
# Or use fuser
fuser -m /dataRemove from file system table
Remove the volume configuration from /etc/fstab to prevent auto-mount on next boot:
# Edit fstab and remove the NFS entry
sudo nano /etc/fstab
# Or use sed to remove it automatically
sudo sed -i '/\/data.*nfs/d' /etc/fstabTroubleshooting
Mount fails with "Connection refused"
Cause: Incorrect virtual IP or volume not attached to instance.
Solution:- Verify the volume is attached to your instance via the dashboard or API
- Double-check the virtual IP address
- Ensure the virtual IP in
/etc/fstabmatches the volume's virtual IP
Mount fails with "No such file or directory"
Cause: Mount point directory doesn't exist.
Solution:sudo mkdir -p /data
sudo mount -aVolume not mounting on boot
Cause: Network not ready when fstab mounts are processed.
Solution: Add the _netdev option to the fstab entry:
<storage-vip>:/data /data nfs rw,nconnect=16,nfsvers=3,_netdev 0 0The _netdev option tells the system to wait for the network before mounting.
Performance issues
Cause: Suboptimal NFS settings or network latency.
Solutions:- Increase the
nconnectvalue for more parallel connections (try 32 or 64) - Use NFSv4 if supported:
nfsvers=4 - Add async mode for better write performance:
async
<storage-vip>:/data /data nfs rw,nconnect=32,nfsvers=4,async 0 0Check mount status
# List all NFS mounts
mount | grep nfs
# Check NFS statistics
nfsstat
# Verify fstab syntax
sudo mount -favBest practices
Organization:- Use descriptive mount points:
/data,/models,/datasets - Create subdirectories for different projects or datasets
- Document what data is stored where
- Use higher
nconnectvalues (16 to 64) for better throughput - Consider async mode for write-heavy workloads
- Monitor network bandwidth usage
- Maintain backups of critical data
- Volumes persist, but data can still be lost due to corruption or accidental deletion
- Test backup and restore procedures
- Restrict access to the mount point using filesystem permissions
- Only mount volumes from trusted sources
- Regularly audit who has access to shared storage
- Add mount commands to startup scripts for new instances
- Use cloud-init to configure NFS mounts automatically
Example cloud-init script:
#cloud-config
runcmd:
- apt-get install -y nfs-common
- mkdir -p /data
- echo '192.168.100.50:/data /data nfs rw,nconnect=16,nfsvers=3 0 0' >> /etc/fstab
- mount -a
- chown ubuntu:ubuntu /dataMount multiple volumes
You can attach and mount multiple storage volumes to a single Voltage Park instance:
# Create mount points
sudo mkdir -p /data1 /data2 /models
# Add to fstab
echo '192.168.100.50:/data /data1 nfs rw,nconnect=16,nfsvers=3 0 0' | sudo tee -a /etc/fstab
echo '192.168.100.51:/data /data2 nfs rw,nconnect=16,nfsvers=3 0 0' | sudo tee -a /etc/fstab
echo '192.168.100.52:/data /models nfs rw,nconnect=16,nfsvers=3 0 0' | sudo tee -a /etc/fstab
# Mount all
sudo mount -aShare volumes across instances
To share a volume across instances simultaneously:
- Attach the same volume to multiple instances via the API or dashboard
- Mount the volume on each instance using the same virtual IP
- All instances can read and write to the shared storage
What's next
- Volume Mounting Overview: Multi-provider volume mounting guide
- Volume API Reference: Create and manage volumes programmatically
- External Storage Access: Configure local NVMe drives on Voltage Park
- SSH Connection Setup: Secure instance access
- Security Best Practices: Secure your storage and data