UnionFS
   HOME

TheInfoList



OR:

Unionfs is a filesystem service 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, whi ...
,
FreeBSD FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
and
NetBSD NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is ava ...
which implements a
union mount 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 ...
for other
file systems 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 ...
. 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. When mounting branches, the priority of one branch over the other is specified. So when both branches contain a file with the same name, one gets priority over the other. The different branches may be either ''read-only'' or ''read/write'' file systems, so that writes to the virtual, merged copy are directed to a specific real file system. This allows a file system to appear as writable, but without actually allowing writes to change the file system, also known as
copy-on-write Copy-on-write (COW), sometimes referred to as implicit sharing or shadowing, is a resource-management technique used in computer programming to efficiently implement a "duplicate" or "copy" operation on modifiable resources. If a resource is dupl ...
. This may be desirable when the media is physically read-only, such as in the case of
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 ...
s. Unionfs was originally developed by Professor Erez Zadok and his team at
Stony Brook University Stony Brook University (SBU), officially the State University of New York at Stony Brook, is a public research university in Stony Brook, New York. Along with the University at Buffalo, it is one of the State University of New York system' ...
.


Uses

In
Knoppix KNOPPIX ( ) is an operating system based on Debian designed to be run directly from a CD / DVD ( Live CD) or a USB flash drive (Live USB), one of the first live operating system distributions (just after Yggdrasil Linux). Knoppix was develop ...
, a union between the file system on the
CD-ROM A CD-ROM (, compact disc read-only memory) is a type of read-only memory consisting of a pre-pressed optical compact disc that contains data. Computers can read—but not write or erase—CD-ROMs. Some CDs, called enhanced CDs, hold both com ...
or DVD and a file system contained in an image file called ''knoppix.img'' (knoppix-data.img for Knoppix 7) on a writable drive (such as a USB memory stick) can be made, where the writable drive has priority over the read-only filesystem. This allows the user to change any of the files on the system, with the new file stored in the image and transparently used instead of the one on the CD. Unionfs can also be used to create a single common template for a number of file systems, or for security reasons. It is sometimes used as an ''ad hoc'' snapshotting system. Docker uses file systems inspired by Unionfs, such as
Aufs aufs (short for advanced multi-layered unification filesystem) implements a union mount for Linux file systems. The name originally stood for AnotherUnionFS until version 2. Developed by Junjiro Okajima in 2006, aufs is a complete rewrite of t ...
, to layer Docker images. As actions are done to a base image, layers are created and documented, such that each layer fully describes how to recreate an action. This strategy enables Docker's lightweight images, as only layer updates need to be propagated (compared to full VMs, for example). ''UbuntuLTSP'', the Linux Terminal Server Project implementation for Ubuntu, uses Unionfs when PXE booting thin or thick clients.


Other implementations

Unionfs for Linux has two versions. Version 1.x is a standalone one that can be built as a module. Version 2.x is a newer, redesigned, and reimplemented one.
aufs aufs (short for advanced multi-layered unification filesystem) implements a union mount for Linux file systems. The name originally stood for AnotherUnionFS until version 2. Developed by Junjiro Okajima in 2006, aufs is a complete rewrite of t ...
is an alternative version of unionfs.
overlayfs 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 ...
written by Miklos Szeredi has been used in OpenWRT and considered by Ubuntu and has been merged into the mainline Linux kernel on 26 October 2014 after many years of development and discussion for version 3.18 of the kernel. ''unionfs-fuse'' is an independent project, implemented as a user space filesystem program, instead of a kernel module or patch. Like Unionfs, it supports copy-on-write and read-only or read–write branches.
Plan 9 from Bell Labs Plan 9 from Bell Labs is a distributed operating system which originated from the Computing Science Research Center (CSRC) at Bell Labs in the mid-1980s and built on UNIX concepts first developed there in the late 1960s. Since 2000, Plan 9 has be ...
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
uses
union mount 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 ...
s extensively to build custom
namespace In computing, a namespace is a set of signs (''names'') that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified. Namespaces ...
s per user or processes. Union mounts have also been available in BSD since at least 1995. The
GNU Hurd GNU Hurd is a collection of microkernel servers written as part of GNU, for the GNU Mach microkernel. It has been under development since 1990 by the GNU Project of the Free Software Foundation, designed as a replacement for the Unix kernel, and ...
has an implementation of Unionfs. As of January 2008, it works, but results in a read-only mount-point. mhddfs works like Unionfs but permits balancing files over drives with the most free space available. It is implemented as a user space filesystem. mergerfs is a FUSE based union filesystem which offers multiple policies for accessing and writing files as well as other advanced features (xattrs, managing mixed RO and RW drives, link CoW, etc.).
Sun Microsystems Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, t ...
introduced the first implementation of a stacked, layered file system with copy-on-write, whiteouts (hiding files in lower layers from higher layers), etc. as the
Translucent File Service In the field of optics, transparency (also called pellucidity or diaphaneity) is the physical property of allowing light to pass through the material without appreciable scattering of light. On a macroscopic scale (one in which the dimensions a ...
in
SunOS SunOS is a Unix-branded operating system developed by Sun Microsystems for their workstation and server computer systems. The ''SunOS'' name is usually only used to refer to versions 1.0 to 4.1.4, which were based on BSD, while versions 5.0 an ...
3, circa 1986. JailbreakMe 3.0, a tool for jailbreaking iOS devices released in July 2011, uses unionfs techniques to speed up the installation process of the operating system modification.


See also

*
OverlayFS 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 ...
*
Aufs aufs (short for advanced multi-layered unification filesystem) implements a union mount for Linux file systems. The name originally stood for AnotherUnionFS until version 2. Developed by Junjiro Okajima in 2006, aufs is a complete rewrite of t ...


References


External links

* * * – A
FUSE Fuse or FUSE may refer to: Devices * Fuse (electrical), a device used in electrical systems to protect against excessive current ** Fuse (automotive), a class of fuses for vehicles * Fuse (hydraulic), a device used in hydraulic systems to protect ...
-based alternative implementation of Unionfs
FunionFS
– Another FUSE-based implementation of Unionfs
The new unionfs implementation for FreeBSD and status of merging
(2007-10-23)



(based on LUFS)
DENX U-Boot and Linux Guide: Overlay File Systems
{{File systems Free special-purpose file systems File systems supported by the Linux kernel Union file systems