union filesystem
also: overlay filesystem, OverlayFS, AUFS, layered filesystem
A filesystem that layers multiple directories or filesystems on top of each other, presenting them as a single unified filesystem where files from all layers are visible together.
A union filesystem allows you to mount multiple directories (called branches or layers) at the same mount point. Reads search through all layers, and writes typically go to a designated writable layer, leaving lower layers unchanged. This creates the illusion of a single filesystem while keeping the underlying directories separate.
Common use cases include creating read-only base systems with writable overlay layers, container runtime systems like Docker, and Live Linux distributions. When you access a file, the filesystem searches upper layers first; if found, that version is used; otherwise, it searches lower layers.
Example: You might have a base read-only filesystem at the bottom and a writable overlay layer on top. Modifications appear in the overlay while the base remains pristine, making it easy to discard changes or share the base across multiple systems.
Modern implementations include OverlayFS (the standard in Docker and modern containers), AUFS (used in older systems), and UnionFS. OverlayFS is now the preferred choice due to better performance and mainline kernel support.