Resize Centos 7 Root partition set up as xfs file system.

by Tim R   Last Updated April 26, 2018 14:00 PM

I am trying to resize the root partition folder from 50GB to 750GB. I have already increase the size of the drive. If I do an fdisk on /dev/sda and delete partition 2 and then recreate it the /dev/sda2 is resized correctly showing 999GB. When I then try to do a vgextend it gives an error saying, "can't open dev sda2 exclusively. mounted filesystem?" How can I increase the size of the root LVM partition? I attached screenshots of the different outputs for reference.

If I run: lvextend -l +100%FREE /dev/centos/root It tells me it expanding from 50Gb to 50Gb.

df -h output

df -T output

lsblk output

lvdisplay output

pvdisplay output

vgdisplay output

pvs vgs & lvs output

Related Questions

Best way to partition required sace

Updated September 19, 2017 09:00 AM

partx: /dev/sdd: error adding partition 1

Updated January 29, 2019 07:00 AM

How to shrink home partition and add backup partition

Updated February 07, 2019 21:00 PM

How to shrink /home and add more space on CentOS7

Updated April 21, 2016 08:00 AM