In computing, OverlayFS is a union mount filesystem implementation for Linux. 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 had already adopted it for their use.

OverlayFS

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.

OverlayFS

While most Live CD linux distributions used Aufs as of November 2016, Slackware used overlayfs for its live CD.

OverlayFS

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