OverlayFS
From Gentoo Wiki
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.[1]
The option to enable OverlayFS exists in Linux kernels 3.18 and higher.[2]
Installation
Kernel
KERNEL Enable OverlayFS (OVERLAY_FS) support
File systems ---> [*] Overlay filesystem support
Usage
Once enabled in the kernel OverlayFS can be controlled using the mount command.
To mount an overlay filesystem:
root #
mount -t overlay overlay -o lowerdir=lowerdir,upperdir=upperdir,workdir=workdir mountpoint
Note
Multiple lowerdir entries, colon (:) separated, can be used. When doing so, upperdir and workdir can be omitted to make a read-only mount.
Multiple lowerdir entries, colon (:) separated, can be used. When doing so, upperdir and workdir can be omitted to make a read-only mount.
Important
When included, both upperdir and workdir have to reside within the same filesystem.
When included, both upperdir and workdir have to reside within the same filesystem.
See also
- Aufs — an advanced multi-layered unification filesystem.
- SquashFS — an open source, read only, extremely compressible filesystem.
- Wikipedia:UnionFS — The original union filesystem.
External resources
- 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.