I would do it this way:
1. IF you can, log in as root. Using sudo will NOT be sufficient.
1.a IF AND ONLY IF you cannot log in as root, create a new user <username> with home folder in /usr/<username> rather than /home/<username> where <username> is replaced by your temp user. Give them sudo rights to become root. Then log off and log in as <username> and sudo su to become root and free up /home.
2. As root, unmount /home, rename it as /oldhome, fix up /etc/fstab to replace /home with /oldhome, and mount /oldhome
3. Create the subvolume /home.
4. update /etc/fstab to mount the new subvolume properly.
5. Reboot and make sure that everything mounts properly on startup. IF it is broken then you have this time to fix your /etc/fstab as the temp user and as root using sudo.
6. Once startup is verified, you need to move the old home data into the subvolume. There are a couple of possible ways: rsync or tar.
Tar:
Code:
#cd /oldhome
#tar -cf * | ( cd /home && tar -xf - )
rsync:
Code:
rsync -af /oldhome/* /home/
DISCLAIMER: these are untested -off the cuff from memory- commands. Run a small test with unimportant data first to make sure I got this right!
Expect either command to take time. How much will depend upon the volume data, your controller channels, speed of storage, and how much ram you have for buffers.
After the copy is done you can log out and log in as your normal user and make sure everything works properly from the new home. If it does that is great, if not you get this opportunity to troubleshoot wile your data is not scrubbed.
7. MUCH later, you can delete the data in /oldhome and unmount that filesystem so you can return that storage to available for other purposes.
The man pages document the command, but web pages like
https://fedoramagazine.org/working-w...fs-subvolumes/ may help provide context, examples, and detail.