You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/public_cloud/compute/create_and_configure_an_additional_disk_on_an_instance/guide.en-gb.md
+291-73
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,23 @@
1
1
---
2
2
title: Creating and configuring an additional disk on an instance
3
3
excerpt: Find out how to attach a new volume to your Public Cloud instance
4
-
updated: 2023-10-16
4
+
updated: 2024-12-24
5
5
---
6
6
7
+
<style>
8
+
details>summary {
9
+
color:rgb(33, 153, 232) !important;
10
+
cursor: pointer;
11
+
}
12
+
details>summary::before {
13
+
content:'\25B6';
14
+
padding-right:1ch;
15
+
}
16
+
details[open]>summary::before {
17
+
content:'\25BC';
18
+
}
19
+
</style>
20
+
7
21
## Objective
8
22
9
23
It is possible to create additional disks for your Public Cloud instances.
@@ -12,13 +26,14 @@ This can be useful in cases where:
12
26
- You want to increase your storage capacity without changing the instance model.
13
27
- You want to have a highly available, high-performance storage.
14
28
- You want to move your storage as well as your data to another instance.
29
+
- You want to prepare the environment if you want to use [Terraform](/pages/public_cloud/compute/how_to_use_terraform).
15
30
16
31
**This guide explains how to create an additional disk and configure it on your instance.**
17
32
18
33
## Requirements
19
34
20
35
- Access to the [OVHcloud Control Panel](/links/manager)
21
-
- A [Public Cloud Instance](https://www.ovhcloud.com/en-gb/public-cloud/) in your OVHcloud account
36
+
- A [Public Cloud Instance](/pages/public_cloud/compute/public-cloud-first-steps) in your OVHcloud account
22
37
- Administrative (sudo) access to your instance via SSH (Linux) or RDP (Windows)
23
38
24
39
> [!warning]
@@ -30,6 +45,126 @@ This can be useful in cases where:
30
45
31
46
### Attaching a new volume
32
47
48
+
> [!tabs]
49
+
> **Via the OVHcloud Control Panel**
50
+
>>
51
+
>> Log in to the [OVHcloud Control Panel](/links/manager) and open your `Public Cloud`{.action} project. Then open `Block Storage`{.action} in the left-hand menu.
52
+
>>
53
+
>> In this section, click on the button `Create a volume`{.action}.
>> Follow the configuration steps in order to select options for location, disk type and disk capacity. Then enter a name for the volume and confirm by clicking on `Create the volume`{.action}.
>> To the right of the volume, click on the `...`{.action} button, then select `Attach to instance`{.action}.
66
+
>>
67
+
>> {.thumbnail}
68
+
>>
69
+
>> In the popup window, choose an instance from the list and click on `Confirm`{.action} to attach the disk.
70
+
>>
71
+
>> {.thumbnail}
72
+
>>
73
+
>> The process of attaching the disk to your instance will now begin. This may take a few minutes to complete.
74
+
>>
75
+
>> > [!warning]
76
+
>> > Make sure to not leave the current page in your OVHcloud Control Panel while the disk is being attached. This might interrupt the process.
77
+
>> >
78
+
>>
79
+
> **Via Terraform**
80
+
>>
81
+
>> To create a simple block storage volume, you need 3 elements:
82
+
>>
83
+
>> * The name of the volume
84
+
>> * The region
85
+
>> * The size of the volume in GB
86
+
>>
87
+
>> 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*:
Log in to the [OVHcloud Control Panel](/links/manager) andopen your `Public Cloud`{.action} project. Then open`Block Storage`{.action} in the left-hand menu.
34
169
35
170
In this section, click on the button `Create a volume`{.action}.
@@ -351,77 +486,160 @@ If you wish to detach a volume from your instance, the best practice is to unmou
351
486
> 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.
352
487
>
353
488
354
-
#### On Linux
355
-
356
-
Establish an [SSH connection to your instance](/pages/public_cloud/compute/public-cloud-first-steps#connect-instance), then use the command below to list the attached disks.
357
-
358
-
```bash
359
-
lsblk
360
-
```
361
-
362
-
```console
363
-
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
364
-
vda 254:0 0 10G 0 disk
365
-
└─vda1 254:1 0 10G 0 part /
366
-
vdb 8:0 0 10G 0 disk
367
-
└─vdb1 8:1 0 10G 0 part /mnt/disk
368
-
```
369
-
370
-
Unmount the partition using the command below:
371
-
372
-
```bash
373
-
sudo umount /dev/vdb1
374
-
```
375
-
376
-
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.
377
-
378
-
```bash
379
-
sudo nano /etc/fstab
380
-
```
381
-
382
-
Save and exit the editor.
383
-
384
-
Go to the `Public Cloud`{.action} section of your OVHcloud Control Panel and click on `Block Storage`{.action} in the left-hand menu under **Storage**.
385
-
386
-
Click on the `...`{.action} next to the corresponding volume and select `Detach from instance`{.action}.
When finished, you can close the Disk Management window.
415
-
416
-
Go to the `Public Cloud`{.action} section of your OVHcloud Control Panel and click on `Block Storage`{.action} in the left-hand menu under **Storage**.
417
-
418
-
Click on the `...`{.action} next to the corresponding volume and select `Detach from instance`{.action}.
Click on `Confirm`{.action} in the pop up window to start the process.
423
-
424
-
{.thumbnail}
489
+
Here's how to **unmount the volume** from the operating system before detaching it from the instance :
490
+
491
+
> [!tabs]
492
+
>**On Linux**
493
+
>>
494
+
>> Establish an [SSH connection to your instance](/pages/public_cloud/compute/public-cloud-first-steps#connect-instance), then use the command below to list the attached disks.
495
+
>>
496
+
>>```bash
497
+
>> lsblk
498
+
>>```
499
+
>>
500
+
>>```console
501
+
>>NAMEMAJ:MINRMSIZEROTYPEMOUNTPOINT
502
+
>> vda 254:0010G0 disk
503
+
>> └─vda1 254:1010G0 part /
504
+
>> vdb 8:0010G0 disk
505
+
>> └─vdb1 8:1010G0 part /mnt/disk
506
+
>>```
507
+
>>
508
+
>> Unmount the partition using the command below:
509
+
>>
510
+
>>```bash
511
+
>> sudo umount /dev/vdb1
512
+
>>```
513
+
>>
514
+
>> Remove the device IDfrom the fstab to complete the unmount process, if this isnot done, the partition will be mounted right back after a reboot.
515
+
>>
516
+
>>```bash
517
+
>> sudo nano /etc/fstab
518
+
>>```
519
+
>>
520
+
>> Save andexit the editor.
521
+
>>
522
+
>**On Windows**
523
+
>>
524
+
>> Establish a remote desktop (RDP) connection to your Windows instance.
525
+
>>
526
+
>> Once logged in, right-click on the `Start Menu`{.action} button andopen`Disk Management`{.action}.
>> When finished, you can close the Disk Management window.
543
+
544
+
Finally, we will detach the volume from the instance:
545
+
546
+
> [!tabs]
547
+
>**Via the OVHcloud Control Panel**
548
+
>>
549
+
>> Go to the `Public Cloud`{.action} section of your OVHcloud Control Panel and click on `Block Storage`{.action} in the left-hand menu under **Storage**.
550
+
>>
551
+
>> Click the `...`{.action} button next to the corresponding volume and select `Detach from instance`{.action}.
0 commit comments