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 configurable policies for writeswriting to the underlying branches? (iI.e. not necessarily writingif
/fooand/barare union-mounted to the top branch)/union, can I write to/fooand/bar?) - Which ones support writingconfigurable policies for writes? (E.g. can I sent newly created files to the underlyingbranch 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.