SupportTutorialsChanging the partition layout of your VPS after installation

Changing the partition layout of your VPS after installation

In case you want to add additional partitions to your system you will have to reorganize your existing partition layout.

This tutorial shows how to easily change your partition layout on your VPS.

Please be advised to perform a backup of all important data before proceeding ! Changes to the partition table always bear the risk of complete data loss.




Step 1:

Boot your VPS into the rescue-system, this can be done within your customer control panel.

You will need to connect through VNC

After you have established a connection login as "root".

Step 2:

To perform changes on the partition easily we are going to use gparted.

If you want to boot your system straight up into your regular OS after repartitioning, you should execute "exitrescue" now on the commandline before proceeding.

To start the GUI type "startx" within your VNC console and wait a few seconds until the graphical interface appears.

On the upper left side you will see "Applications", open it and select "Run Program".
Now type "gparted" within the application finder and the app should start immediately.











Step 3:

You should see an overview of all existing partitions on your hard disk drive.
First we need to shrink one existing partition, otherwise we will not be able to create a new one.

Perform a right click on the partition you want to shrink (usually this should be vda2) and hit "Resize/Move".




A window pops up on which you will be able to shrink that partition.


Step 4:

Creating new partitions on the recently freed up storage.

Perform a rightclick on the unallocated space and select "new" to create a new partition.

In this case I did it twice to create two additional partitions.




Nothing was written to your HDD so far, if you want to restart the partitioning just rerun the gparted tool.

Step 5:

To write the changes to HDD hit the green tick symbol.
After hitting the tick, a warning will appear saying that you can lose all data - you should have a backup, so no worries.




The application should start performing several tasks, just wait until it has finished.

Depending on the size of the partition and the data stored on it, this will take its time.




Step 6:

You are done, just boot up your VPS into the regular OS  and check if everything is as expected:

[email protected]:~# fdisk -l

Disk /dev/vda: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x71f88616

Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 487423 485376 237M 83 Linux
/dev/vda2 487424 41447423 40960000 19.5G 83 Linux
/dev/vda3 41447424 246247423 204800000 97.7G 83 Linux
/dev/vda4 246247424 1048575999 802328576 382.6G 83 Linux





Step 1:

Connect to your server using RDP.

Step 2:

Open the "Disk Management", this can be done with a right click on the Windows Icon on the lower left side.
You could also start it by opening the "run" prompt, which can be done  via "Start" -> "Execute" -> "diskmgmt.msc", alternately the "Execute" dialogue can be opened by hitting "Windows-Logo-Key +R"

Step 3:

After the Windows "Disk Management" utility was started you will see an overview of all installed harddrives.
On a VPS you will usually have one drive, on a dedicated Server you will probably have more than one sparse disk.
Search for the disk you want to repartition and perform a right click on the partition you want to resize.

You can shrink and also extend a Volume, sometimes when upgrading your VPS to a bigger plan you can either create a second partition or just extend the existing partition.

For now we want to shrink the existing partition, so we hit "Shrink Volume".

Step 4:

After some time passed you will see a popup, just fill out the field with the amount of space you want to free up and hit "shrink".



Step 5:

After shrinking you will have unallocated space, now you are ready to create a new partition, e.g. a FAT32 filesystem etc.


SupportTutorialsChanging the partition layout of your VPS after installation