Utilizing OVHcloud's Public Cloud Services you are able to create an external storage device, known as a hard disk, and attach it to an instance. These devices are block-level storage and in this tutorial, we will cover how to purchase one for a public cloud project.
Adding a Hard Disk
Let's begin by logging into the OVHcloud Manager. From here, select the Public Cloud tab in the top-left corner of the page. Then, on the following screen, click the arrow button next to the project name in the top-left corner of the screen. Now, select the project with the instance on which you wish to add a block storage volume.
Next, under the "Storage" section on the left-hand sidebar, select Block Storage. If this is your first time accessing this screen, it will look like this:
To begin creating our block storage volume, click the blue Create a volume button in the center of the screen. You will be taken to the following funnel.
Select the location, type of disk, disk size, and disk name. Then, click Create the volume when you have confirmed that your selections are correct. You will have a hard disk provisioned that is not attached to any instance.
Note: In Step 2, the funnel will ask for the volume type and you will be given a choice between "Standard" and "High performance." If you select "Standard," you will be given an HDD, and if you select "High performance," you will be given an SSD.
Attaching a Hard Disk to an Instance
The next step is to attach our new hard disk to our desired instance. After provisioning the hard drive, you will arrive at the new landing page for Block Storage. Click the ellipsis (...) next to your hard disk and select the Attach to instance option.
This will generate a popup menu. Choose the instance to which you wish to attach the hard drive and click Confirm when you have confirmed that you have selected the correct instance.
We have now successfully added a hard drive to an instance. In order to use the storage, the device needs to be formatted. For information on how to do that, please check out our How to Format a Hard Disk article with instructions for Linux and Windows.
Taking a Volume Snapshot
OVHcloud offers our customers the ability to back up their block storage volumes on our public cloud infrastructure. To do so, click the Volume Snapshot button on the left-hand sidebar.
Next, click the Create a volume snapshot button. You will be redirected to the Block Storage section of the Manager. From here, click the ellipsis (...) next to the block storage volume of which you would like to create a snapshot and select Create a snapshot from the drop-down menu.
This will bring up the following popup menu. After giving the snapshot a name, click the Take a snapshot button.
Once you are finished, you can access your volume snapshot from the Volume Snapshot tab at any time.
Adding an external hard drive gives you the flexibility to detach the drive and delete instances while still retaining important data. Having the ability to save important files or just to create a bit of extra storage is a great asset. Having read this article, you should be able to confidently purchase and use a block storage volume.