File Storage Service - Getting started
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, OVHcloud Control Panel, and Terraform.
Requirements
- You already have a private network available in your project.
- A Public Cloud instance in your OVHcloud account
- An OpenStack CLI ready environment
OVHcloud Control Panel Access
- Direct link: Public Cloud Projects
- Navigation path:
Public Cloud> Select your project
Instructions
Some features of the File Storage service, such as snapshots, are not yet available in the OVHcloud Control Panel. You can use the OVHcloud APIs, OpenStack CLI, or Manila CSI for these features.
1. Create a share
In the left sidebar, go to Storage & backup > File Storage, then click Create a share.
Enter the share name, then filter by deployment mode to select the target region.
Set the performance level and size (in GiB), associate a private network, and click Confirm to complete the share creation.
2. Authorize a client VM (ACL)
Retrieve the private IP address of your client VM and ensure it is on the same private network as the share.
Once the share is created, click on it to open its dashboard, then go to the Access Control List (ACL) tab.
Click Add a new access, enter the private IP address or a CIDR range (e.g., 10.1.0.123 or 10.1.0.0/24), and select the permissions:
Read-only: read access onlyRead and write: full read/write access
File Storage can only be used with OVHcloud IPs (Public Cloud, Managed Kubernetes Service).
To remove an access rule, click the trash icon on the right side of the ACL entry.
3. Mount the share on your client VM
Retrieve the mount path (displayed as Mount Path in the General information tab of your share), then connect to your client VM and install the NFS utilities:
Create a mount point and mount the share:
Verify the mount:
Save the mount configuration in fstab for easy remounting:
This lets you remount the NFS share after a reboot with the mount /mnt/share command.
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
Retrieve the private IP address of your client VM and ensure it is on the same private network as the share.
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:
Save the mount configuration in fstab for easy remounting:
This lets you remount the NFS share after a reboot with the mount /mnt/share command.
4. Check capacity and usage
Once the NFS share is mounted, verify its available space and usage:
Example output:
Note: Use this 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 client VM and install the NFS utilities required to mount the share:
Create a mount point and mount the share:
Verify the mount:
Save the mount configuration in fstab for easy remounting:
This lets you remount the NFS share after a reboot with the mount /mnt/share command.
8. Check capacity and usage
Once the NFS share is mounted, verify its available space and usage:
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:
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:
To verify RWX functionality, use kubectl exec to connect to one pod and create a file in the mounted directory (e.g., /var/lib/www/). Then connect to the second pod and confirm 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:
Use kubectl exec to access the pod and run df -h to verify 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 in the public-cloud-examples repository
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 NFS utilities required to mount the share:
Create a mount point and mount the share:
Replace <NFS_EXPORT_PATH> with the export path retrieved from Terraform (e.g., 10.1.0.12:/shares/share-abc12345-def6-4abc-8def-123456abcdef).
Verify the mount:
Save the mount configuration in fstab for easy remounting:
This lets you remount the NFS share after a reboot with the mount /mnt/share command.
9. Check capacity and usage
Once the NFS share is mounted, 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.