How to Use an Additional Disk on Your VPS

How to Use an Additional Disk on Your VPS
Customer Guide

Bought an additional disk for your VPS? Find it, create a partition, format it and mount it on Linux or Windows Server, step by step.

Need more space for backups, databases or files? You can add an additional disk to your KVM VPS in the customer panel. This guide shows how to order it, find it on your VPS and get it ready to use on Linux and on Windows Server.

Before you start

  • The additional disk is a separate second disk. It does not make your system disk bigger: your system disk, its partitions and your data on it stay as they are.
  • Available sizes: 50 GB, 200 GB and 450 GB.
  • At the moment an additional disk cannot be reduced or removed after the purchase, so choose the size you really need.
  • The new disk arrives empty and unformatted. You can use it after you create a partition and a file system on it, as shown below.

Step 1 - Order the additional disk

Log in to the customer panel, open Services, choose your VPS and click Upgrade / Downgrade. Choose the size under Additional disk and pay the invoice. MAXKO VM then attaches the new disk to your VPS and restarts the VPS once, so the operating system can see it. Save your work before you pay, because running programs stop during the restart.

On Linux

Step 2 - Find the new disk

Connect to your VPS with SSH as root (or put sudo in front of every command below) and list the disks:

lsblk

The new disk is the one with the size you ordered, no partitions and no mount point. On most VPS it is called vdb; on some systems it is sdb. Your system disk is usually vda (or sda) and has a partition mounted at /.

lsblk output with the system disk vda and the new 200 GB disk vdb
lsblk: vda is the system disk, vdb is the new additional disk (illustration).
Check the disk name twiceFormatting a disk deletes everything on it. The commands below use /dev/vdb; if lsblk shows another name for your new disk, use that name instead. Never run them on the disk that holds /.

Step 3 - Create a partition

Create a GPT partition table with one partition over the whole disk:

parted /dev/vdb --script mklabel gpt mkpart data ext4 0% 100%

The new partition is /dev/vdb1. If parted is not installed, install it with apt install parted (Debian, Ubuntu) or dnf install parted (AlmaLinux, Rocky Linux). If you prefer fdisk, run fdisk /dev/vdb, press g (new GPT table), n (new partition, then Enter three times for the defaults) and w (write and exit).

Step 4 - Format the partition

mkfs.ext4 -L data /dev/vdb1

ext4 is a good choice for most uses. XFS works well too, especially for large files: use mkfs.xfs -L data /dev/vdb1 instead (package xfsprogs), and write xfs instead of ext4 in step 6.

Creating a GPT partition with parted and formatting it with mkfs.ext4
One partition over the whole disk, formatted as ext4 (illustration).

Step 5 - Mount the disk

mkdir -p /mnt/data
mount /dev/vdb1 /mnt/data

The disk is now ready to use in /mnt/data. You can choose another empty folder, for example /backup. Do not mount it over a folder that already has files in it, because those files are hidden while the disk is mounted there.

Step 6 - Mount it automatically after a restart

Disk names can change, so the safe way is to mount the disk by its UUID. Show the UUID of the new partition:

blkid /dev/vdb1

Open /etc/fstab (for example with nano /etc/fstab) and add one line at the end, with your own UUID:

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  /mnt/data  ext4  defaults,nofail  0  2

The nofail option lets the VPS start normally even if the disk is ever missing. Test the line before you restart:

umount /mnt/data
systemctl daemon-reload
mount -a
df -h /mnt/data

If mount -a prints an error, correct the line in /etc/fstab first. When df -h shows the disk at /mnt/data, you are done. It is normal that the size is a little smaller than the size you ordered, because the file system needs some space for itself.

blkid shows the UUID, the fstab line and df -h showing the disk mounted at /mnt/data
The fstab line with the UUID and nofail, then df -h shows the mounted disk (illustration).

On Windows Server

After the restart Windows sees the new disk, but it is offline and not initialized, so it does not appear in File Explorer yet.

Step 2 - Open Disk Management

Connect to your VPS with Remote Desktop (or open the console in the customer panel). Right-click the Start button and choose Disk Management, or press Win+R, type diskmgmt.msc and press Enter. If Windows asks right away to initialize the new disk, go to step 4.

Step 3 - Bring the disk online

In the lower part of the window find Disk 1 with the size you ordered and the status Offline. Right-click the gray box with the disk name on the left and choose Online.

Disk Management with Disk 1 offline and the Online menu item
Right-click Disk 1 and choose Online (simplified illustration).

Step 4 - Initialize the disk

Right-click Disk 1 again and choose Initialize Disk. Select GPT (GUID Partition Table) and click OK.

Initialize Disk window with GPT selected
Initialize the new disk with the GPT partition style (simplified illustration).

Step 5 - Create a volume

Right-click the Unallocated area of Disk 1 and choose New Simple Volume. In the wizard click Next, keep the maximum size, choose a drive letter (for example E:), choose the NTFS file system, type a volume label such as Data, keep Perform a quick format checked and click Finish.

Disk 1 with a new NTFS volume Data (E:)
The new disk is ready as drive E: (simplified illustration).

The new drive now appears in File Explorer and Windows connects it automatically after every restart. Leave Disk 0 with drive C: as it is, because that is your system disk.

The same in PowerShell

Open PowerShell as Administrator and list the disks:

Get-Disk

The new disk has the partition style RAW and the size you ordered; usually it is number 1. Check the number, then run (replace 1 if your disk has another number):

Set-Disk -Number 1 -IsOffline $false
Set-Disk -Number 1 -IsReadOnly $false
Initialize-Disk -Number 1 -PartitionStyle GPT
New-Partition -DiskNumber 1 -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel "Data"

Good to know

  • The additional disk is extra storage next to your system disk. Your operating system stays on the system disk.
  • An additional disk cannot be reduced or removed at the moment.
  • The additional disk stays attached when you reinstall the operating system, because a reinstall rewrites only the system disk. After a reinstall, mount it again as shown above (on Linux, add its line to /etc/fstab again).
  • The additional disk is not included in the VPS backup. Keep copies of its data in another place.
  • Keep copies of important data in another place as well, for example with a backup plan.
  • Do you not see the disk after the restart, or are you not sure which disk to format? Contact our support before you format anything.

Open My Services