I have a machine that is set up in such a way that /home is a symlink to a directory on an NFS volume (something like /nfsvol/some/other/path/home). I need to move this back on to the machine's own filesystem, but I'm not sure what's the safest way to do this:
- Simply copy the contents of /home to /new_home then remove /home and rename /new_home to /home
usermod -d -m /new_home/$USERNAME $USERNAMEand then rename /new_home to /home - but if I rename /new_home to /home after running
usermod -d -m, will that cause any problems? Would any part of the system still think that home directories are in /new_home
- Is there a better way?
Also, if I use usermod, do I need to consider locking the user's account until the move operation is complete? Some users have very large home directories (>100GB) so it may take several minutes.