Mounting a Vultr Storage Gateway — an NFS Gateway for Vultr File System (VFS) — allows your Vultr Bare Metal and Cloud Compute instances to access VFS volumes over NFSv4. This integration enables seamless, high-performance cloud storage access with the flexibility and scalability of VFS, eliminating the limitations of local disks. Follow this guide to mount a Vultr Storage Gateway on a Linux instance using the NFS protocol.
Install the required dependencies based on your operating system. These tools enable your instance to communicate with the Vultr Storage Gateway using the NFS protocol.
nfs-common
package.
$ sudo apt update && sudo apt install nfs-common -y
nfs-common
package.
$ sudo dnf install nfs-utils -y
Send a GET
request to the List Storage Gateways endpoint to retrieve all your available Storage Gateways, and note the IP address defined in the public_ips
array under the network_config
section, you’ll use this IP address to mount the Storage Gateway.
$ curl "https://api.vultr.com/v2/storage-gateways" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Use the below command to mount your Vultr Storage Gateway to a local directory. Replace <storage-gateway-ip>
, <export-path>
, and <mount-point>
with the actual values from your setup.
$ sudo mount -v -t nfs -o vers=4.2,soft,rw <storage-gateway-ip>:/<export-path> /mnt/vfs
vers=4.2
: specifies the NFS version.soft
: allows the system to timeout if the server is unresponsive.rw
: mounts the export with read/write access./mnt/vfs
: is your local mount point. You can create it using mkdir -p /mnt/vfs
if it doesn’t exist.Back up the existing /etc/fstab file before making any changes.
$ sudo cp /etc/fstab /etc/fstab.bak
Open the /etc/fstab
file in a text editor.
$ sudo nano /etc/fstab
Add the following line at the end of the file to ensure the Vultr Storage Gateway mounts automatically on boot.
<storage-gateway-ip>:/<export-path> /mnt/vfs nfs defaults,_netdev,vers=4.2,soft,rw 0 0
Replace <storage-gateway-ip>
and <export-path>
with the actual values from your setup.
Reload the system daemon.
$ sudo systemctl daemon-reexec
Apply the changes and test the configuration.
$ sudo mount -a
Your Vultr Storage Gateway is now permanently mounted to your instance.