File Storage Service - Getting started (Beta)
Objective
OVHcloud provides a File Storage Service powered by OpenStack Manila. This service offers managed NFS shares on private networks, supporting ReadWriteMany (RWX) access across multiple instances or Kubernetes pods.
It can be accessed via OVHcloud API, OpenStack CLI and API, Manila CSI, and Terraform.
This service is currently in Beta, available only in the SBG5, DE1 and GRA regions. Features and availability may change.
During the Beta phase, the allowed share size ranges from 150 GiB to 10 TiB.
Requirements
- You already have a private network available in your project.
- A Public Cloud instance in your OVHcloud account
- An OpenStack CLI ready environment
Instructions
Currently, the File Storage Service can only be accessed and managed via OVHcloud API, OpenStack CLI with the Manila plugin and Terraform. Other interfaces will be supported in the future.
1. Create a share
Identify your private network and subnet
Before creating or attaching a File Storage service, you must identify the target private network.
Retrieve the network ID:
Example output:
NOTE: Only select a private network.
Retrieve the subnet ID using the network ID:
Example output:
Both the network ID and subnet ID should have the format: abc12345-def6-4abc-8def-123456abcdef.
Create a 150 GiB NFS share attached to your private network:
NOTE: Replace with your chosen share name.
List your shares and wait until the newly created one appears with status available:
Example output:
NOTE: The share ID should have the format abc12345-def6-4abc-8def-123456abcdef.
Retrieve the share details using the share ID:
Example output:
2. Authorize a client VM
Ensure the client VM is on the same private network as the share.
Retrieve the VM’s private IP address.
Grant access to the share using the VM’s private IP (e.g., 10.1.0.123) via ACL management:
Example output:
Verify access to the NFS share from the authorized client VM:
3. Mount the share on your client VM
Connect to your client VM and install the NFS utilities required to mount the share:
Create a mount point and mount the share:
Verify the mount:
Make the mount persistent across reboots:
This ensures the NFS share is automatically remounted after the VM restarts.
4. Check capacity and usage
Once the NFS share is mounted, verify its available space and usage:
Example output:
Note: This allows you to monitor the storage capacity and usage of your NFS share.
Additional requirements
- Make sure your OpenStack user has the
AdministratororShare operatorrole.
1. Install the Manila CLI plugin
If the Manila commands are not yet available, install the plugin:
Verify the installation:
You should see commands such as:
- share create
- share list
- share network create
- share access create
2. Check available share types
List the share types available in your region:
Expected output:
Note: The type standard-1az uses driver_handles_share_servers = True, which means you must attach a share network when creating a share.
3. Create a share network
Identify your private network and subnet:
Retrieve their IDs:
Both network and subnet IDs should look like: abc12345-def6-4abc-8def-123456abcdef
Create a share network linked to your private network:
Note: Replace <my-share-network-name> with your chosen name for the share network.
Verify the share network:
4. Create an NFS share
Create a 150 GB NFS share:
Note: Replace with the name you want to assign to your share.
Monitor the share status until it becomes available:
5. Authorize a client VM
Ensure your client VM is in the same private network as the share.
Retrieve the VM’s private IP address:
Example output:
Grant access to the share using the VM’s private IP (e.g., 10.1.0.123):
Verify access:
6. Retrieve the export path
Get the NFS export location:
Example output:
Note: This export path is used to mount the share on your client VM.
7. Mount the share on your client VM
Connect to your VM and install NFS utilities:
Create a mount point and mount the share:
Verify the mount:
Note: Replace the export path with the one retrieved for your share.
8. Check capacity and usage
Display available space on the mounted share:
Example output:
Note: This lets you monitor the storage capacity and usage of your NFS share.
9. Manage the share lifecycle
Resize the share:
Only extending a share is allowed for now; shrinking is not supported.
Delete a share:
Delete the share network:
Note: Ensure no active shares are using the network before deleting it.
10. Troubleshooting
| Symptom | Cause | Solution |
|---|---|---|
Unknown command ['share'] | Manila CLI not installed | Install it with sudo apt install python3-manilaclient |
Share network must be set | Using a DHSS=True share type | Provide --share-network |
| Cannot mount NFS | IP not authorized or wrong network | Ensure VM is in the same private subnet and access rule is created |
| Share stuck in creating | Invalid network ID or subnet | Check NETWORK_ID and SUBNET_ID |
1. Additional requirements
- Helm CLI installed on your local machine.
- OpenStack CLI configured and ready to use.
- Krew (kubectl plugin manager) installed.
- Stern (kubectl log tailing plugin) installed via Krew.
- A Kubernetes cluster deployed in a private network within a Public Cloud region where Manila endpoints are accessible.
- Ensure that your OpenStack user has the Administrator or Share Operator role.
This guide works with both Managed Kubernetes Service (MKS) clusters and self-managed Kubernetes clusters.
2. Installing Helm command line
3. Installing Krew and Stern tools
Run the following command to install Krew in your environment:
Once Krew is installed, install Stern with:
4. Installing OpenStack CLI
Prepare your environment to use the OpenStack API by installing python-openstackclient, following this guide.
Install the Manila client to manage File Storage shares:
Don’t forget to update your shell completion script to enable OpenStack share autocompletion.
5. Install the CSI NFS driver
Add the Helm chart repository:
List available releases of the NFS CSI chart:
Install the chosen Helm chart release:
Replace the optional flags --wait -v=5 --debug as needed for debugging or synchronous installation.
Follow the NFS CSI logs:
6. Install the Manila CSI driver
Add the Helm chart repository:
List available releases of the Manila CSI:
Install the chosen Helm chart release:
Follow the Manila CSI logs:
7. Preparing OpenStack resources for Manila CSI
7.1. Create a dedicated OpenStack user for Manila
You need a separate OpenStack user to manage Manila resources. This user can be created:
- Through the OVHcloud Control Panel (Public Cloud > Settings > Users & Roles)
- Or via the OVHcloud CLI
7.2. Collect OpenStack project and user details
Download your project’s openrc file from the OVHcloud Control Panel and note the following credentials:
- os-userName
- os-password
- os-domainName
- os-projectDomainID
- os-projectName
Once you have these values, create a file named secrets.yaml with the following content. This Kubernetes Secret allows the Manila CSI driver to authenticate against OpenStack and manage Manila resources in your cluster.
Then, apply it to your Kubernetes cluster:
7.3. Configure the OpenStack shared network
Manila requires a share network because the driver is configured with DHSS=true (driver_handles_share_servers).
This resource is managed by the owner of the OpenStack project.
Example output:
8. Configure the Manila CSI driver
Once the OpenStack share network is created, and before configuring the Manila CSI driver, you need to define the CIDR range used by your Kubernetes nodes. This ensures that the nodes can access the Manila shares.
Edit the runtime ConfigMap:
Create a file named manila-runtime-configmap.yaml and update the nfs.matchExportLocationAddress field to match your cluster’s CIDR:
Example:
Apply the ConfigMap to your Kubernetes cluster:
9. Creating NFS shares via dynamic provisioning
To enable the Manila CSI driver to dynamically create Manila shares and use them as Kubernetes volumes, you must define a StorageClass in your cluster. This StorageClass specifies the shared network that will be used to create and grant access to NFS exports.
Retrieve the shared network ID, using the OpenStack CLI to get the ID of your shared network:
Configure the StorageClass:
- Create a file named
dynamic-storageclass.yamlwith the following content:
- Update the
parameter.shareNetworkIDvalue with the shared network identifier. - update the
parameter.nfs-shareClientvalue with the subnet CIDR defined during cluster creation.
Create the dynamic StorageClass, applying the StorageClass to your cluster:
Once the StorageClass is created, create a file named nfs-pvc.yaml defining a PersistentVolumeClaim (PVC) that uses this StorageClass. For example, request a 150GiB volume with ReadWriteMany (RWX) access:
After applying the PVC, list the newly created Manila shares in your Public Cloud project:
Example output:
Create a file named nfs-deployment.yaml with the following content:
Deploy the web server with 2 replicas, which will mount and share the previously created RWX volume:
You can verify the RWX functionality by connecting to one pod using the kubectl exec command and creating a file in the mounted directory (e.g., /var/lib/www/). Then, connect to the second pod and check that the file is visible. If it is, your Manila share exposed through NFS is functioning correctly.
10. Resize an NFS share using dynamic provisioning
Resizing an NFS share is only supported for:
- Dynamically provisioned PersistentVolumeClaims (PVCs)
- Unmounted volumes (you must downscale your deployment before resizing to avoid errors)
At this time, only share extension is supported — shrinking a volume is not possible.
To resize an existing Manila share:
Scale down the deployment to ensure the volume is unmounted:
Patch the PVC to request a new size (for example, 42Gi):
Verify that the OpenStack share has been updated:
If the share has been successfully extended, scale the deployment back up:
Attempting to resize a PVC that is not dynamically provisioned by a StorageClass will result in an error such as:
error: persistentvolumeclaims "existing-nfs-share-pvc" could not be patched: persistentvolumeclaims "existing-nfs-share-pvc" is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize
11. Mounting an existing Manila share as a volume in Pods
As shown earlier, a Kubernetes StorageClass can dynamically create Manila shares exposed via NFS. Alternatively, you can use a pre-provisioned Manila share and mount it directly in a Pod.
Create a new share with the OpenStack CLI:
Where:
SHARE_TYPEisstandard-1azby default. You can check existing share types with:
SHARE_NETWORK_IDis the identifier of your shared network.NFS_SHARE_NAMEis the name of your NFS share.SHARE_PROTOCOLis the protocol to use (currently, only NFS is supported).SHARE_SIZEis the size to allocate to your NFS volume (in GiB).
Create a share access rule:
Where:
SHARE_ACCESS_NAMEis the name of the share.SUBNET_CIDRis the CIDR used when configuring the Manila CSI runtime.
Retrieve the NFS share ID and the share access ID, then create a file named static-provisioning.yaml and update the volumeAttributes.shareID and volumeAttributes.shareAccessID parameters:
Apply the manifest to create a PersistentVolume and its PersistentVolumeClaim using the pre-provisioned NFS share. The Manila share will be used only if the pod claiming the PVC is deployed in your cluster:
Deploy a pod that mounts this share:
You can now use kubectl exec to access the pod and run df -h to verify that the pre-created Manila share is properly mounted.
Useful CLI
With your OpenStack credentials loaded in the environment, you can manage Manila shares using the OpenStack CLI. Common commands include:
Useful resources
Your ReadWriteMany (RWX) Storage in k8s with Manila CSI Manila/Concepts Generic approach for share provisioning Official Manila CSI Plugin on GitHub
1. Additional requirements
- You already have a working Terraform environment.
You can find useful examples here
2. Declare the OpenStack provider
Add the following configuration to your main.tf to specify the required Terraform providers:
vim main.tf
terraform {
required_providers {
ovh = {
source = "ovh/ovh"
}
openstack = {
source = "terraform-provider-openstack/openstack"
}
}
}
This block ensures that Terraform uses the correct providers for managing OVH and OpenStack resources.
3. Retrieve information about your private network
Add the following blocks to your main.tf file to fetch details about your private network and subnet:
These data blocks allow Terraform to query OpenStack and retrieve the necessary details of your private network and subnet, which are required for configuring the File Storage service.
4. Create a share network
Add the following resource to your main.tf to create a share network for your File Storage service:
This resource creates a share network in OpenStack, associating it with your existing private network and subnet. It is required to provision and manage shared file systems.
5. Create an NFS share
Add the following resource to your main.tf to create an NFS share on your File Storage service:
This resource provisions an NFS share in OpenStack, linked to the previously created share network. Adjust the size and share_type according to your requirements.
6. Authorize a client VM
Ensure that your client VM is connected to the same private network as your share.
Retrieve the VM's private IP address:
Example output:
Use the private IP (e.g., 10.1.0.123) to grant access to the NFS share:
This resource authorizes the specified client VM to access the NFS share with read/write permissions.
7. Retrieve the export path
Add the following output block to your main.tf to retrieve the NFS share export path:
This output provides the NFS export path, which can be used by client VMs to mount the share.
8. Mount the share on your client VM
Connect to your client VM and install the necessary NFS utilities:
Create a mount point and mount the share:
Replace with the export path retrieved from Terraform (e.g., 10.1.0.12:/shares/share-abc12345-def6-4abc-8def-123456abcdef).
Verify the mount:
Make the mount persistent across reboots:
This ensures your NFS share is automatically remounted after the VM restarts.
9. Check capacity and usage
Once the NFS share is mounted, you can verify its available space and usage:
Example output:
This command shows the total size, used space, and available space on your mounted NFS share.
Go further
Join our community of users.