How to create and configure an additional disk on an instance
Objective
It is possible to create additional disks for your Public Cloud instances.
This can be useful in cases where:
- You want to increase your storage capacity without changing the instance model.
- You want to have a highly available, high-performance storage.
- You want to move your storage as well as your data to another instance.
- You want to prepare the environment if you want to use Terraform.
This guide explains how to create an additional disk and configure it on your instance.
Requirements
- Access to the OVHcloud Control Panel
- A Public Cloud Instance in your OVHcloud account
- Administrative (sudo) access to your instance via SSH (Linux) or RDP (Windows)
This feature is currently not available for Metal instances.
Instructions
The different types of volumes
OVHcloud offers three types of Block Storage volumes, each tailored to specific needs in terms of performance, capacity, and cost. These solutions allow you to attach persistent storage volumes to your instances, ensuring a high level of reliability and availability. If the feature is available, encryption can be enabled when creating a volume, for all volume types except Classic Multi-Attach volumes in 3AZ regions.
Classic – 500 IOPS guaranteed
The Classic volume is a reliable, cost-effective storage solution, ideal for workloads requiring moderate performance. It offers 500 guaranteed IOPS, making it suitable for the following uses:
- Hosting of classic web applications
- Storage of small to medium-sized databases
- Data backup and archiving
In 3AZ regions, Classic Volumes are regional services that use distributed erasure coding across multiple Availability Zones. This ensures data remains available without impact or downtime in the event of an AZ failure, provided the multi-attached resilient architecture conditions are met. For more information, please refer to our guide "Proper Usage and Limitations of Classic Multi-Attach Block Storage in 3AZ Regions".
High-Speed – Up to 3000 IOPS
The High-Speed volume is designed for applications requiring faster data access. With performance of up to 3000 IOPS, it is ideally suited to the following use cases:
- Transactional databases (MySQL, PostgreSQL, etc.)
- Virtualization and container environments
- Applications requiring low latency and high throughput
High-Speed Gen2 – 30 IOPS/GB and up to 20,000 IOPS
Generation 2 High-Speed volumes are optimized for the most demanding workloads. With a performance of 30 IOPS/GB, up to 20,000 IOPS, this type of volume is recommended for:
- Big Data and real-time analysis
- Artificial intelligence and machine learning
- Large database processing and high-performance storage

All volume types are also available in an encrypted version (LUKS). These volumes ensure data confidentiality without impacting performance. They are available through the OVHcloud Control Panel as well as via the tools presented in the next section, by specifying the type <volume_type>-luks.
Attaching a new volume
Log in to the OVHcloud Control Panel, go to the Public Cloud section and select the Public Cloud project concerned. Then open Block Storage in the left-hand menu under Storage & backup.
In this section, click on the button Create a volume.

Follow the configuration steps to select the location, disk type, encryption and disk capacity options. Enter a name for the volume and confirm by clicking on Create volume.
Please note: Your volume must be created in the same region as the instance to which you want to attach it. If you create it in another region, you can delete it and recreate it in the correct region.

The new disk will now be displayed in the Control Panel.

To the right of the volume, click on the ... button, then select Attach to instance.

In the popup window, choose an instance from the list and click on Confirm to attach the disk.

The process of attaching the disk to your instance will now begin. This may take a few minutes to complete.
Make sure to not leave the current page in your OVHcloud Control Panel while the disk is being attached. This might interrupt the process.
Please note that the "high-speed-gen2" or "luks" volume types may not be available in all regions.
Types of volumes:
- Classic
- High-speed
- High-speed-gen2
- Classic-luks
- High-speed-luks
- High-speed-gen2-luks
The types ending in -luks are encrypted (LUKS).
Creating a -luks volume automatically generates a dedicated key.
Do not modify or delete this key if it is linked to a Block Storage volume. Doing so would make the data on that volume and all its snapshots permanently unrecoverable.
To create a simple block storage volume, you need 3 elements:
- The name of the volume
- The region
- The size of the volume in GB
In our example, we will create a block storage in the GRA11 region with a size of 10 GB. Add the following lines to a file named simple_blockstorage.tf:
Then we will attach it to the target instance.
The instance and the volume must be in the same region.
Add the following lines below the previous ones:
You can create your block storage volume and attach it to the desired instance by entering the following command:
The output should look like this:
Go to the Volumes drop-down section, click Volumes and then Create Volume.

Fill in the Volume Name field and select the type of volume you want. Then click on Create Volume
Please note that if the volume type "high-speed-gen2" or "luks" does not appear in the list, this means that it is not available in this region.

To attach this volume to an instance, on your volume line, click the arrow at the end of the line next to Edit Volume. Then click on Manage Attachments.

Select the instance to which you wish to attach your volume, then click on Attach Volume.

Please note that if the volume type "high-speed-gen2" or "luks" does not appear in the list, this means that it is not available in this region.
Types of volumes:
- Classic
- High-speed
- High-speed-gen2
- Classic-luks
- High-speed-luks
- High-speed-gen2-luks
The types ending in -luks are encrypted (LUKS).
Creating a -luks volume automatically generates a dedicated key.
Do not modify or delete this key if it is linked to a Block Storage volume. Doing so would make the data on that volume and all its snapshots permanently unrecoverable.
List the volume types available in the region:
Create a volume, specifying at least its size (in GB) and a type from those listed above. You can also specify a name for your volume at the end of the command.
To attach a volume to an instance available in the region, use the following command:
Configuring the new disk
The examples below presume you are logged in as a user with elevated permissions.
Using Linux
Establish an SSH connection to your instance, then use the command below to list the attached disks.
vda in this example refers to the default disk of the instance. The additional disk will then be labelled vdb.
Create a partition on the additional disk using the commands below.
If your additional disk is less than 2TB:
If your additional disk is larger than 2TB:
Next, format the new partition vdb1 using the command below.
Mount the partition with the following commands:
Finally, check the mount point using this command:
The mounting is not persistent because the disk will be detached when the instance reboots. In order to automate the mounting process, the fstab file needs to be edited.
First, retrieve the UUID (block ID) of the new volume:
Open /etc/fstab with a text editor:
Add the line below to the file and replace the UUID with your own:
Save and exit the editor. The disk should be automatically mounted after every reboot from now on.
Using Windows
Establish a remote desktop (RDP) connection to your Windows instance.
Once logged in, right-click on the Start Menu button and open Disk Management.

The new disk will be displayed as an unknown volume with unallocated space.

If the disk is marked as offline here, it needs to be initialised first. You can use the Windows GUI or the DISKPART utility to achieve this. Otherwise, proceed with formatting the disk in Disk Management.
Initialising the disk in Disk Management
Right-click on the disk and select Online.
If the disk is marked as offline here, this is likely due to a policy in place on the instance. To fix this, right-click on the disk and select Online.

Then right-click it again and this time select Initialise Disk.

Next, select MBR if your additional disk is less than 2TB, or GPT if it is more than 2TB, then click OK.

Initialising the disk with DISKPART
Right-click on the Start Menu button and open Run.

Type cmd and click OK to open the command line application.

At the command prompt, open DISKPART:
Use the following series of DISKPART commands to set the disk to online:
Formatting the disk
In Disk Management, right-click on the new disk and select New Simple Volume....

In the wizard, click Next to specify the volume size. It should be set to maximum by default. Click Next to continue.

Leave the new drive letter at default or select a different one, then click Next.

Label the volume (optional) and confirm the formatting options by clicking Next.

In the last window, click Finish to format the disk.

The disk will be available as a drive in File Explorer after the operation.
Detach a volume
If you wish to detach a volume from your instance, the best practice is to unmount the volume in the operating system before detaching it from the instance.
An error message may appear if you have software or processes running on the additional disk. In this case, it is recommended to stop all processes before continuing.
Here's how to unmount the volume from the operating system before detaching it from the instance :
Establish an SSH connection to your instance, then use the command below to list the attached disks.
Unmount the partition using the command below:
Remove the device ID from the fstab to complete the unmount process, if this is not done, the partition will be mounted right back after a reboot.
Save and exit the editor.
Establish a remote desktop (RDP) connection to your Windows instance.
Once logged in, right-click on the Start Menu button and open Disk Management.

Right click on the volume you wish to unmount and select Change Drive Letter and Paths....

Click on Remove to remove the drive.

Next, click on Yes to confirm the disk removal.

When finished, you can close the Disk Management window.
Finally, we will detach the volume from the instance:
Go to the Public Cloud section of your OVHcloud Control Panel and click on Block Storage in the left-hand menu under Storage & backup.
Click the ... button next to the corresponding volume and select Detach from instance.

Click on Confirm in the pop up window to start the process.

Start by deleting the lines previously created in your Terraform file:
Enter the following command to check whether the correct resource will be deleted:
The output should look like this:
Then apply the changes by entering this command:
The output should look like this:
Go further
Increasing the size of an additional disk
Join our community of users.