How to Manage Resources in GandiCloud VPS

GandiCloud VPS offers a high level of flexibility so you can adapt the resources to your needs. On this page we will details the different ways to manage the resources of your server (RAM/CPU, Storage).

To see a complete list of the possible configurations we currently offer, visit our public website.

Extend the size of a volume

The maximum size of a volume is 1TB.

Warning

Please note that it is not possible to decrease the size of a volume.

You have two ways to extend the size of a volume:

  1. Through the Gandi user interface.

  2. Through the command line interface (CLI).

Extend a Volume Through the Gandi Website

Follow these steps to extend the volume through Gandi’s interface.

  1. After logging into your Gandi account, select “VPS” in the left navigation menu.

  2. Click on the “Volumes” tab.

  3. Find the volume you want to extend in the list and click the three dots icon next to it. Select the option, “Increase Size.”

  4. Choose the size that you want then click “Increase size”.

Extend a Volume With the CLI

Be sure that your openstack CLI is configured correctly, and that you have installed the latest version (at least version 5.5.0).

First, find the openstack id of the volume that you want to extend by checking the volume list.

openstack volume list

To extend the size of a volume, you will have to use at least the version 3.42 of the OpenStack API:

openstack --os-volume-api-version 3.42 volume set <your-volume-id> --size <size-in-GB>

Note

Whatever the method used to extend your volume, billing is done post-payment,so you will see on your next GandiCloud invoice two lines corresponding to this volume: The first for consumption with the old size and a second one corresponding to the monthly consumption of the volume with its new extended size.

Extend partition on the server

After having extended the volume size, you will have to extend the partition size to finalize the operation, or you will not benefit of the change of size. You have two ways to do that :

  • simply initiate a server restart

  • or, if this is the server’s boot volume, you will have to log in the server via SSH and enter the following command, in [sudo] :

$ growpart /dev/xvda 1
$ resize2fs /dev/xvda1

You can verify the result of the previous command by entering the following command :

$ df -h

Et voilà ! You can enjoy you additional storage space on your volume.

Add a new volume to your server

Like all the operations on your server GandiCloud VPS, you have two methods to create and attach an additional volume to your server :

  • From Gandi interface

  • From CLI

From Gandi Interface

Operation is done via two steps : First, creation of the volume, then the association of this volume to the server. First access to the creation page, by selecting [Create a resource] on the GandiCLoud VPS page. From the dropdown menu, choose [New volume]. On the dedicated page, choose :

  • a name to easily idenitfy your resource

  • a size (from 5 GB to 1 TB)

  • eventually an OS image for this volume

Validate the creation and after a few seconds your volume will be activated and available.

Then verify that the status of the volume is AVAILABLE (top of the page, under the Volume ID), so you can attach it to an existing server. To do this, click on the top button [🔗 Attach] from the Volume detail page of the chosen volume. Then you just have to select the VPS you want to attach the volume to and validate the operation.

The attachment can take a few seconds, and after the status of the volume will be In use.

From CLI

To create and attach a new volume from Opentstack CLI, you only have to use two commands :

To create the volume :

$ openstack volume create --size <volume-size> <volume-name>

If you want to check the information about the volume :

$ openstack volume show <volume_uid>

This way you can verify that the volume status is at Available before attaching it to the server.

When all is in order, you can attach the volume to the server :

$ openstack server add volume <server_id> <volume_id>

Then, to validate the volume is correctly attached to the server, reuse the command :

$ openstack volume show <volume_uid>

Change the RAM/CPU for a VPS

Altering the RAM/CPU currently requires the usage of the openstack CLI.

Using the CLI, first list the different “flavors” offered.

openstack flavor list

Note the ID of the “flavor” you wish to apply to your VPS. Then run the below command, using the flavor_id you just obtained along with the server_name of your VPS.

openstack server resize --flavor {flavor_id} {server_name}

Lastly, wait a minute for the resize operation to complete, which will incur a reboot of the VPS.