With all warnings about having backups, use everything at one's own risk, etc. I believe the following will work, based upon LVMs and xfs.
- Ensure all users are logged out
- Change to the console window via Ctrl-Alt-F2
- Login as root. Do not be a normal user and attempt to sudo, you must be root.
- On the
cp -a /home/* /tmp-home
- Verify that the directories have been copied
- Edit the
/etc/fstab and comment out the entry for
- Unmount the
- Move the current
/home mount point directory:
mv /home /home-LVM
- Move the tmp-home directory:
mv /tmp-home /home
- Restore the SELinux permissions:
restorecon -Rv /home
- Reboot the system
NOTE: At this point, if you have an error, you can, as root again, move the /home to a backup name (e.g.,
mv /home /home-failed), restore the previous mount point (
mv /home-LVM /home), edit the
fstab to restore the mount, and reboot, and you will be back to where you were.
(some parts of the above approach are also described here)
At this point, you will have the
/home on the
/ LVM volume directly, and the former
/home will not be mounted. Verify this situation is correct by examining
mount as well as
cd /home and ensure that, e.g.,
df -h . shows the
/ drive. If all is well, then you can do
rmdir /home-LVM to remove the previous mount point directory. Also, you can cleanup the
/etc/fstab and remove the commented entry.
You can then use the LVM commands to delete the existing
/home volume, and allocate the space to the
Deleting the LVM:
lvs to list the logical volumes
lvremove /dev/VOLUME_GROUP/rhel-home where VOLUME_GROUP is the appropriate group
pvs should now show additional available space.
Allocating space to the
/ LVM and growing partition:
lvextend -L+SIZE /dev/VOLUME_GROUP/rhel-root where SIZE is the amount of space by which to increase the LVM. It looks like you could do up to
-L+142G based upon the display.