- Before we can change anything we first need to turn off the server that the drive is connected to, so we click the power button in the server box. The drive is the smaller box to the right. Within this you can see a button with two blue cogs on it. This shows you the configuration screen for that disk drive.
- Here we can change the size of the disk, and underneath, mount an image. Drag the slider to increase your disk size.
- Now the disk allocation is larger, but we still need to grow the partition. Turn the server back on and access it using SSH. Use the IP address displayed on the control panel and now you can see the command line for your Linux server.
- First we need to check the current partitions by typing: df -h
Here we can see the filesystem still occupies only 15GB. Our pre-installed Linux images do not have partitions, only a single filesystem filling the entire drive, so it’s sufficient to run resize2fs directly on this device. The command is:
This will automatically grow the filesystem to fill all the extra available space. Alternatively, you can specify the exact amount to scale it to by adding the size:
resize2fs /dev/vda 18000M
We can then check the change by running:
again. We can see that the filesystem has now grown to 18GB.