Overlayfs (Overlay Filesystem) is an in-kernel attempt at providing union file system capabilities on Linux. OverlayFS differs from other union filesystem implementations in that after a file is opened all operations go directly to the underlying, lower or upper, filesystems. This simplifies the implementation and allows native performance in these cases.
The option to enable OverlayFS exists in Linux kernels 3.18 and higher.
File systems ---> [*] Overlay filesystem support
Once enabled in the kernel OverlayFS can be controlled using the mount command.
To mount an overlay filesystem:
mount -t overlay overlay -o lowerdir=lowerdir,upperdir=upperdir,workdir=workdir mountpoint
Multiple lowerdir entries, colon (:) separated, can be used. When doing so, upperdir and workdir can be omitted to make a read-only mount.
When included, both upperdir and workdir have to reside within the same filesystem.
- http://lwn.net/Articles/447650/ - A LWN article written by Jonathan Corbet in June 2011 covering vises and virtues of OverlayFS.
- An informative AskUbuntu.com thread.
- Overlay fs in the Linux git repository.