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:
- 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!
Standard method (for Linux)
Increase the size of your disc through the Bytemark Panel
- Login to the Bytemark Panel
- Click the ‘Cloud 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
oldand press Enter.
- At the
gpartedand 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
- When GParted has loaded (you may want to increase the size of the console window), click the
GPartedmenu 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.
- You should see some unallocated space. Click on the partition (
a), then click
- Drag the slider (
a) to fill all of the unallocated space. Click
c) and wait for it to finish.
- Double-click on the
Exiticon 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.
- 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/vdbwith 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/vdbwith 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
sudo mount -a
- 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.