In this tutorial, you will learn how to reduce the size of a virtual disk. Simply create a new disk with the desired size, prepare the server with the boot ISO, clone the old disk and set the new disk as the root.
One of the big advantages of cloud computing is the ability to increase and decrease resources in accordance with your needs. However, reducing the size of a virtual disk is not so easy. This tutorial explains how to reduce the size of an existing disk.
How to reduce the size of a virtual disk?
Before you begin:
To successfully complete this tutorial, you will need:
- To be registered with an organisation on the Jotelulu platform and have signed in using your username and password.
- To have subscribed to either a Server or Remote Desktop service and have a server with a disk that you wish to reduce.
Step 1. Deploy a new disk with a new size.
To reduce the size of a system disk on an existing server, you will need to deploy a new disk with the desired size and then swap it for the old disk. To start this process, open the main dashboard on the Jotelulu platform and click on the top of the Servers card (1).
Step 1. Open the Servers subscription page from the main dashboard
Next, click on Servers in the left-hand menu (2).
Step 1. Open the Servers section to select the server that you wish to work on.
Find the server that you wish to work on (in this example, SRV-TEPA00-788), click on the three dots to the right and select Edit (3).
Step 1. Select the server and click on Edit
Once in the server management panel, scroll down to the Disks section. Here, you will see the size of the current root disk (in this example, 100 GB). To reduce the disk size on this server to, for example, 60 GB, you will need to first Add a New Disk (4).
Step 1. Add a new virtual disk to the selected server
Step 1. Connect the disk to the server, set the disk size and click on Create Disk
Step 1. The new virtual disk will appear on the server management page
Step 2. Preparing the server with the boot ISO
Once the new disk has been created, you will need to prepare the server so that the old disk can be cloned. To do this, you will need to use a system boot ISO that runs an application (AOMEI Backuper Linux) to clone the disk
In the server management panel, click on the selector in the upper right corner, add ISO “AOMEI Backuper Linux” (9) and click on Confirm (10). On future server startups, it will boot from the ISO and run the cloning programme automatically.
Step 2. Add the boot ISO to your server and confirm
Once you have added the ISO, the “Boot from ISO” icon will appear in green. Click on this icon (11) to boot the server from the ISO and click on Confirm (12). The server will restart once you click on Confirm.
Step 2. Boot the server from the ISO
The server will now boot from the selected ISO and the platform will notify you when the process has been completed successfully (13).
Step 2. Confirm that the server has successfully booted from the ISO
Step 3. Clone the disk.
Once all these preparation steps have been completed, you are now ready to clone the virtual disk. First, an administrator will need to connect to the server using the command prompt (14), available from the server management panel. By clicking on the command prompt button, a floating window will appear providing access to the server.
NOTE: For this process, it is not possible to connect via RDP. You must use the command prompt.
Step 3. Connect to the server using the command prompt
Upon accessing the server through the command prompt, you will be presented with the application menu. To begin cloning the old disk to the new smaller one, click on the Clone tab (15) and select System Clone (16).
Step 3. Begin the cloning process
Step 3. Choose the new disk as the location of the system and proceed with the cloning process
Step 3. System Clone in progress
Step 3. Finish the cloning process
At this point, you will need to stop the server (20), and you will need to do this from the server management panel on the Jotelulu platform.
Step 3. Stop the server from the server management panel on the Jotelulu platform
Step 4. Set the new disk as the root.
Step 4. Disconnect the ISO from the server
Next, you will need to access the Disks section (22) and disconnect both of them, clicking on the three dots to the right of each disk and clicking Disconnect (23).
Step 4. Disconnect the two virtual disks from the server
Step 4. Connect the new disk to the server
Step 4. Set the new smaller disk as the root disk
Step 4. Start the server after setting the new disk as the root disk
Summary and next steps
The process to reduce the size of a virtual disk is more complex than increasing it. In this tutorial, you have learnt how to reduce the size of a disk on your server.
Now that you have completed this tutorial, you might want to find out more about other processes related to managing servers on the platform. If so, the following tutorials may be of interest to you:
- How to schedule a disk backup on your server.
- How to restore the disk backup of your server.
- How to make a Snapshot of the server and restore it later.