Score:-1

how to mount a device and make sub directories on it it available under $home

pk flag

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

ar flag
One approach is to move the `/home/` to its own partition in the 1TB HDD. This process is well documented. Another approach is to create soft links to folders in the 1TB disk without moving the `/home/`.
ar flag
See [Move home folder to second drive](https://askubuntu.com/questions/21321/move-home-folder-to-second-drive) for the first approach. See the [original answer part of the accepted answer to this question](https://askubuntu.com/questions/282831/do-i-need-intel-smart-response-when-installing-ubuntu) for how to create soft links to Documents etc. folders.
Raffa avatar
jp flag
Another approach is to merge the two using e.g. aufs or overlayfs … please see https://askubuntu.com/q/1222052 for examples.
mook765 avatar
cn flag
What about editing `~/.config/user-dirs.dirs`?
pellicle avatar
pk flag
Thanks @user68186, that's really helpful stuff.
pellicle avatar
pk flag
@mook765, thanks I'll look into that ... also, is this the right way to reply to you?
Score:0
cn flag

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.

pellicle avatar
pk flag
thanks, I'm presently having trouble with all of the details of this as things are telling me they aren't present ... probably the nub of the problem is that the drive is mounted strangely
vanadium avatar
cn flag
If this answered your specific question, i.e., how to make subdirectories on other volumes available under home, then please consider accepting the question: click the checkmark next to the answer.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.