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 offer change has been made.
Preamble
- By default, the Cloud VPS is provided with two volumes:
- 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.
- 1 volume for the operating system of your choice (
- Warning: depending on the installed operating system, the system volume may be named
/dev/sda
,/dev/sda1
or/dev/vda
; the same applies to the data volume/dev/sdb
,/dev/sdb2
or/dev/vdb
... It is therefore necessary to replace these indications with those corresponding to your situation.
SSH commands to increase the 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 via the offer change of your VPS.
First scenario
In the case where the entire volume is used without partitioning, it is not necessary to do a resizepart, since 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 that contains a partition (/dev/vdb1), you must first stop the processes that use this volume, then you must unmount the partition.
sudo umount /dev/vdb1
You then need to increase the partition size 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
And 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 the C drive, sufficient for Windows. Applications must be installed on the D drive. 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 expect).