Home

OverlayFS

overlayFS is a union mount filesystem for Linux that merges a writable upper directory with one or more read-only lower directories to present a single coherent view. It enables copy-on-write behavior, so changes go into the upper layer while the lower layers remain intact. The filesystem is implemented in the Linux kernel and is commonly used by container runtimes and sandboxing tools.

Architecture and operation: The core elements are lowerdir (read-only), upperdir (writable), and workdir (an auxiliary writable

Variants and adoption: The original driver is referred to as overlay, and a more scalable variant called

Limitations and considerations: OverlayFS relies on lower, upper, and work directories residing on the same filesystem;

directory
used
by
the
implementation).
When
a
file
in
the
merged
tree
is
modified,
the
data
is
copied
from
the
lower
layer
into
the
upper
layer
(copy-up).
Deletions
in
the
merged
view
are
represented
by
whiteout
entries
in
the
upper
layer
to
hide
lower-layer
files
from
the
merged
view.
overlay2
is
widely
used
by
container
platforms
such
as
Docker.
Overlay2
supports
multiple
lower
layers
and
is
generally
preferred
on
modern
systems.
Both
require
a
kernel
with
OverlayFS
support
and
a
compatible
backing
filesystem
such
as
ext4
or
XFS.
performance
and
semantics
can
vary
with
kernel
version
and
filesystem
type.
Some
metadata
operations
and
special
file
types
may
behave
differently
across
layers,
and
older
kernels
or
filesystems
may
impose
restrictions
on
features
like
opaque
directories
and
whiteouts.