1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Expand a Volume on VPS Cloud
This guide explains how to increase the storage volume of your Cloud VPS once the change of offer is done.
- 1 volume for the operating system of your choice (/dev/vda)
- 1 volume for storing your data (/dev/vdb), this is the one that will be increased
Attention: depending on the installed operating system, the system volume may be named /dev/vda or /dev/sda; the same goes for the data volume /dev/vdb or /dev/sdb! Therefore, you should replace these indications with those corresponding to your situation.
SSH commands to increase storage volume
If you choose XFS for example, it is necessary to install the appropriate tools (if they are not already present):
sudo apt install xfsprogs
Then increase the volume with the following SSH commands:
sudo xfs_grow /dev/vdb
And if you choose EXT4:
sudo resize2fs /dev/vdb
Extend the volume after increasing the storage volume
Two scenarios may arise once you have extended the storage volume of your Linux server. Note that no data is deleted when increasing the space through the change of offer for your VPS.
First scenario
In case the entire volume is used without partition, it is not necessary to perform a resizepart, as there is no partition.
sudo umount /dev/vdb
sudo fsck.ext4 -f /dev/vdb
sudo resize2fs /dev/vdb
Second scenario
In the case of a volume containing a partition (/dev/vdb1), you must first stop the processes using this volume and then unmount the partition.
sudo umount /dev/vdb1
Then you must increase the size of the partition with parted which has the resizepart command, unlike fdisk.
sudo parted /dev/vdb
GNU Parted 3.2
Using /dev/vdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) resizepart 1 100%
(parted) quit
sudo fsck.ext4 -f /dev/vdb1
sudo resize2fs /dev/vdb1
What about the System volume?
It is not possible to increase the size of the system volume.
For Linux, Infomaniak provides 20 GB, sufficient for any Linux distribution.
For Windows, Infomaniak provides 100 GB on disk C, sufficient for Windows. Applications must be installed on drive D. If you have 50 GB, you can request 100 GB (contact Infomaniak support specifying a time slot for the operation as there are a few minutes of downtime to be expected).