---
title: "HA-NAS - Managing partitions via API"
description: "Find out how to manage HA-NAS partitions using the OVHcloud API"
url: https://docs.ovhcloud.com/en/guides/storage-and-backup/file-storage/ha-nas/nas-partitions-api
lang: en
lastUpdated: 2022-07-20
---
# HA-NAS - Managing partitions via API

## 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

- An OVHcloud [HA-NAS service](https://www.ovhcloud.com/en-gb/storage-solutions/nas-ha/)
- Consulting the [OVHcloud API first steps guide](/en/guides/manage-and-operate/api/first-steps.md) to familiarise yourself with the OVHcloud APIv6

## Instructions

All API routes in this guide are available in the section _/dedicated/nasha_: [https://api.ovh.com/console/#/dedicated/nasha](https://api.ovh.com/console/#/dedicated/nasha).

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


🇪🇺EU▾

[GET/dedicated/nasha](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#get-/dedicated/nasha)

### Listing all partitions

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


🇪🇺EU▾

[GET/dedicated/nasha/{serviceName}/partition](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#get-/dedicated/nasha/-serviceName-/partition)

| Parameter     | Required | Description                              |
| ------------- | -------- | ---------------------------------------- |
| `serviceName` | Yes      | The internal name of your HA-NAS service |

### Retrieving the properties of a partition

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


🇪🇺EU▾

[GET/dedicated/nasha/{serviceName}/partition/{partitionName}](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#get-/dedicated/nasha/-serviceName-/partition/-partitionName-)

| Parameter       | Required | Description                              |
| --------------- | -------- | ---------------------------------------- |
| `serviceName`   | Yes      | The internal name of your HA-NAS service |
| `partitionName` | Yes      | Name of the partition                    |

### Retrieving statistics for a partition

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


🇪🇺EU▾

[GET/dedicated/nasha/{serviceName}/partition/{partitionName}/use](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#get-/dedicated/nasha/-serviceName-/partition/-partitionName-/use)

| Parameter       | Required | Description                                                              |
| --------------- | -------- | ------------------------------------------------------------------------ |
| `serviceName`   | Yes      | The internal name of your HA-NAS service                                 |
| `partitionName` | Yes      | Name of the partition                                                    |
| `type`          | Yes      | The type of statistic to be fetched: _size_, _used_ or _usedbysnapshots_ |

### Creating a partition

Use the following route to create a new partition:


🇪🇺EU▾

[POST/dedicated/nasha/{serviceName}/partition](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#post-/dedicated/nasha/-serviceName-/partition)

| Parameter              | Required | Description                              |
| ---------------------- | -------- | ---------------------------------------- |
| `serviceName`          | Yes      | The internal name of your HA-NAS service |
| `partitionDescription` |          | Optional description                     |
| `partitionName`        | Yes      | A name for the partition                 |
| `protocol`             | Yes      | _NFS_, _CIFS_, or _NFS\_CIFS_ for both   |
| `size`                 | Yes      | The 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:


🇪🇺EU▾

[PUT/dedicated/nasha/{serviceName}/partition/{partitionName}](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#put-/dedicated/nasha/-serviceName-/partition/-partitionName-)

| Parameter              | Required | Description                              |
| ---------------------- | -------- | ---------------------------------------- |
| `serviceName`          | Yes      | The internal name of your HA-NAS service |
| `partitionName`        | Yes      | Name of the partition                    |
| `partitionDescription` |          | The new description                      |
| `size`                 |          | The new size of the partition            |

### Retrieving the ZFS settings of a partition

Use the following route to retrieve the ZFS settings:


🇪🇺EU▾

[GET/dedicated/nasha/{serviceName}/partition/{partitionName}/options](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#get-/dedicated/nasha/-serviceName-/partition/-partitionName-/options)

| Parameter       | Required | Description                              |
| --------------- | -------- | ---------------------------------------- |
| `serviceName`   | Yes      | The internal name of your HA-NAS service |
| `partitionName` | Yes      | Name of the partition                    |

### Changing the ZFS settings of a partition

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


🇪🇺EU▾

[POST/dedicated/nasha/{serviceName}/partition/{partitionName}/options](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#post-/dedicated/nasha/-serviceName-/partition/-partitionName-/options)

| Parameter       | Required | Description                                                                          |
| --------------- | -------- | ------------------------------------------------------------------------------------ |
| `serviceName`   | Yes      | The internal name of your HA-NAS service                                             |
| `partitionName` | Yes      | Name of the partition                                                                |
| `atime`         |          | Access time update setting: _on_ (default) or _off_                                  |
| `recordsize`    |          | Maximum block size: _131072_ (default), _16384_, _32768_, _4096_, _65536_, or _8129_ |
| `sync`          |          | File synchronisation setting: _always_, _disabled_, or _standard_ (default)          |

### Deleting a partition

Use the following route to delete a partition:


🇪🇺EU▾

[DELETE/dedicated/nasha/{serviceName}/partition/{partitionName}](https://eu.api.ovh.com/console/?section=/dedicated/nasha&branch=v1#delete-/dedicated/nasha/-serviceName-/partition/-partitionName-)

| Parameter       | Required | Description                              |
| --------------- | -------- | ---------------------------------------- |
| `serviceName`   | Yes      | The internal name of your HA-NAS service |
| `partitionName` | Yes      | Name of the partition                    |

## Go further

[Mount your NAS via NFS share](/en/guides/storage-and-backup/file-storage/ha-nas/nas-nfs.md)

[Mount your NAS on Windows Server via CIFS](/en/guides/storage-and-backup/file-storage/ha-nas/nas-cifs.md)

If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](https://www.ovhcloud.com/en-gb/professional-services/) 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](https://community.ovhcloud.com/).
