This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine.
The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things.
By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and
To backup the contents of /home, do the following:
mkdir /temp
cp -a /home /temp/Once that is finished at your back at the prompt, you can proceed to step 2.
umount -fl /homeWe run the lvs command to display the attributes of the LVM volumes
lvsSample output:
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home cl -wi-a----- 406.94g
root cl -wi-ao---- 50.00g
swap cl -wi-ao---- 7.81glvremove /dev/cl/homeBased on the output of lvs above, I can safely extend the root LVM by 406GiB.
lvextend -L+406G /dev/cl/rootxfs_growfs /dev/mapper/cl-rootcp -a /temp/home /rm -rf /tempUsing your preferred text editor, ensure you open /etc/fstab and remove the line for /dev/mapper/cl-home.
Run the following command to sync systemd up with the changes.
dracut --regenerate-all --force