More specifically, I want to have the user folder for my home account another disk that has more space, but keep my other smaller accounts on my ssd. I was able to copy my user folder to another disk, but now I need to link it to the home folder on my ssd, I want it accessible from a normal boot, and please don't tell me that what I did was not the best thing, I just want an answer. How do I get it to create a link that goes from /home/username to /extra-home/username and is recognised by the system when loading the user folders?
4 Answers
Remember that your permissions will need to be the same. In addition to symlink, on more recent distros and filesystems, as root you can also use bind-mount:
mkdir /home/username
mount --bind --verbose /extra-home/username /home/username
This is useful for allowing access "through" the /home
directory to subdirs via daemons that are otherwise configured to avoid pathing through symlinks (apache, ftpd, etc.).
You have to remember (or init script) to bind upon restarts, of course.

- 117,780

- 691
According to this question on Super User this is possible.
You can create a symbolic link using:
ln -s /extra-home/username /home/username
If it doesn't work for some reason you can just delete the symbolic link, move the directory back and reboot your computer.

- 11,885
- 6
- 44
- 50
-
If it's a simple folder you have to start with /media/{hardrive_name}/{your folder} I have just tried this on a debian server and it works. – answerSeeker Jan 13 '17 at 01:24
I would try this:
While logged in as a different user, in a root shell (e.g. sudo -i
), copy over the contents of /home/username
to /extra-home/username
and make sure the new location is owned by username
:
# cp -p /home/username /extra-home/
# chown username:username /extra-home/username
Move the original /home/username/
directory to a safe place:
# mv /home/username /root/
Create the symlink:
# ln -s /extra-home/username /home/username
Verify it's working as expected by opening another terminal window and running su
:
$ sudo su username
If everything looks good, at least from the terminal (contents of /home/username/
appear as expected), then log out and log back in (I'm assuming you're on Ubuntu desktop) and it should be working normally. However, if it isn't, just delete the symlink and move the archived home folder back to its original location.

- 4,511
My experience on this is: it never doesn't work well with symlinks. Permissions, user services and so on sometime doesn't follow or work with symlinks: so you may get sudo doesn't working, user configuration app doesn't working correctly and so on...
The best solution, in my humble opinion, is to put all the homes on the same partition and mount it on /home. If you have more than a spare disk you can:
- to buy a RAID card
- put all the disks you want to use for users home on the RAID card.
- Configure RAID as JBOD (disks will sum the space). During PC boot, RAID cards start a BIOS to configure drives before the OS starts. There are other RAID configurations, but it depends on your needs.
- Now you have like a new single huge disk just for /home
sudo copy -pr
the /home folder on the new drive- edit /ect/fstab to mount the drive on /home
This way you can grow the /home size incredibly any time you need, just adding another drive to the RAID.

- 161
- 4
/var/run/
? – Paul May 16 '14 at 16:27/bin
and/lib
at initialization (i.e. before you can run themount
command)? If so, then you cannot employ this strategy. – Joe Atzberger Jan 31 '18 at 21:43mount --bind --verbose /extra-home/username /home/username
, the line in/etc/fstab
would be/extra-home/username /home/username none defaults,bind 0 0
– Wilken May 20 '18 at 17:20/etc/passwd
entry for such a user list as its home-directory in a setup like this;/extra-home/username
or/home/username
still? – cueedee May 05 '23 at 08:04