Vultr Storage Gateway (an NFS Gateway for Vultr File System) enables scalable NFS-based access to VFS volumes from Vultr Bare Metal and Cloud Compute instances. Adding an export to an existing gateway lets you
Follow this guide to create an export for an existing Vultr Storage Gateway using the Vultr API.
Send a GET
request to the List Storage Gateways endpoint to retrieve the available Vultr Storage Gateways.
$ curl "https://api.vultr.com/v2/storage-gateways" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the List VFS endpoint to retrieve available Vultr File System volumes.
$ curl "https://api.vultr.com/v2/vfs" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a POST
request to the Add Storage Gateway Export endpoint to add a new export for an existing Storage Gateway.
$ curl "https://api.vultr.com/v2/storage-gateways/<storage-gateway-id>/exports" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
--data '{
"label": "<my-export-label>",
"pseudo_root_path": "<export-path>",
"vfs_uuid": "<vfs-volume-id>",
"allowed_ips": [
"<bare-metal-ip>/32"
]
}'
Send a GET
request to the Storage Gateway endpoint using the Storage Gateway ID to verify that the export was created.
$ curl "https://api.vultr.com/v2/storage-gateways/<storage-gateway-id>" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"