Create the new volume
In order 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 fill-in the fields in the form, , including the desired size, and press "Create Volume" :
and 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 volume, go to the Instances tab and access the instance page for which you need to attach the extra volume.
Then expand the top right menu and press "Attach Volume" :
then it is possible to select the volume to be attached and can be pressed "Attach Volume" :
once done the new volume should appear among the "Volumes Attached" within the information under the instance page :
Format the new disk
In order to use the new attached volume within the virtual machine it requires to be formatted and mounted.
You must login to the virtual machine and follow the instructions below.
After booting up, the VM should now have an additional disk, typically named vd(SOME_LETTER) or sd(SOME_LETTER) - below, we assume the disk is named vdb, but it may be vdc, vdd, etc if you already had a second, third, etc disk.
You can check what disks are attached 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 expect to see something like this, showing vdb with no partitions:
$ 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 vdb1) filling the disk, labelled "data-1" here, and format it. You may use parted and mkfs.ext4:
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
You may partition the disk differently and use any other filesystem type. It is a good idea to use the same name for the volume to set the label of the new filesystem
- 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:
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:
sudo mkdir /data1
Mount the file system this first time around and check its ok. It should be automatically mounted on future reboots (test this now if it's important).
sudo mount -av
Attaching many volumes
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 more than 12-13 volumes, the the VM must be powered off, before more devices are added.





