If you need more space on an existing disc, you can increase its size without having to re-install your server.
Things to note
- At present, you cannot decrease the size of a disc. We have purposefully disabled this functionality as it can lead to filesystem corruption and data loss.
- If your Cloud Server is running Windows, follow the Windows Method instructions below.
- The procedure outlined below is quite safe, but you should always take backups beforehand, just in case!
Which method to use for partitioned & non-partitioned discs
If you’re planning on resizing a disc which hasn’t hasn’t got a partition table, you may encounter some issues when following the standard Linux method. As GParted is a partition tool, If the disc has no partitions, then the extra space will not be able to be allocated. The only way around this would be to create a new partition table, erasing all of the data on the disc, which is not convenient at all. The advanced Linux method, will work with both partitioned & non-partitioned discs (filesystem directly on the disc) as it will just extend the volume of the selected filesystem.
Standard method (for Linux)
Increase the size of your disc through the Bytemark Panel
- Login to the Bytemark Panel
- Click the ‘Servers’ tab
- Select the disc you want to resize, increase the size as required and click the ‘Resize disc’ button.
- When the resize operation is complete, click the ‘Shutdown’ button for your Cloud Server and then start it again. This is not the same as a restart, as the server must be fully off for the change to be applied.
- As soon as your server restarts, click the ‘Console’ button to open the console window.
Boot your server into ‘rescue’ mode and start GParted
- Watch the boot process carefully and press the Ctrl+n button (top-right of the console window) as soon as the ‘
Press Ctrl+n for rescue prompt...
‘ message appears (you’ve got to be quick!). If you are not quick enough, your server will load as normal. Press Ctrl+Alt+Del at the login prompt to restart your server and try again! - At the
rescue:
prompt, typegparted
and press Enter
Resize your partition using GParted
- When GParted has loaded (you may want to increase the size of the console window), click the
GParted
menu in the top left and select the correct device in the sub-menu. They are normally listed in the same order as on the control panel. - You should see some unallocated space. Click on the partition click
Resize/Move
. - Drag the slider to the right to fill all of the unallocated space. Click
Resize/Move
. - Click on the
Edit
option at the top and then theApply All Operations
option. - You will be prompted to confirm the changes. Click on
Apply
. - Once the process has completed you can close gparted to reboot your cloud server. Click on the
GParted
menu at the top left and clickQuit
.
Advanced method (for Linux)
This method only applies to non-root discs. If you’re not familiar with the Linux command-line, you might prefer the Standard method above.
- Open the control panel, select your Cloud Server and increase the size of a disc.
- Use the control panel to shutdown your Cloud Server then start it again. This is different from a restart, as the server must be fully off for the change to occur.
- Login to the command-line on your Cloud Server.
- Unmount the disc in order to extend the filesystem. Run this command, but replace
/dev/vdb
with the name of the disc, which normally correlates with what is shown on the control panel. If you aren’t sure how to determine the name of the disc, try the Standard method above.sudo umount /dev/vdb
- Extend the filesystem to fill available space. Run the following commands, but replace
/dev/vdb
with the name of the disc:sudo e2fsck -f /dev/vdb sudo resize2fs /dev/vdb
- Mount the disc again at the appropriate location. Usually this command will do that for you (assuming there’s an entry for it in
/etc/fstab
):sudo mount -a
Windows method
- Increase the size of the disc through the Bytemark Panel.
- Restart your Cloud Server (using the ‘Restart’ button in the panel, not Windows).
- Log in to your server, for example, by clicking the ‘Console’ button in the panel.
- Open Windows Disk Management.
- Extend the partition to fill the available space.