1. Home
  2. Cloud Servers
  3. Resizing Existing Discs

Resizing Existing Discs

If you need more space on an existing disc, you can increase its size without having to re-install your server. There are three important things to note:

  1. 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.
  2. If your Cloud Server is running Windows, follow the Windows Method instructions below.
  3. The procedure outlined below is quite safe, but you should always take backups beforehand, just in case!

Standard method (for Linux)

Increase the size of your disc through the Bytemark Panel

  1. Login to the Bytemark Panel
  2. Click the ‘Cloud Servers’ tab
  3. Select the disc you want to resize, increase the size as required and click the ‘Resize disc’ button.
  4. 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.
  5. As soon as your server restarts, click the ‘Console’ button to open the console window.

Boot your server into ‘rescue’ mode and start GParted

  1. 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!
  2. At the rescue: prompt, type old and press Enter.
  3. At the boot: prompt, type gparted and press Enter. While GParted loads you will be asked a few questions. Press Enter to accept the default option each time.

Resize your partition using GParted

  1. When GParted has loaded (you may want to increase the size of the console window), click the GParted menu in the top left (a) and select the correct device in the sub-menu (b). They are normally listed in the same order as on the control panel.
  2. You should see some unallocated space. Click on the partition (a), then click Resize/Move (b).
  3. Drag the slider (a) to fill all of the unallocated space. Click Resize/Move (b), then Apply(c) and wait for it to finish.
  4. Double-click on the Exit icon on the desktop, select the ‘reboot’ option and click the ‘OK’ button to boot your Cloud Server as normal.

Advanced method (for Linux)

This only applies to non-root discs. If you’re not familiar with the Linux command-line, you might prefer the Standard method above.

  1. Open the control panel, select your Cloud Server and increase the size of a disc.
  2. 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.
  3. Login to the command-line on your Cloud Server.
  4. 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
  5. 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
  6. 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

  1. Increase the size of the disc through the Bytemark Panel.
  2. Restart your Cloud Server (using the ‘Restart’ button in the panel, not Windows).
  3. Log in to your server, for example, by clicking the ‘Console’ button in the panel.
  4. Open Windows Disk Management.
  5. Extend the partition to fill the available space.
Updated on May 17, 2018

Was this article helpful?

Related Articles