For a mail server I am considering having the /home directory on its own (virtual) drive for the purposes of virtual machine backups. (If I need to rollback the OS drive for some reason, I would like newer-than-the-last-backup mail still to be there.)
For reasons that will jump out at the types of folks who look at this forum but may be obscure to me, is it better to do something like:
mv /home/* to a /mnt/home/
ln -s /mnt/home /home
Or to mess with files like these (if they do what they look like):
or you could mount your other file system/drive on /home – no LN or MV would be needed then (well, for future user creations, current user home directories would need to be copied over somehow)
one of my RedHat servers has this in /etc/fstab to mount a LVM volume
Yes. Put homes in /home, and don’t go trying to convince the system that homes live somewhere else. Most things are smart enough to check for where the user home actually is and changing it won’t be a problem, but “most” is not “all”. Also, you’re going to forget, at some point, that you did something weird on this system and you’ll mess up a backup path or something in a script. So don’t do anything weird.
Put things where they usually go and you don’t have to think about all the special cases. Some day, you’re going to be tired/stressed and in a hurry and thinking about all the special cases will bite you in the ass. It’s like the advice, “if you always tell the truth, you don’t have to keep up with all the lies”. If your systems all look alike, you don’t need to keep up with all the weird stuff.
It takes less than half a dozen commands and a few minutes to do it the right way. No reason to make your system an invitation to a bad day.