HA-NAS - Managing partitions via API

Knowledge Base

HA-NAS - Managing partitions via API


Icons/System/eye-open Created with Sketch. 256 Views 20.07.2022 Cloud / NAS-HA

Objective

The OVHcloud HA-NAS service allows you to manage file storage that can be accessed over a network.

This guide explains how to manage the partitions of your HA-NAS service via the OVHcloud API.

Requirements

Instructions

All API routes in this guide are available in the section /dedicated/nasha: https://api.ovh.com/console/#/dedicated/nasha.

When 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:

Listing all partitions

Use the following route to retrieve the partitions of a service:

ParameterRequiredDescription
serviceNameYesThe internal name of your HA-NAS service

Retrieving the properties of a partition

To view the details of a partition, use the following route:

ParameterRequiredDescription
serviceNameYesThe internal name of your HA-NAS service
partitionNameYesName of the partition

Retrieving statistics for a partition

Use the following route to retrieve usage information for a partition:

ParameterRequiredDescription
serviceNameYesThe internal name of your HA-NAS service
partitionNameYesName of the partition
typeYesThe type of statistic to be fetched: size, used or usedbysnapshots

Creating a partition

Use the following route to create a new partition:

ParameterRequiredDescription
serviceNameYesThe internal name of your HA-NAS service
partitionDescriptionOptional description
partitionNameYesA name for the partition
protocolYesNFS, CIFS, or NFS_CIFS for both
sizeYesThe size of the partition

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

Modifying the properties of a partition

Use the following route to alter a partition:

ParameterRequiredDescription
serviceNameYesThe internal name of your HA-NAS service
partitionNameYesName of the partition
partitionDescriptionThe new description
sizeThe new size of the partition

Retrieving the ZFS settings of a partition

Use the following route to retrieve the ZFS settings:

ParameterRequiredDescription
serviceNameYesThe internal name of your HA-NAS service
partitionNameYesName of the partition

Changing the ZFS settings of a partition

All the default Z File System settings are optimised. We do not recommend changing these parameters.

Use the following route to edit the ZFS settings:

ParameterRequiredDescription
serviceNameYesThe internal name of your HA-NAS service
partitionNameYesName of the partition
atimeAccess time update setting: on (default) or off
recordsizeMaximum block size: 131072 (default), 16384, 32768, 4096, 65536, or 8129
syncFile synchronisation setting: always, disabled, or standard (default)

Deleting a partition

Use the following route to delete a partition:

ParameterRequiredDescription
serviceNameYesThe internal name of your HA-NAS service
partitionNameYesName of the partition

Go further

Mount your NAS via NFS share

Mount your NAS on Windows Server via CIFS

If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.

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

Related articles