In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
, OverlayFS is a
union mount filesystem
In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
implementation for
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
. It combines multiple different underlying mount points into one, resulting in single directory structure that contains underlying files and sub-directories from all sources. Common applications overlay a read/write partition over a read-only partition, such as with LiveCDs and IoT devices with limited flash memory write cycles.
History
The need and specification of a kernel mode Linux union mount filesystem was identified in late 2009. The initial RFC patchset of OverlayFS was submitted by Miklos Szeredi in 2010. By 2011,
OpenWrt
OpenWrt (from ''open wireless router'') is an open-source project for embedded operating systems based on Linux, primarily used on embedded devices to route network traffic. The main components are Linux, util-linux, musl, and BusyBox. A ...
had already adopted it for their use.
It was merged into the
Linux kernel mainline in 2014, in kernel version 3.18. It was improved in version 4.0, bringing improvements necessary for e.g. the storage driver in
Docker.
While most
Live CD
A live CD (also live DVD, live disc, or live operating system) is a complete bootable computer installation including operating system which runs directly from a CD-ROM or similar storage device into a computer's memory, rather than loading f ...
linux distributions used
Aufs as of November 2016,
Slackware
Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System, Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distributio ...
used overlayfs for its live CD.
Implementation
The main mechanics of OverlayFS relate to the merging of directory access when both filesystems present a directory for the same name. Otherwise, OverlayFS presents the object, if any, yielded by one or the other, with the "upper" filesystem taking precedence. Unlike some other overlay filesystems, the directory subtrees being merged by OverlayFS do not necessarily have to be from distinct filesystems.
OverlayFS supports
whiteouts and opaque directories in the upper filesystem to allow file and directory deletion.
[
OverlayFS does not support renaming files without performing a full copy-up of the file; however, renaming directories in an upper filesystem has limited support.
OverlayFS does not support merging changes from an upper filesystem to a lower filesystem.
]
See also
* Aufs
* UnionFS, an older union mount project
References
External links
OverlayFS documentation
Free special-purpose file systems
Linux kernel features
Special-purpose file systems supported by the Linux kernel
Union file systems
Unix file system technology
{{Linux-stub