You are not logged in.

#1 2015-04-07 15:08:17

killer_siller
Member
Registered: 2011-08-28
Posts: 21

overlayFS home directory

I have several folders I work in which I'd like to use some kind of union to merge together.
As an example: I have a folder called ~/projects. in ~/projects I have several sub-folders which I sync between several machines using syncthing. I also have folders which I only use on the current machine. I'm looking at using overlayFS to do something like the following:
I have /home/jeff as my home directory (Hi, my name is jeff!)
I have /home/local/jeff where all the local stuff goes, including configs, etc
I have /home/sync/jeff where all the folders which are sync'd with syncthing go
I have /home/share where all of the media which is shared with the family goes (such as music, movies, comics, etc)

I'd like to union /home/local/jeff, /home/sync/jeff, and /home/share to /home/jeff

I've accomplished this, but with one break. When I go into a project which is synced and add a new file, it makes it in /home/local/jeff/project rather than /home/sync/jeff/project. If I'm working on a sync'd project, I want it to sync! Any suggestions?

Here's my fstab entry:
overlay /home/jeff overlay lowerdir=/home/share,lowerdir=/home/sync/jeff,upperdir=/home/local/jeff,workdir=/home/work/jeff 0 0

Last edited by killer_siller (2015-04-07 15:09:08)

Offline

#2 2015-07-08 14:14:19

MisterAnderson
Member
Registered: 2011-09-04
Posts: 285

Re: overlayFS home directory

Not sure if you've found a solution yet.

OverlayFS only allows edits on the upper directory and all lower directories are read-only.

I don't understand why you would want all of these folders merged. I see absolutely no reason you need them in a union mount, unless I'm missing something here. To me it looks like /home/jeff and /home/local/jeff are the same thing (you haven't given a reason why you even use /home/local/jeff separately), /home/sync/jeff doesn't need to be overlayed, it could just be a folder in /home/jeff (like /home/jeff/sync), and /home/share shouldn't be involved at all and should be a separate network share.

You also give an example about some ~/projects folder which you don't explain the importance of since it isn't in your overlyfs.

I think you need to rethink what you're trying to do here, or at least repost what your goal is more clearly before you can get a suggestion of a better solution. At the moment I can't even tell why these are separate home folders. What is "all the local stuff"? What other stuff is there? What needs to be sync'd? Why? Why do you need /home/jeff and /home/local/jeff separate?


D:

Offline

Board footer

Powered by FluxBB