In Webmin, when I create a user under Users and Groups, there’s a selection for Home Directory labeled “Automatic.” This, by default, places the user’s home directory in /home/<user>.
I am also aware that there is a /home/virtualhost.com/homes/<users>/ path for those times when you add a user to a virtual host.
Question: I want to move the default Users and Groups home folder creation to a different drive so it’s not on the same physical drive as the rest of the OS. Short of creating a symlink to redirect /home to a new location, where is the “Automatic” creation of the home folder defined?
Or, do I need to just change the user’s home folder to the new location and let Webmin copy the files?
You want it to be /home. You’ll have to do some extra work if you change the path instead of just mounting your new partition on /home.
So, install the new disk, mount it on a temporary name (e.g. /home2), copy everything from /home to /home2, then unmount /home2 and remount it as /home. For safety/discoverability later, you may want to rename the original /home dir to something like /old/home or something.
You should not be running any services while doing this, as any files written by web apps or mail server or whatever could end up in an inconsistent state. If it’s a lot of data and you don’t want to be offline for the hours it takes to copy, you can make an initial copy with everything running, shut everything down, do a final rsync from /home to /home2, then do the remount dance. An rsync of an already almost perfect copy will generally be quite fast (a few minutes probably).
Edit: Bind mounting is optional and unnecessary if you do what I’ve recommended.