OverlayFS

Last updated
OverlayFS
Developer(s) Miklos Szeredi, open-source community
Full nameOverlay File System
Features
File system
permissions
POSIX
Other
Supported
operating systems
Linux, FreeBSD and NetBSD [ citation needed ]

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.

Contents

History

The need and specification of a kernel mode Linux union mount filesystem was identified in late 2009. [1] The initial RFC patchset of OverlayFS was submitted by Miklos Szeredi in 2010. [2] By 2011, OpenWrt had already adopted it for their use. [3]

It was merged into the Linux kernel mainline in 2014, in kernel version 3.18. [4] [5] It was improved in version 4.0, bringing improvements necessary for e.g. the overlay2 storage driver in Docker. [6]

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

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. [8]

OverlayFS supports whiteouts and opaque directories in the upper filesystem to allow file and directory deletion. [8]

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

Related Research Articles

XFS is a high-performance 64-bit journaling file system created by Silicon Graphics, Inc (SGI) in 1993. It was the default file system in SGI's IRIX operating system starting with its version 5.3. XFS was ported to the Linux kernel in 2001; as of June 2014, XFS is supported by most Linux distributions; Red Hat Enterprise Linux uses it as its default file system.

ext2, or second extended file system, is a file system for the Linux kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed according to the same principles as the Berkeley Fast File System from BSD, it was the first commercial-grade filesystem for Linux.

ext3, or third extended filesystem, is a journaled file system that is commonly used by the Linux kernel. It used to be the default file system for many popular Linux distributions. Stephen Tweedie first revealed that he was working on extending ext2 in Journaling the Linux ext2fs Filesystem in a 1998 paper, and later in a February 1999 kernel mailing list posting. The filesystem was merged with the mainline Linux kernel in November 2001 from 2.4.15 onward. Its main advantage over ext2 is journaling, which improves reliability and eliminates the need to check the file system after an unclean shutdown. Its successor is ext4.

Unionfs is a filesystem service for Linux, FreeBSD and NetBSD which implements a union mount for other file systems. It allows files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system. Contents of directories which have the same path within the merged branches will be seen together in a single merged directory, within the new, virtual filesystem.

Filesystem in Userspace (FUSE) is a software interface for Unix and Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a bridge to the actual kernel interfaces.

OS-level virtualization is an operating system (OS) virtualization paradigm in which the kernel allows the existence of multiple isolated user space instances, called containers, zones, virtual private servers (OpenVZ), partitions, virtual environments (VEs), virtual kernels, or jails. Such instances may look like real computers from the point of view of programs running in them. A computer program running on an ordinary operating system can see all resources of that computer. However, programs running inside of a container can only see the container's contents and devices assigned to the container.

Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is also the name of free software, licensed under the GPL, for accessing Squashfs filesystems.

EncFS is a Free (LGPL) FUSE-based cryptographic filesystem. It transparently encrypts files, using an arbitrary directory as storage for the encrypted files.

The following tables compare general and technical information for a number of file systems.

debugfs is a special file system available in the Linux kernel since version 2.6.10-rc3. It was written by Greg Kroah-Hartman.

Btrfs is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager, developed together. It was created by Chris Mason in 2007 for use in Linux, and since November 2013, the file system's on-disk format has been declared stable in the Linux kernel.

In computer operating systems, union mounting is a way of combining multiple directories into one that appears to contain their combined contents. Union mounting is supported in Linux, BSD and several of its successors, and Plan 9, with similar but subtly different behavior.

Ceph is a free and open-source software-defined storage platform that provides object storage, block storage, and file storage built on a common distributed cluster foundation. Ceph provides distributed operation without a single point of failure and scalability to the exabyte level. Since version 12 (Luminous), Ceph does not rely on any other conventional filesystem and directly manages HDDs and SSDs with its own storage backend BlueStore and can expose a POSIX filesystem.

aufs implements a union mount for Linux file systems. The name originally stood for AnotherUnionFS until version 2.

In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions.

A flash file system is a file system designed for storing files on flash memory–based storage devices. While flash file systems are closely related to file systems in general, they are optimized for the nature and characteristics of flash memory, and for use in particular operating systems.

Container Linux is a discontinued open-source lightweight operating system based on the Linux kernel and designed for providing infrastructure for clustered deployments. One of its focuses was scalability. As an operating system, Container Linux provided only the minimal functionality required for deploying applications inside software containers, together with built-in mechanisms for service discovery and configuration sharing.

<span class="mw-page-title-main">Unraid</span> Linux-based operating system for network attached storage.

Unraid is a proprietary Linux-based operating system designed to run on home servers in order to operate as a network-attached storage (NAS) device, application server, media server and a virtualization host. Unraid is proprietary software developed and maintained by Lime Technology, Inc. Users of the software are encouraged to write and use plugins and Docker applications to extend the functionality of their systems.

References

  1. Aurora, Valerie (March 18, 2009). "Unioning file systems: Architecture, features, and design choices". LWN.net. Retrieved 2018-01-17.
  2. Edge, Jake (September 1, 2010). "Another union filesystem approach". LWN.net. Retrieved 2018-01-17.
  3. Corbet, Jonathan (June 15, 2011). "Debating overlayfs". LWN.net. Retrieved 2018-01-17.
  4. "OverlayFS commit to Linux". GitHub .
  5. "OverlayFS Proposed For The Linux 3.18 Kernel".
  6. "Select a storage driver - Docker". archive.is. 2016-12-06. Archived from the original on 2016-12-06. Retrieved 2017-06-05.{{cite news}}: CS1 maint: bot: original URL status unknown (link)
  7. "slackware:liveslak - SlackDocs". docs.slackware.com. Retrieved 2017-06-05.
  8. 1 2 "OverlayFS documentation". kernel.org.