You are not logged in.
Hi, as the title says, I would like to know if it is possible to show a parition's content (making it accesible for programs and the likes) ) inside /home/user/ without "overwriting" all the information inside /home/user. Thanks.
I have tried using bind mounts, but they don't seem to work in the way I need it to.
Last edited by Nmonic (2026-05-18 04:47:30)
Offline
Hi, as the title says, I would like to know if it is possible to show a parition's content (making it accesible for programs and the likes) ) inside /home/user/ without "overwriting" all the information inside /home/user.
Could you please clarify what do you mean by "show a partition's content" and "without overwriting"? Describe the use case, i.e. what path under partition mountpoint should correspond to what path under /home/user?
Offline
So put it in /home/user/HDD/ or similar? I.e. make a dedicated subdir for it.
Otherwise you would need an overlay / union filesystem like https://wiki.archlinux.org/title/Overlay_filesystem
But that's not usually what you want in a homedir, it will not behave the way you expect.
Online
I have tried using bind mounts
so seems the idea is an overlayfs…
@Nmonic, since this has hallmarks of an https://en.wikipedia.org/wiki/XY_problem please forget about the mounting for a moment: what problem are you ultimately trying to solve here (the function you want, not what you think is the way there)
Offline
I have tried using bind mounts
so seems the idea is an overlayfs…
@Nmonic, since this has hallmarks of an https://en.wikipedia.org/wiki/XY_problem please forget about the mounting for a moment: what problem are you ultimately trying to solve here (the function you want, not what you think is the way there)
Let's say I have a partition mounted to /mnt/usrfiles with content like "Documents/, Pictures/, foo.txt, bar.cfg".
I want the contents inside that mounting point to be accesible in the same level as /home/user; as if I was "appending" the files to an existing folder.
/home/user would look something like this:
.config
.local
====start of append===
Documents
Pictures
foo.txt
bar.cfg
Symlinks do not help my use case, btw. I stow files from time to time and it seems the utility cannot go through folder symlinks as if they were folders.
And I have read hardlinks between mount points is a very big no-no for reasons I don't really understand completely.
It seems like overlayfs would work? But I don't really understand how to use it or as another comment said if it will even behave this way.
Last edited by Nmonic (2026-05-15 17:49:44)
Offline
That explains *what* you're trying to do, but not why.
An overlay FS likely isn't what you want because all changes to *anything* in the mount path (supposedly $HOME) would go into the overlay system, you're not merging two filesystems but completely augment one with the other.
"likely" because we still don't know why you (think you) want to do this - what is the actual goal here (not what you currently plan to implement but what problem you're trying to solve with this)
"likely" you need to employ bind-mounts or https://aur.archlinux.org/packages/bindfs/ or maybe some other https://wiki.archlinux.org/title/File_s … le_systems
But for now please just explain the problem you're trying to solve with these mounts.
Offline
But for now please just explain the problem you're trying to solve with these mounts.
The problem is that I have is that usrfiles holds my, well, user files. Photos, Documents and the likes, not all of them inside some folders.
I want to be able to access the mount point /mnt/usrfiles contents inside /home/user as if they were the same "place"; as if they were merged into a single home/user, I suppose. Do you think that could cause issues regarding the way files are separated? (i.e adding files to this new "merged" $HOME would put them into usrfiles instead of the "unmerged" $HOME)
Offline
i.e adding files to this new "merged" $HOME would put them into usrfiles instead of the "unmerged" $HOME
That's what the overlayfs would get you.
You can acutally bind-mount files ("everything's a file") but the mountpoint needs to exist (ie there be an empty dummy that gets shadowed)
Why are those "usrfiles" on a separate partition? I assume it's not a space problem (as the porn folder would of course make up 99.98% of that data and keeping that on the extra disk would suffice
)
mergerfs should™ allow you to do what you want but
a) fuse has a performance cost
b) with any approach you will obviously have to keep some form of configuration list which file (including new ones) is to reside on what partition - so this will inevitably be tedious.
So most likely bind-mount the desired files and directories?
Offline
You can acutally bind-mount files ("everything's a file") but the mountpoint needs to exist (ie there be an empty dummy that gets shadowed)
Why are those "usrfiles" on a separate partition? I assume it's not a space problem (as the porn folder would of course make up 99.98% of that data and keeping that on the extra disk would suffice)
mergerfs should™ allow you to do what you want but
a) fuse has a performance cost
b) with any approach you will obviously have to keep some form of configuration list which file (including new ones) is to reside on what partition - so this will inevitably be tedious.So most likely bind-mount the desired files and directories?
I ended up going for moving the assortment of files I have in usrfiles into a folder and mounting that to /home/user/Misc/; basically I went for bind-mounting.
But it is nice to know something like mergefs exists. Thanks for the attention and the answers, my problem is solved.
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
You'll probably have to shorten the original title.
If you're treating this as a single container folder, you can also just symlink that (depending on how the other partition is mounted)
Offline