Elastic Block Storage (Linux)

Elastic block storage volume configuration on Linux servers

Deploy & Manage Volumes

Create a new volume

In case you don't have any storage devices in your project yet, click on Storage tab at Client Portal and you will see the following:

Screenshot 2019-05-09 at 08.44.50

In order to create a new volume click on "Add volume" button then select region, add description of your volume and choose desired size. Click "Add volume".

Screenshot 2019-05-09 at 12.14.45

Attach / Detach volume at Client Portal side

When volume is created you need to attach it to the desired server in order to mount and use it.

Screenshot 2019-05-09 at 09.04.22

In order to do that click on the volume management icon and select "Attach volume". Choose server to attach and click on "Attach Volume".

Screenshot 2019-05-09 at 12.16.35

Attach volume at the server side

Once server has been attached at the Client Portal, you need to configure it at your server side in order to mount and use it. To do so, we have prepared a script which automates the configuration process for you.

wget -O /usr/local/bin/cherry-elastic-storage "https://raw.githubusercontent.com/cherryservers/cherry-elastic-storage/master/cherry-elastic-storage"

You will find all the required variables at the Client Portal after volume attachment is done.

Screenshot 2019-05-09 at 14.35.12

After you import required variables and download the script run in your SHELL environment:

chmod +x /usr/local/bin/cherry-elastic-storage
cherry-elastic-storage -v $vlan_id -z $vlan_ip -d $portal_ip -i $initiator -e

At the end of the script processing you will be provided with block storage device you will use for further actions like creating file system and mounting it.

Screenshot 2019-05-09 at 15.54.12

Bear in mind that volume name will be different than in this example, so use volume name provided by the script.

Create file system on the volume

In order to use the volume you need to create a file system on it first. To do so, you may use following command:

Screenshot 2019-05-09 at 15.59.10

Mounting the volume

After volume is successfully formatted in order to access it for further actions you need to mount it. To do so, you may use such command:

Screenshot 2019-05-09 at 16.01.19

Once it's done, you can put data on your volume.

To make volume mount permanent so it can survive reboot of the server, execute following command:

Screenshot 2019-05-09 at 16.03.35

The _netdev option ensures that system will not try to mount the file system until network is available. It is necessary option.

Detach volume

If you want to detach volume to delete it or to move and attach to another server:

  • Unmount volume from the system
  • Detach it via command cherry-elastic-storage. Use -q option instead of -e to detach volume
  • Detach it via Client Portal
  • Now you may attach it to another server or delete if not required anymore.