When switching to a higher tariff, all parameters of the virtual server are changed automatically. Including increasing the size of the hard drive. However, the operating system continues to work with the size of the partition that was specified during first installation.
There are two ways to expand a partition. Either simply reinstall the OS through the panel, or perform a series of simple operations:
Operations with mounted root file system are unavailible. Therefore, all actions will be performed by booting from the RESCUE disk.
To do this, the server needs to be turned off by running # poweroff.
1. In the control panel, select the desired VM and click on the DISKS icon.
2. Select ISO folder
3. In the drop-down list of available images, select any RESCUE image.
4. The priority of the download is important - you must assign this ISO-image FIRST.
5. The disk is added and is the first in the boot order.
6. After that turn on VM and go to the VNC consol.
7. Booting from the RESCUE disc has begun, just press ENTER.
8. In the screenshot http://www.system-rescue-cd.org/
9. We pass to the main part.# lsblk - show block devices. The section we need is /dev/vda2# e2fsck -f /dev/vda2 - check the disk for errors before changing it.# resize2fs /dev/vda2 - increase the size of the FS to the maximum possible.# poweroff - turn off the server.
# e2fsck -f /dev/vda2
# resize2fs /dev/vda2
10.Unasign the RESCUE disk and turn on VM.
11. The file system is increased to the maximum partition size.