OverlayFS

From Gentoo Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.

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.
Important
When included, both upperdir and workdir have to reside within the same filesystem.

See also

  • UnionFS - The original union filesystem.
  • Aufs — an advanced multi-layered unification filesystem

External resources

References