Upgrading your VPS - need to extend your disk? The Easy way!
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Upgrading your VPS - need to extend your disk? The Easy way!

by
RickieF
Created on 2019-02-14 16:06:02 (edited on 2024-09-04 14:23:01) in Virtual Private Servers

**If you've upgraded from SSD VPS 1 to 2 to 3 then the instructions are a bit Draconian to get your extra disk space added on (memory & CPU will be automatic).**

**This was tried and tested on a working CentOS 7 cPanel server from VPS SSD 1 to 2 and no issues.**

**So rather than reboot to recovery and not have LVM2 available for lvextend, nor be able to install it or anything else and I've never been happy with the Russian Roulette of deleting and recreating the root partition I found this works.**

**3 simple steps while the VPS is still running with no dodgy deleting of partitions, although give it a reboot when you can.**

**You can use terminal from WHM for this if you like or any SSH client and assuming the basic VPS SSD setup for 1 disk issue these commands;**
**---------------------------------------------------------------------------**
**yum install cloud-utils**

**growpart /dev/sda 1 (notice space before the 1 and this will allocate all available free space)**

**resize2fs /dev/sda1**
**--------------------------------------------------------------------------**

**And your done!**

**I wouldn't say it was a bad move to reboot to rescue mode and do a system file check but I found no issues.**

**Hope this helps someone out that gets a bit frustrated at rescue boots having nothing like the toolset you'd like :slight_smile: or the option to boot to a live OS to carry out maint work.**


Replies are currently disabled for this question.