1

I had created a qcow2 image with Virtual Machine Manager on CentOS (150GB). Another CentOS 7 was installed along with WHM & cPanel in that image.

I have done some research and increase the qcow2 image's virtual size to 300GB.

qemu-img info (on HOST): qemu

Now, I would like to increase the space inside the qcow2 image. I searched on Unix Stackchange and know that I should use Parted (My Parted version is 3.1) from this Question.

The directory I need more space is /home (Filesystem is /dev/mapper/centos-home). Its size is about 100GB right now, and I want to increase its size to 250GB. But then I think the device /dev/sda2 is what I should expand before increasing /home? What are the correct steps to increase the filesystem size for my scenario?

Here are some related info:

du -h (inside the image):

qemu

fdisk -l (inside the image):

qemu

Leo Tse
  • 11
  • 1

1 Answers1

0

Step 1. See the free space in volume Group(VG)

 $ sudo vgs
 $ sudo vgdisplay #for details

If you see free space in vg

follow step 2:

 $ sudo lvextend -L +145G /dev/centos/home
 $ sudo xfs_growfs /dev/centos/home
Rakib
  • 2,347
  • 1
  • 17
  • 20