How to integrate /home back into main partition, then grow partition
It's fairly straightforward, as root:
mkdir /home2
mv /home/* /home2/
umount -fl /home
lvremove /dev/VolGroup/lv_home
mv /home2 /home
- edit your fstab and remove the entry for /dev/VolGroup/lv_home
- check how much space you now have available in VolGroup with vgdisplay and add that much to lv_root with lvextend
- use resize2fs or xfs_growfs as appropriate on lv_root
This process will work if your root filesystem is resizeable (ext4 for example).
- modify a existing user or create a new user whose home directory is not under /home.
- verify that you can login as that user and su to root
- ensure all other users are logged out
- umount /home - if this fails then user processes may still be using /home. Check with fuser or lsof
- remount /dev/mapper/VolGroup-lv_home on a temporary mount - /mnt/home for example
- use rsync, cp -p or some other tool to copy the user home directories from /mnt/home to /home - verify that the permissions and ownerships are correct
- edit fstab to comment out /home
- users can now be allow to log back in
- lvremove /dev/VolGroup/lv_home
- lvextend -L+921G /dev/VolGroup/lv_root
- resize2fs /dev/VolGroup/lv_root