How to Bytemark

Resizing discs

If you need more space on an existing disc, you can increase its size without having to re-install your server. This might be an additional disc that you’ve attached to your Cloud Server, or it might be the root disc on which the operating system was installed (usually the first disc).

There are three important 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 resize a disc on Windows instructions below.
  • The procedure outlined below is quite safe, but you should always take backups beforehand, just in case!

Standard method (for Linux)

Our control panel lets you increase the size of any disc on your Cloud Server, but you also need to manually extend partitions to fill that extra space. This sounds scary, but luckily we’ve made an easy rescue environment with a graphical tool called gparted to help you to do this!

  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. Open the VNC console for your Cloud Server.

  4. Early in the boot process, a prompt will appear on the VNC console asking you to press ctrl-n to enter netboot. Press the ctrl-n button at the top of the screen.

  5. At the rescue options screen, type gparted and press enter. While it boots, you are asked a few questions. Press enter for all of them to select the default options.

  6. In the program that appears, 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.

  7. You should see some unallocated space. Click on the partition (a), then click Resize/Move (b).

  8. Drag the slider (a) to fill all of the unallocated space. Click Resize/Move (b), then Apply (c) and wait for it to finish.

  9. Double-click on the Exit icon on the desktop to reboot back to your Cloud Server.

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. Open the control panel, select your Cloud Server and increase the size of a disc.

  2. Reboot your Cloud Server.

  3. Open Windows Disk Management.

  4. Extend the partition to fill the available space.

Bytemark Cloud used to be called "BigV"—nothing has changed except the name! We’re hiring! Please visit careers.bytemark.co.uk to find out more.