-2

there is a 1TB disc drive and a 128GB SSD on a system I am setting up. I'd like to mount parts of it over the $home of the log in user so that the smaller SSD doesn't get used up with files.

Presently I'm stuck at an entry on /etc/fstab like:

/dev/disk/by-uuid/999blahblahblah /home/rod/Storage auto nosuid,nodev,nofail,x-gvfs-show 0 0

this puts the contents of the entire disk mounted in the directory $home/Storage (when logged in as user "rod")

However I'd like a more granular approach and have directories such as Documents, Music, Pictures and Videos on the platter drive and mount these to $home versions (which are presently empty)

Even more ideally I'd like to have this per user.

I'm keen to hear suggestions on this as I'm a little out of my area here.

Oh, the machine will only have two users.

Thanks

1 Answers1

0

However I'd like a more granular approach and have directories such as Documents, Music, Pictures and Videos on the platter drive and mount these to $home versions (which are presently empty)

This is where you can use mount --bind. This way, directories of a mounted file system can be mounted elsewhere in the file system.

However, using symbolic links instead is by far an easier solution, that does even not require you to be root. Move your "Music", "Pictures", etc anywhere on a mounted drive where you like. Then link them back into your home directory using symbolic links. For practical purposes for the regular user, such symbolic links acts and feel like a real directory.

vanadium
  • 97,564