Sign In
Sign In

Server Configuration

Updated on 26 March 2024

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

Here, you can:

  • Select a new plan for the server thus changing the disk space, the amount of RAM and the number of CPU cores;
  • Add up to 3 additional disks to your server;
  • Delete disks;
  • 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.

Adding New Disks

To add an additional disk to your server:

  1. Go to the Plan tab.
  2. Click Add disk.
  3. Set the desired disk size and click Add.
  4. Confirm the action.

You will see the new disk in the control panel.

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*

The disk name displayed in the control panel may not always be correct. Make sure to 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. 

In the examples below, 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.

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

1964dcf0 B9a0 4c0f 9787 34ce903ce011

Run the command again to verify the partition was created:

lsblk

In our example, the new partition will be sdb1.

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   25G  0 disk
├─sda1    8:1    0 24.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part
sdb       8:16   0   10G  0 disk
└─sdb1    8:17   0   10G  0 part
vda     252:0    0    1M  1 disk

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.

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.
  6. Partition the disk, if necessary, following the steps below.

Partitioning the Main Disk

This partioning is only needed if you have previously partitioned the disk yourself and now it has two or more logical partitions. In all other cases, the disk will be repartitioned automatically after you resize it in the control panel.

Step 1. Boot the server in the recovery mode.

Step 2. Go to the Console tab and enter the following command to find out the disk name:

lsblk

Example output:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   30G  0 disk 
├─sda1    8:1    0   10G  0 part /
├─sda2    8:2    0   4G  0 part 
├─sda14   8:14   0    4M  0 part 
├─sda15   8:15   0  106M  0 part /boot/efi
└─sda16 259:0    0  913M  0 part /boot
vda     253:0    0    1M  1 disk 

In this example, sda is the system disk. On older servers, it may be called vda.

Step 3. Use the parted utiluty, using the system disk name:

parted /dev/sda

Execute the print command.

On the first run, you can receive the message:

Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 31457280 blocks) or continue
with the current setting? 
Fix/Ignore?

In this case, enter:

Fix

This will update the GPT table and allow to use all free disk space.

In the output of the print command, you will see the list of partitions.

7ed673b6 A2a5 4f0b A475 087f9c353782.png

  • 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 <partition_number>

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 <partition_number> 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 <partition_number> 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/sda3

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/sda2, /dev/sda3, etc.):

e2fsck -yf /dev/sda2

10e9e2a0 F362 4314 Be34 65e4bec2eecd

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

resize2fs /dev/sda2

82049b53 F718 48ac 907b 81e7ddca35d1

Step 7. Check the file system after expansion.

Mount the partition that was modified (/dev/sda2, /dev/sda3, etc.):

mount /dev/sda2 /mnt

Check that the size was successfully changed:

df -h

7dc701d2 2ddc 447f B8c7 F40f5f1ea16d

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

Step 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.

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 Edit and restart.
  5. Partion the disk following the steps below.

Partitioning an Additional Disk

Before resizing, create a backup to prevent data loss in case of unexpected issues.

Run the following command to verify the new device size:

lsblk

Example output:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   25G  0 disk
├─sda1    8:1    0 24.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   20G  0 disk
└─sdb1    8:17   0   10G  0 part
vda     252:0    0    1M  1 disk

In this example, the sdb device has been increased to 20G, but the sdb1 partition is still 10G. Therefore, you need to repartition the disk and extend the filesystem.

Before repartitioning

If the disk is mounted via /etc/fstab, comment out the corresponding entry. Open the file:

nano /etc/fstab

Find the line corresponding to /dev/sdb1 (or its UUID) and add # at the beginning of the line to comment it out. This prevents automatic mounting.

Before unmounting, check which processes are using the disk:

lsof /mnt/disk2

If the command returns no output, the disk is safe to unmount. If there are active processes, stop them or terminate the associated applications.

Unmount the disk:

sudo umount -l /mnt/disk2

Disk repartitioning

Start fdisk to edit the disk:

fdisk /dev/sdb

Delete the existing partition (without affecting the data). Enter d to delete the partition. If the disk has only one partition, as in this example, it will be selected automatically.

Create a new partition by entering:

  • Enter n to create a new partition
  • Select the same partition type (for example, p for primary)
  • Set the starting sector to the same value as before (the default is correct)
  • Set the ending sector to use the maximum available size (default)

When prompted:

Partition #1 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o:

Enter N to preserve the existing data.

Enter w to write the changes.

After exiting fdisk, run the following command to update the partition table in the system:

partprobe /dev/sdb

This updates the partition table in the kernel so the system recognizes the changes without requiring a reboot. If the operation is successful, no output will be displayed.

Run the command again:

lsblk

Verify that the partition has been updated and now uses the full available size.

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   25G  0 disk
├─sda1    8:1    0 24.9G  0 part /
├─sda14   8:14   0    4M  0 part
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   20G  0 disk
└─sdb1    8:17   0   20G  0 part
vda     252:0    0    1M  1 disk

Extending the filesystem

After updating the partition, extend the filesystem to use the new space. For an EXT4 filesystem, run the following commands.

Check the filesystem:

e2fsck -f /dev/sdb1

Resize the filesystem:

resize2fs /dev/sdb1

After that, mount the disk again and uncomment the entry in /etc/fstab:

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

Verify that the new size is available:

df -h

Example output:

Filesystem      Size  Used Avail Use% Mounted on
tmpfs            96M  728K   96M   1% /run
/dev/sda1        25G  2.6G   22G  11% /
tmpfs           479M     0  479M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda15      105M  6.1M   99M   6% /boot/efi
tmpfs            96M     0   96M   0% /run/user/0
/dev/sdb1        20G   24K   19G   1% /mnt/disk2

The disk is now fully ready for use.

Deleting Disks

  1. Go to the Plan tab.
  2. Hover over the disk and click on the bin icon.
  3. 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
  3. Select a plan with the required parameters.
  4. Click Save and reboot to apply the changes.
  5. 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