📜 ⬆️ ⬇️

Managing server disk space on the fly: 1cloud experience



We continue to talk about how the frontent and backend infrastructure of the hosting provider are built and describe ways to make it easier for clients to work with it. In today's topic, we will discuss the possibility of dynamic expansion and reduction of disk space of virtual servers implemented in the 1cloud system.

In the previous series:
')

Problem: expand, but not reduce


In previous versions of our control panel, there was the possibility of expanding disk space during operation — the client could order a virtual server with one disk, and then increase this number (this required a server restart).

The disadvantage of this whole configuration was the impossibility of “rolling back” (plus the mentioned reboot) - when the need for additional disk space disappeared (for example, work was done on migration or completed work that required additional disk space), it was impossible to refuse it, and for all even unused resources had to be paid. This problem had to be solved.

What to do


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

The development of new functionality did not take much time (1.5 - 2 people in terms of project management) and was accompanied by a standard change process - first the control panel and external site interfaces were refined, then it was time to write methods for working with vCloud Director (creating, change, remove disks). Next, it was necessary to modify the task handler and thoroughly test the system’s work (and, in particular, to identify the effect of the new function on other system features, such as working with snapshots and backups).

How it works


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



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



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



Not so simple


As is usually the case, life makes its own adjustments to any project, and we are faced with certain difficulties in the process of creating a new function.

Obviously, in most cases it is not advisable to transfer the entire virtual machine to SSD, but it is much more efficient to break it into two parts:

  1. The part that does not require a large number of IOPS, such as the operating system - it can be placed on the SAS;
  2. The part that is sensitive to IOPS is 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 setting a separate StoragePolicy for a particular disk, but only at the level of the entire virtual machine. Accordingly, we decided to release the release panel with the ability to migrate the entire "virtual" on the SSD.

Plans


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

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

That's all, thank you for your attention. We will be happy to answer questions in the comments. Subscribe to our blog - in the next posts we will continue to talk about various aspects of building and optimizing the hosting infrastructure.

Source: https://habr.com/ru/post/255913/


All Articles