How can I expand my disk space after changing the tariff?
After changing the tariff plan, you must manually expand the partition of your disk image so that you can use additional space according to the new tariff plan.
Attention! To avoid data loss, we strongly recommend that you create a backup copy before performing this operation!
Expanding disk space in Windows
The following will describe a typical case of disk space expansion in Linux, when a disk image has a single partition.
1. Connect to the server via ssh
2. Enter the command
fdisk -l /dev/vda
as shown in the screenshot, and make sure that the size of the disk image has indeed been increased (in this example, the tariff has been changed from 40 to 60 GB of disk space).
In the output of the command, you will see the size of the disk image, it must match your data plan
3. Next, using the same fdisk utility, we will proceed to the new disk layout
Type the command:
fdisk /dev/vda
- Delete the current section by typing d and pressing Enter
- Create a section by typing n and press Enter. Next, agree with the default settings suggested by the fdisk utility (see the screenshot below with the entire process)
- Save the partition table changes and exit fdisk by typing w and pressing Enter
- Restart your server
The entire procedure for recreating the section is shown in the current screenshot:
4. Reconnect to the server via ssh and resize the file system using the command
resize2fs /dev/vda1
5. The procedure is completed, now with the df command you can check the size of the partition
To expand the disk space in Windows, you need to proceed as follows:
1. Log in to your VDS and press the Win+R key combination.
2. In the window that opens, enter the command diskmgmt.msc and click OK.
3. You will see the disk management interface where you can complete the task you need.
For example, to expand an existing disk "C", right-click on it and select "Expand volume...".