Sign In
Sign In

Server Configuration

Updated on 26 March 2024

You can manage your cloud server’s configuration in the Plan tab.

Image10

Here, you can:

  1. Select a new plan for the server thus changing the disk space, the amount of RAM and the number of CPU cores;
  2. Add up to 3 additional disks to your server;
  3. Delete disks;
  4. Increase the disk size.

Operations with disks are not available if a snapshot is created for the server.

Changing the Server Plan

You can only upgrade your server’s plan. Downgrading is not possible as reducing the disk size can damage the file system.

To change your server's plan:

  1. Go to the Plan tab.

  2. Click Select plan

  3. Choose a new plan for the server.

  4. Click Save and reboot to apply the changes.

  5. Confirm the action.

Image6

Adding New Disks

To add an additional disk to your server:

  1. Go to the Plan tab.

  2. Click Add disk.

Image3

  1. Set the desired disk size and click Add and reboot.

Image14

  1. Confirm the action.

You will see the new disk in the control panel.

Image16

Configuring the Disk in the OS

Now you have to add the disk in the operating system. 

On Linux, disk setup typically consists of the following steps:

  1. Create a partition on the disk

  2. Create a filesystem

  3. Mount the disk (if needed)

  4. Add an entry to /etc/fstab

Disk Naming Notes

If your server was created before May 2025, disks will be named like vd*. On servers created after May 2025, disks will be named sd*. Keep this in mind when following the steps below.

In the examples, we’ll prepare the sdb disk, as sda is the main system disk, and vda is reserved for cloud-init by default.

Replace sdb in the commands with the actual disk name on your system.

You can check disk names on your system with:

lsblk

Example output:

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop1    7:1    0 63.9M  1 loop /snap/core20/2318
loop2    7:2    0   87M  1 loop /snap/lxd/29351
loop3    7:3    0 50.9M  1 loop /snap/snapd/24505
loop4    7:4    0 63.8M  1 loop /snap/core20/2599
loop5    7:5    0 89.4M  1 loop /snap/lxd/31333
loop6    7:6    0 50.9M  1 loop /snap/snapd/24718
sda      8:0    0   15G  0 disk 
└─sda1   8:1    0   15G  0 part /
sdb      8:16   0   10G  0 disk 
vda    252:0    0    1M  1 disk

Here, sdb is the newly added disk.

Step 1. Creating a Partition

To create a partition, use fdisk:

fdisk /dev/sdb

Inside fdisk:

  • Press n to create a new partition
  • Choose p for a primary partition
  • Leave the remaining options at their default values (press Enter)
  • Press w to write the changes and exit

29f60c65 51a8 4924 926b Ad026c3771dd.png

Run the command again to verify the partition was created:

lsblk

In our example, the new partition will be sdb1.

Step 2. Creating a Filesystem

Next, create a filesystem on the new partition. In this example, we’ll use EXT4:

mkfs.ext4 /dev/sdb1

The filesystem is now ready.

Step 3. Mounting the Disk

To start using the disk, mount it to a directory. Each disk should have its own mount point.

For example, if you later add another disk (sdc), it should be mounted to a different directory.

Create a mount directory:

mkdir /mnt/disk2

Mount the disk:

mount -o barrier=0 /dev/sdb1 /mnt/disk2

You can now store files in /mnt/disk2, and they will be written to the new disk.

Step 4. Adding an Entry to /etc/fstab

To make the mount persistent after a reboot, add an entry to /etc/fstab.

You can reference the disk by its device name (e.g. sdb1), but this name may change if disks are reattached or other disks are removed. Using a UUID is recommended, as it is unique and stable.

To find the UUID, run:

lsblk -o NAME,UUID

Example output:

sda    
└─sda1 fcafbb78-fd6c-4083-82d8-3c06bd6ad4b1
sdb    
└─sdb1 534c6694-d2b0-4867-843b-b8a934bf0e5d
vda    041E-4E90

In this case, the UUID of our disk is 534c6694-d2b0-4867-843b-b8a934bf0e5d.

Edit /etc/fstab:

nano /etc/fstab

Add the following line (replace the UUID with your own):

UUID=<disk-uuid> /mnt/disk2 ext4 defaults 0 2

Resizing the Disk

We recommend creating a server backup before resizing disks.

You can only increase the disk’s size. Decreasing the size is not possible as it can seriously damage the file system.

In most cases, after you resize the disk in the control panel, the disk will be repartitioned automatically. 

However, if you have previously partitioned the disk yourself and now it has two or more logical partitions, you will need to repartition manually.

Main Disk

To resize your main disk, simply change your server plan:

  1. Go to the Plan tab.
  2. Click Select plan
  3. Select a plan with the sufficient disk size.
  4. Click Save and reboot to apply the changes.
  5. Confirm the action.

Additional Disk

To change the size of an additional disk:

  1. Go to the Plan tab.
  2. Hover over the disk and click on the cog icon.
  3. Select new disk size.
  4. Click Save.

Image4

Partitioning the Disk

In most cases, after you resize the disk in the control panel as described above, the disk will be repartitioned automatically. 

However, if you have previously partitioned the disk yourself and now it has two or more logical partitions, you will need to repartition manually, following the steps described below.

Step 1. Boot the server in the recovery mode:

  • Go to the Access tab.

  • Click Change in the OS boot mode section.

Image9

  • Select Booting from the recovery disk.

Image7

  • Click Save and reboot.

Step 2. Go to the Console tab and enter the following command using your disk name:

parted /dev/vda

You can check disk names in your system with the command:

fdisk -l

Step 3. Execute the print command and view the list of partitions in its output.

Image2

  • If you want to extend the last partition so it takes all the free space on the disk, go to step 4a.

  • If you want to create a new partition, proceed to step 4b.

We do not cover in this article the cases when you need to create several new partitions, but you can find those guides online.

If at this point you need to delete a partition, you can do it with the rm command, specifying the partition number, for example:

rm 3

Step 4. Partition the disk.

Step 4a. To extend the last partition, run the resizepart command, specifying the desired partition number and size. If you enter 100%, the partition will take up all available space on the disk.     

resizepart 3 100%

Next:

    • Run print to check the result.

    • Enter q to exit the partitioning program.

    • Proceed to Step 5.

Step 4b. To create a new partition in a free disk space, run the mkpart command, specifying the partition type (primary or extended), its number and size. If you enter 100%, the partition will take up all available space on the disk.     

mkpart primary 4 100%

Next:

    • Enter yes when prompted to confirm the new partition size.

    • Run print to check the result.

    • Enter q to exit the partitioning program.

    • Create a file system in the new partition with the command below, specifying the partition name.

mkfs.ext4 /dev/vda4

Image1

    • Proceed to Step 5.

Step 5. Check for errors and correct the file system structure. 

To do this, run the e2fsck command in the console, specifying the name of the partition from the Step 4 (/dev/vda3, /dev/vda4, etc.):

e2fsck -yf /dev/vda3

Image13

Step 6. Resize the file system, specifying the partition name:

resize2fs /dev/vda3

Image19

Step 7. Check the file system after expansion.

Mount the partition that was modified (/dev/vda3, /dev/vda4, etc.):

mount /dev/vda3 /mnt

Check that the size was successfully changed:

df -h

Image15

If the disk size has remained the same, we recommend going back to Step 1 and repeating the procedure once again.

If the disk size has changed, unmount the system disk:

umount /mnt

8. Boot the server in the standard mode.

  • Go to the Access tab.
  • Click Change in the OS boot mode section.
  • Select Standard mode.
  • Click Save and reboot.

Deleting Disks

To delete a disk:

  1. Go to the Plan tab.

  2. Hover over the disk and click on the bin icon.

Image18

  1. Confirm deleting the disk.

You also need to delete the disk from the operating system by removing the entry from the /etc/fstab file.

Edit the /etc/fstab file

If the server has only one additional disk:

  1. Open the file:

nano /etc/fstab
  1. Delete or comment out the disk entry:

Group 1321314175

  1. Save changes (Ctrl + X, then Y and Enter).

If there are several additional disks on the server and the one you are deleting is not the last one:

  1. Open the file:

nano /etc/fstab
  1. Delete or comment out the disk entry:

Group 1321314177

  1. Check the disk names on your system, for example with the lsblk command. They should have moved one step up. Say, you had additional disks vdc and vdd. Then after deleting the vdc disk, you should see the following:

Group 1321314178

This is actually your third disk (vdd), which has been mounted to the /mnt/disk3 directory.

  1. Mount the disk to the same directory, specifying its updated name (in our case, vdc1):

mount -o barrier=0 /dev/vdc1 /mnt/disk3
  1. Edit the /etc/fstab file with the updated data:
nano /etc/fstab

Group 1321314179

  1. Reboot the server.

CPU and RAM

To change the CPU and RAM parameters of your server, change the server plan:

  1. Go to the Plan tab.

  2. Click Select plan

Image10

  1. Select a plan with the required parameters.

Image6

  1. Click Save and reboot to apply the changes.
  2. Confirm the action.
Was this page helpful?
Updated on 26 March 2024

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support