Guide: Adding a volume to an instance

content:

Adding a volume to an instance

Adding a volume

If you want to add a new volume, go to Provisioning > Instances and select the instance you are interested in.

Then go to the Action drop-down menu in the upper right corner and select the Reconfigure option.

When the "Reconfigure Instance" window appears, press the "+" button next to the volume field.

If you want to add more than one volume, just press the "+" button again.

By default, all newly created volumes are of the HDD type. If you want to add an SSD volume, please contact with our Support Team.

You can change the volume name in the new left field, and in the right you can change the volume size in gigabytes (GB).

Click the "Reconfigure" button if you want to finish the reconfiguration process and create new volumes for the instance.

WARNING: Resize actions for this instance will cause node(s) to be restarted.

Newly created volumes should be attached to the instance automatically.

You can see the newly added volumes in the "Storage" tab in the instance menu.

Creating a filesystem

First connect to the instance via ssh.

ssh -i <private_key> <user>@<floating_ip>

Execute the "lsblk" command:

lsblk -f

to check if new volumes have been attached to the instance.

Run the command below to create a file system for the selected volume:

sudo mkfs.ext4 /dev/<disk>

<disk> - volume name, which you can check with the "lsblk" command, for example: vdb

Then add the following line to the end of the /etc/fstab file:

/dev/<disk> /<mount_dir> ext4 defaults 0 1

Thanks to that after restarting the instance the file system for individual volumes will be preserved.

Mounting a volume

Then create a new directory under which the new volume will be mounted.

sudo mkdir /<mount_dir>

Finally mount the volume by command:

sudo mount /<mount_dir>

lsblk -f

Use the lsblk command to check if the mount process has completed successfully.