Operating System & Version
CENTOS 7.9
cPanel & WHM Version
94.0.4

PostAlmostAnything

Well-Known Member
Mar 3, 2020
100
2
18
Portland, Oregon
cPanel Access Level
Website Owner
I just purchased an upgrade that included more disk space, but my hosting company said that I would have to expand a partition in order to use it. My hosting package is an unmanaged VPS, so it does not include such services and I have to do it myself, but I have never done it before.

There only appear to be two partitions, one belongs to the operating system and another is used for everything else. How do I expand the second partition to use the additional disk space?

The instructions given to me by my hosting company might as well be lorum to me:

"To take advantage of the new disksize you need to expand your filesystem. If you used one of our autoinstall images you can run xfs_growfs / to resize, if it is a custom install you can either add a partition or extend an existing partition. We do recommend you use the snapshot feature to backup your VPS before editing partitions."

I do not know if I used an autoinstall image, what xfs_growfs is, or how to extend an existing partition. I simply ordered a Linux VPS and installed cPanel for administrative tasks, so I am guessing the host used an autoinstall image before sending me my login credentials since the operating system (CENTOS) was already installed. I usually work in a Windows environment, so my familiarity with Linux environments is limited.

I tried telling the hosting company that expanding the partition should be done on their end as part of the upgrade, but they have not responded.
 
Last edited by a moderator:

RoseHosting

Active Member
PartnerNOC
Jan 3, 2003
36
10
158
If it's an unmanaged service, then you need to expand the disk by yourself. They usually have a documentation to follow, you can check their site or ask their support team about it.

If there's any, you can find someone or a system management service to get this done.
 

ankeshanand

Well-Known Member
Mar 29, 2021
209
63
103
India
cPanel Access Level
Root Administrator
Twitter
I just purchased an upgrade that included more disk space, but my hosting company said that I would have to expand a partition in order to use it. My hosting package is an unmanaged VPS, so it does not include such services and I have to do it myself, but I have never done it before.

There only appear to be two partitions, one belongs to the operating system and another is used for everything else. How do I expand the second partition to use the additional disk space?

The instructions given to me by my hosting company might as well be lorum to me:

"To take advantage of the new disksize you need to expand your filesystem. If you used one of our autoinstall images you can run xfs_growfs / to resize, if it is a custom install you can either add a partition or extend an existing partition. We do recommend you use the snapshot feature to backup your VPS before editing partitions."

I do not know if I used an autoinstall image, what xfs_growfs is, or how to extend an existing partition. I simply ordered a Linux VPS and installed cPanel for administrative tasks, so I am guessing the host used an autoinstall image before sending me my login credentials since the operating system (CENTOS) was already installed. I usually work in a Windows environment, so my familiarity with Linux environments is limited.

I tried telling the hosting company that expanding the partition should be done on their end as part of the upgrade, but they have not responded.
Firstly restart the VPS, Then type lsblk in terminal to see if you have any new Disks available. To Make 2 new partitions from an existing mounted partition, follow below:

fdisk -l (To see the Disk Info)
fdisk -l /dev/sdb (Opening the disk. Put your Storage drive sda, sdb or sdc according to the part. Do not choose for /boot partition)
Command: n (new)
Select partition number and Sector storage of your own choice
Then, Command: p (To check if you made it correct)

If You made it correct,
Command: w
To apply changes.

reboot
 

PostAlmostAnything

Well-Known Member
Mar 3, 2020
100
2
18
Portland, Oregon
cPanel Access Level
Website Owner
Firstly restart the VPS, Then type lsblk in terminal to see if you have any new Disks available. To Make 2 new partitions from an existing mounted partition, follow below:

fdisk -l (To see the Disk Info)
fdisk -l /dev/sdb (Opening the disk. Put your Storage drive sda, sdb or sdc according to the part. Do not choose for /boot partition)
Command: n (new)
Select partition number and Sector storage of your own choice
Then, Command: p (To check if you made it correct)

If You made it correct,
Command: w
To apply changes.

reboot
My host said there are no partitions and I just need to use xfs_growfs / but when I enter that as the root user I get the following:

data size unchanged, skipping

I also tried xfs_growfs / -d and xfs_grofs -d / and got the same results.

I would prefer not to do a restart because for some reason phpmyadmin always deactivates the event scheduler whenever the server is restarted.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,544
2,608
363
cPanel Access Level
Root Administrator
cPanel & WHM doesn't manage the disks on your server as we just read that information from the operating system. It would be up to the hosting provider or datacenter to help with the resize, as even an "unmanaged" system usually has a console to perform this type of operation.