For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/bare-metal-cloud/vps/configuring-additional-disk.md.
  • English

Configuring an additional disk on a VPS

View as Markdown

Learn how to enable the additional disk option and configure the storage space for use with the VPS.

With OVHcloud Virtual Private Servers, you have the option to add secure storage space as a service. This storage is separated from the internal storage capacity of the VPS solution, which makes it a secure place for your backups or other static data. The additional disk will only be accessible from the server’s IP address, and data stored on it will remain unaffected, even if the VPS is reinstalled or suffers data loss.

Warning

NOTE: This feature is currently unavailable for Virtual Private Servers in Local Zones.

 

Requirements

 

Instructions

Log in to the OVHcloud Control Panel, go to the Bare Metal Cloud section, then Virtual Private Servers, and select your VPS.

 

Subscribing to the additional disk option

After selecting your VPS, click on the Additional disk tab. Click on Order an additional disk and choose a disk size from the selection that appears.

Add disk - Configuring additional disk - step 1

Take note of the pricing information, then click on Order. You will be guided through the order process and receive a confirmation email as soon as the disk is installed.

 

Mounting the new storage space

Warning

NOTE: OVHcloud provides services for which you are responsible for their configuration and management. You are therefore responsible for their proper functioning.

This tutorial is designed to help you as much as possible with common tasks. If you are having difficulty performing these actions, please contact a specialized service provider. OVHcloud cannot provide you with technical support in this regard.

On a Linux VPS
On a Windows VPS

On a Linux VPS

If a GNU/Linux distribution is installed on your VPS, establish an SSH connection to your server from the command line terminal or by using an SSH client application.

The examples below presume you are logged in as a user with elevated permissions.

You can use the following command to verify the name of the new device:

$ lsblk

sda       8:0    0   80G  0 disk
├─sda1    8:1    0 79.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   50G  0 disk

In this example, the additional disk is named sdb.

Execute fdisk to create a partition on the disk; when prompted, enter n for a new partition and accept the subsequent defaults by pressing Enter (“↩”). Finally, use the w command to write the changes to the disk.

$ sudo fdisk /dev/sdb

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): n

Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)

Select (default p):
Partition number (1-4, default 1): 

First sector (2048-104857599, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-104857599, default 104857599):

Created a new partition 1 of type 'Linux' and of size 50 GiB.
Command (m for help): w

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Now that the partition sdb1 is created, you can format it with ext4:

$ sudo mkfs.ext4 /dev/sdb1

Creating filesystem with 13106944 4k blocks and 3276800 inodes
Filesystem UUID: a667d351-cf36-49f2-94b4-daf03d7a86a6
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Allocating group tables: done                           
Writing inode tables: done                           
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done  

The final step is to mount the disk:

$ sudo mkdir /mnt/disk
$ sudo mount /dev/sdb1 /mnt/disk

You can see in the last line that the additional disk is now mounted at /mnt/disk:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           385M  1.1M  384M   1% /run
/dev/sda1        78G  2.4G   75G   4% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda15      105M  3.9M  101M   4% /boot/efi
/dev/loop1       68M   68M     0 100% /snap/lxd/18150
/dev/loop3       32M   32M     0 100% /snap/snapd/10707
/dev/loop4       56M   56M     0 100% /snap/core18/1944
/dev/loop5       70M   70M     0 100% /snap/lxd/19188
tmpfs           385M     0  385M   0% /run/user/0
/dev/loop6       56M   56M     0 100% /snap/core18/1988
/dev/loop2       32M   32M     0 100% /snap/snapd/11036
tmpfs           385M     0  385M   0% /run/user/1000
/dev/sdb1        49G   53M   47G   1% /mnt/disk
Info

This previous step is not persistent because the disk will be detached if the VPS is restarted. To automate the mounting process, the fstab file needs to be edited.

First, retrieve the UUID (block ID) of the device:

$ sudo blkid
/dev/sda1: LABEL="cloudimg-rootfs" UUID="e616a2cd-3c02-4c79-9823-9b1bb5c13b26" TYPE="ext4" PARTUUID="a44089a3-f407-41e6-b7a5-1ed7672cef20"
/dev/sda15: LABEL_FATBOOT="UEFI" LABEL="UEFI" UUID="4411-1580" TYPE="vfat" PARTUUID="e1746ac7-80c1-4859-9b4d-fa6ce11b3ae9"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/sda14: PARTUUID="7d19a2c9-75df-443e-8301-0bb85931df7d"
/dev/sdb1: UUID="87571b68-30e1-498b-a64c-49ec5cd4f31c" TYPE="ext4" PARTUUID="c965cbdf-01"

Open /etc/fstab with a text editor:

$ sudo nano /etc/fstab

Add the line below to the file and replace the UUID with your own:

UUID=87571b68-30e1-498b-a64c-49ec5cd4f31c /mnt/disk ext4 nofail 0 0

Save and exit the editor. The disk should be automatically mounted after every reboot from now on.

 

Cancelling the additional disk option

From the Home tab, in the Your configuration panel. Click the more options ... button next to Additional disks and click on Cancel.

Add disk - Configuring additional disk - step 13

 

Go further

Browse all the Virtual Private Servers guides.

Browse the rest of the OVHcloud US documentation for guides on our other products and services.

Learn more about VPS on the OVHcloud US website.