
So we need to keep at least that much space available for the new swap partition. In the example we have 4 GB of swap space. We run fdisk /dev/vda and then use the d command to delete partition 2, and then delete partition 1. We will delete the two existing partitions first. Once swap has been disabled, we need to reconfigure the partitions using fdisk: We then need to switch off the swap - so make sure you can live a few minutes without swap space: swapoff -a Takes around a minute and your hard drive is bigger.

To increase the size of the hard drive, go into the DCD (Data Center Designer) and upscale the drive.Īfter you have increased the amount of drive space, click on "provisioning" to process the change. A current snapshot or other backup of the system you are working on.The fdisk, swapoff, mkswap, swapon, and resize2fs commands.Can be installed from the parted package on most Linux distributions. SSH or console access (via the DCD) to the Linux Server.A Linux Server created from a ProfitBricks supplied image.We do not need to reboot the server! Requirements This can be accomplished with minimal disruption. What if after provisioning we find that 46 GB of disk space is not enough but we prefer not to add an additional storage volume? The goal is to increase the amount of disk space available on the root filesystem. In the example above, the total 50 GB storage volume is split into 46 GB usable space and 4 GB for swap.


I/O size (minimum/optimal): 512 bytes / 512 bytesĭevice Boot Start End Sectors Size Id Type Sector size (logical/physical): 512 bytes / 512 bytes The second partition, /dev/vda2, is configured as swap space.

The first one, /dev/vda1, is the boot partition where the OS resides. If we take a look at that using fdisk we will see that the disk is divided into two partitions. Resize a Linux Root Partition Without Rebooting Table of ContentsĪ typical Linux server deployed from a ProfitBricks supplied image has a single storage volume, /dev/vda.
