OverlayFS
OverlayFS is a Linux filesystem that combines lower directory trees and an optional upper tree into one merged namespace.
Upper entries take precedence, while directory names can merge. Write access to a lower file can trigger copy-up; a read-write open may cause this even without changing data. With redirect_dir disabled, renaming a lower or merged directory fails with EXDEV. Enabling directory redirects changes that behavior. [1]
Whiteouts suppress matching lower names during lookup without exposing the marker as an ordinary file. They record visibility changes, not removal of the lower object. [2]
Relations
Advantages
- Allows changes in a writable upper tree while retaining lower-layer objects.
Limitations
- Copy-up and directory-rename behavior depend on the operation and configured features.
- A merged pathname view is not evidence of secure erasure or crash durability.
Citations
- Linux 6.12: Overlay Filesystem, layer lookup, copy-up and directory renames
- Linux v6.12: OverlayFS ovl_lookup_single, whiteout and opaque-directory lookup
Sources & caveats
- Source review of Linux 6.12 and the cited API/specification; no mounted-overlay experiment or crash test.