You are not logged in.

#1 2026-05-15 06:02:03

Nmonic
Member
Registered: 2026-05-15
Posts: 4

RESOLVED | Set mounted partitions content to be shown in /home/user/

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

#2 2026-05-15 06:28:33

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 623

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

Nmonic wrote:

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

#3 2026-05-15 06:30:43

frostschutz
Member
Registered: 2013-11-15
Posts: 1,646

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

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

#4 2026-05-15 07:11:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,647

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

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

#5 2026-05-15 17:44:14

Nmonic
Member
Registered: 2026-05-15
Posts: 4

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

seth wrote:

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

#6 2026-05-15 20:04:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,647

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

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

#7 2026-05-15 20:17:46

Nmonic
Member
Registered: 2026-05-15
Posts: 4

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

seth wrote:

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

#8 2026-05-15 20:30:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,647

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

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 tongue )

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

#9 2026-05-15 21:57:14

Nmonic
Member
Registered: 2026-05-15
Posts: 4

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

seth wrote:

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 tongue )

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

#10 2026-05-16 06:54:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,647

Re: RESOLVED | Set mounted partitions content to be shown in /home/user/

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

Board footer

Powered by FluxBB