[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /home as a symlink?



On Fri 16 Oct 2020 at 11:23:13 (+0200), Jesper Dybdal wrote:
> I currently have /home in the root partition.  I am considering moving
> it to a different existing partition.
> 
> Can I simply move the files and then make /home a symlink to /disk2/home?
> 
> Or perhaps set up a symlink for each user: /home/user1 => /disk2/home/user1?

This has the advantage that you can move users' individual home
directories at different times, whenever they're not logged in,
because they don't all have to reside in one location.

> Do either of these run a risk of files under /home being needed before
> /disk2 is mounted (it is in fstab)?

No, fstab is processed before users are alowed to login.

My own systems boot up and run with /home empty¹ (just a mount point
directory). Apart from root, the only user who can login is "unlock",
because their home directory is in /var/local/home/, and the only
thing they can do is unlock an encrypted partition and mount it on
/home, whereupon they get logged out.

¹ I lie: they contain an empty file:
  # ls -l /home/
  total 0
  -rw-r--r-- 1 root root 0 Nov 27  2019 0
  # 

Cheers,
David.


Reply to: