If you have upgraded your VPS resources (e.g. disk space) but the new space is not showing up, you will likely need to repartition and resize the file system. This guide explains how to do it safely.
β οΈ Warning
Always back up your data before proceeding. This process modifies disk partitions and file systems.
β Step 1: Reboot into Rescue Mode
- Go to the OVH Control Panel.
- Select your VPS.
- Navigate to Rescue Mode and reboot the VPS.
- Access your server via the rescue SSH credentials provided by OVH.
β Step 2: Identify Your Disks
lsblk
Look for the upgraded disk (e.g. /dev/sdb1
or /dev/vdb1
). Note the parent disk (e.g. /dev/sdb
).
β Step 3: Unmount and Check Filesystem
umount /dev/sdb1
e2fsck -yf /dev/sdb1
If the check passes without errors, proceed.
β Step 4: Modify the Partition
Launch fdisk
(replace sdb
with your actual device):
fdisk -u /dev/sdb
Then follow this sequence:
p
β Print existing partitionsd
β Delete the partition (usually1
)n
β Create new partition- Type:
p
(primary) - Number:
1
- First sector: default (just press Enter)
- Last sector: default to use all space (press Enter)
- Type:
a
β Make it bootable (optional, if it was originally bootable)w
β Write changes and exit
Ignore warnings like:
Partition #1 contains a ext4 signature. Do you want to remove the signature? [Y]es/[N]o:
Typen
to not remove it.
β Step 5: Resize Filesystem
For ext4:
resize2fs /dev/sdb1
For XFS (if applicable):
xfs_repair /dev/sdb1
mount /dev/sdb1 /mnt
xfs_growfs /mnt
βΉοΈ If youβre unsure whether itβs ext4 or XFS, check with:
blkid /dev/sdb1
β Step 6: Verify
Mount and check the space:
mount /dev/sdb1 /mnt
df -h /mnt
β Step 7: Reboot Normally
Once verified, reboot your VPS back into normal mode using the OVH Control Panel.