Server disk space management on the fly: 1cloud experience



    We continue to talk about how the front-end and back-end infrastructure of the hosting provider are built and describe ways to facilitate working with it for customers. In today's topic, we will talk about the possibility of dynamic expansion implemented in the 1cloud system and reduce the disk space of virtual servers.

    In previous series:


    Problem: expand but not reduce


    In previous versions of our control panel, it was possible to expand disk space right during operation - the client could order a virtual server with one disk, and then increase this number (this required a server reboot).

    The downside of all this configuration was the inability to “roll back” (plus the reboot mentioned) - when there was no need for additional disk space (for example, migration work was completed or work that required additional disk space was completed), it was impossible to refuse it, and for everything even unused resources had to be paid. This problem needed to be solved.

    What to do


    For this purpose, the opportunity was developed at any time to add additional drives to the virtual server or remove from it. In addition, in the process, you can increase the capacity of these additional drives.

    The development of new functionality did not take much time (1.5 - 2 people a week in terms of project management) and was accompanied by the standard process of making changes - first the control panel and external site interfaces were finalized, then it was time to write methods for working with vCloud Director (creating, change, delete drives). Next, it was necessary to refine the task handler and thoroughly test the system (and, in particular, to identify the impact of the new function on other system features like working with snapshots and backups).

    How it works


    The operation of adding, removing or changing an additional disk does not require a server reboot, that is, you can optimize disk space on an already running virtual machine.
    To do this, the client needs to go into the server settings in the administration panel and specify the desired disk space parameters in the graphical interface of the configurator:



    Initially, a virtual server can also be created with an SSD disk.



    In the process, you can migrate the server from SAS to SSD and vice versa:



    Not so simple


    As it usually happens, life makes its own adjustments to any project, we have encountered certain difficulties in the process of creating a new function.

    It is obvious that in most cases it is not advisable to transfer the entire virtual machine to an SSD, but it is much more efficient to split it into two parts:

    1. A part that does not require a large number of IOPS, such as an operating system, can be placed on the SAS;
    2. The part that is sensitive to IOPS should be placed as an additional disk on the SSD.

    But, unfortunately, the version of vCloud Director 5.5 that we are currently using does not allow you to set a separate StoragePolicy for a particular drive, but only at the level of the entire virtual machine. Accordingly, we decided to release a panel release with the ability to migrate the entire virtual machine to SSD.

    Plans


    The function of dynamic expansion of disk space has been working in the "production" not so long ago, and there are still some points that need to be improved.

    In particular, to solve the problem of the impossibility of ordering additional SSD disks described above, they planned to upgrade the version of the management software to version 5.6. Immediately after that, in the 1cloud panel, you will be able to order additional disks on both SAS and SSD.

    That's all for today, thanks for watching. We will be happy to answer questions in the comments. Subscribe to our blog - in the following posts we will continue to talk about various aspects of building and optimizing the hosting infrastructure.

    Also popular now: