A union mount presents a combined view of multiple directories (branches) in a single hierarchy. Ok, but how do I use one in practice, and which one?
Many union mount technologies are available on a modern Linux system: OverlayFS, aufs, UnionFS, various FUSE-based filesystems, …
Given a use case, how do I decide which one(s) are suitable? In particular:
- Which ones require root access on a typical system? (In other words, can an unprivileged user create a union mount?)
- Which ones can be mounted on
/
(with root access of course)? - Which ones support writing to the underlying branches? (I.e. if
/foo
and/bar
are union-mounted to/union
, can I write to/foo
and/bar
?) - Which ones support configurable policies for writes? (E.g. can I sent newly created files to branch B even though I'm getting content from branch A when a file exists on both branches?)
- Which ones support a priority order between branches that depends on the files? (E.g. can I always get the newest file among all the branches that have it?)
Usage examples would be appreciated.
Please avoid answers that focus on a specific point. I'm looking for comprehensive answers that review the available software (something similar to What is a bind mount?). Good answers will be bountied.