Replies: 1 comment 6 replies
-
I really am not exactly sure what you're asking. Sorry, but adding a regex to the path selection is just too niche. You only have 2 paths. You can write a small script to generate the values or use symlinks as config in some path. No, you can't mount on top of something itself. It causes a loop given the way mergerfs is designed so as to deal with certain situations. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm setting up a Samba file server.
Each valid user will have a login and the usual "local user stuff" in dotfiles in
/home/<user>
. Call this tree "A"What I would like to do is then merge in from another "bulk file space" file tree "B" (which will either be a local btrfs mirror or a remote mounted share) each users application files. These will be in folders including
/home/<user>/Documents
,/home/<user>/Pictures
etc. (which you'll recognise as the common Windows home dir layout that some unix desktops seem to mirror)AND THEN-
/home/<user>
path (which is what I meant by A+B=A++) as the second FS is extending the first/home
filesystem, while writes to application files go to the bulk files FSQuestions
/home
and "bulk files" FSs to intermediate mount points (e.g./A
and/B
). If /home is not a separate FS this would require a loopback mount?/A
and/B
with appropriate options and mount the result on/home
I think requirement (2) above should be achievable using a path-preserving merge rule as long as path globbing is flexible enough, so I can merge
/home
asA
with/home/*/[^.]*
fromB
(to include everything except dotfiles, or are dotfiles excluded by default from a glob?)Ideally there would be the facility to set
include
andexclude
rules based on regex matching of pathnames to give fine grain control over which files have priority for reading, and which FS writes go to, but I don't think that's available currently. A valid enhancement request or too specialised?If there's a better/easier way of achieving the desired result i'd like to know, obviously. Otherwise is this something mergerfs can be adapted to do?
Beta Was this translation helpful? Give feedback.
All reactions