...
| Table of Contents |
|---|
Create the new volume
In order to To create a new volume, access the "Volumes" menu on the left panel in Horizon and then click "Create Volume" as show in the screenshot below:
then fillFill-in the fields in the form, , including the desired desired size, and press "Create Volume" :
and the The new volume is created:
Attach the new volume
Once the volume has been created it can be then attached to an instance.
To attach the volumeFor this, go to the Instances tab and access select the instance page for which you need to attach which will get the extra volume.
Then expand open the top right menu and press click "Attach Volume" :
then it is possible to select Select the volume to be attached and can be pressed click "Attach Volume" :
once done the new volume should appear among The new volume will then appear in the "Volumes Attached" within the information section under the instance page page :
Format the new disk
In order to To use the new attached volume within on the virtual machine, it requires needs to be partitioned, formatted and mounted.
Follow the instructions below.You must login
- Login to the virtual machine
...
- .
...
The VM will now have an additional disk, typically named vd(SOME_LETTER) or sd(SOME_LETTER)
...
. We will assume the disk is named vdb, but it may be vdc, vdd,
...
... if the VM already had additional disks.
Check the attached disks by running
lsblk, which shows disks (e.g. vda, vdb) and partitions on the disks (vda1, vda2, etc for partitions 1 & 2 on vda).You should
...
see something like this, showing vdb with no
...
partition:
Code Block $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS vda 252:0 0 30G 0 disk └─vda1 252:1 0 30G 0 part / vdb 252:16 0 10G 0 disk
...
Create a single partition (number 1, so so vdb1) filling the disk, labelled "data-1" here, and format it. You may can use parted and mkfs.ext4:
Code Block sudo parted --script -- /dev/vdb mklabel gpt sudo parted --script --align optimal -- /dev/vdb mkpart primary ext4 0% 100% sudo mkfs.ext4 -L data-1 /dev/vdb1
Info You may partition the disk differently and use any other filesystem type. It is a good idea recommended to use the same name for as the volume to set for the label of the new filesystem (here:
data-1).- To have the disk automounted on start up, add an entry to your VM's
/etc/fstab,adapting the label to the name you chose earlier:Code Block echo "LABEL=data-1 /data1 ext4 defaults 0 0" | sudo tee -a /etc/fstab > /dev/null
Create the directory where you are mounting your filesystem. Make sure you use the same path as defined in fstab:
Code Block sudo mkdir /data1
Mount the file system this first time around and check its it's ok. It should be automatically mounted on future reboots (test this now if it's important).
Code Block sudo mount -av
| Warning | ||
|---|---|---|
| ||
Due to limitations in the underlying OpenStack infrastructure at ECMWF, a user cannot hot-plug more than 12-13 pci devices. This means that if a user wants If you need more than 12-13 volumes, the the VM must be powered off, before more devices are added. |
...





