Enterprise File Storage - API Quickstart

Getting started with Enterprise File Storage using the OVHcloud API

Last updated 27th October 2021

Objective

In this quickstart guide, we will provide an overview of how to use your Enterprise File Storage offer for file storage.

Learn how to retrieve information about your service and how to create and access your first volume using the OVHcloud API.

Basics

OVHcloud Enterprise File Storage allows you to create and manage file volumes that can be accessed over a network.

You're able to choose file volume size, manage accesses using ACLs or create snapshots.

Requirements

Instructions

All API routes used for this quickstart are available under the /storage section here: https://api.ovh.com/console/#/storage.

While using the API, all fields marked with an asterisk (*) are required.

Retrieving information about your service

All your active services can be retrieved by using the following route:

Creating a new volume

A volume is a unit of storage with a size and a protocol.

To create a new volume use the following route:

API:
Parameters:

serviceName *

Service ID

NetAppShare *

description

Volume description

name

Volume name

protocol *

Volume protocol

size *

Volume size in Gigabytes

Choose NFS as protocol and a size of 10 Gigabytes for example.

Adding an ACL to the volume

Volume ACLs allow to grant or deny access to a volume.

Default behaviour is to deny all access to a volume.

After creating a volume, you need to grant access to it.

To create a new ACL that will allow you to connect to your newly created volume, use the following route:

API:
Parameters:

serviceName *

Service ID

shareId *

Volume ID

NetAppShareACLRule *

accessLevel *

ACL access level. Can be rw (read and write) or ro (read-only).

accessTo *

IP address or a range of IP addresses in CIDR notation.

Using CIDR notation, you can grant access to your volume from x.x.x.x/x network. For example: 192.0.2.0/24

Mounting the volume

Inspect the ACL creation status using the following route:

API:
Parameters:

serviceName *

Service ID

shareId *

Volume ID

aclRuleId *

ACL ID

Replace aclRuleId with the ID of the ACL created for your volume.

ACL status should be active.

Once the ACL is active, retrieve access paths for the volume using the following route:

API:
Parameters:

serviceName *

Service ID

shareId *

Volume ID

You will be presented with one or multiple access paths for your volume.

You are now able to mount the volume with the following command:

mount -t nfs accessPath

If you are using Linux, you will need to have nfs-utils package installed.

Once mounted, your volume is now usable to store files.

Cleaning up

You can remove your volume using the following route:

API:
Parameters:

serviceName *

Service ID

shareId *

Volume ID

Go further

Join our community of users on https://community.ovh.com/en/.


Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.


These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community

In accordance with the 2006/112/CE Directive, modified on 01/01/2015, prices incl. VAT may vary according to the customer's country of residence
(by default, the prices displayed are inclusive of the UK VAT in force).