UnionFS

From Vero - Wikipedia
Jump to navigation Jump to search

Template:Short description Template:Use dmy dates Template:Infobox filesystem 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.

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. This may be desirable when the media is physically read-only, such as in the case of Live CDs.

Unionfs was originally developed by Erez Zadok and his team at Stony Brook University.<ref>Template:Cite journal</ref><ref>Template:Cite web</ref><ref>Template:Cite web</ref>

Uses

In Knoppix, a union between the file system on the CD-ROM 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.<ref>Template:Cite web</ref>

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, 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).<ref>Template:Cite web</ref>

UbuntuLTSP, the Linux Terminal Server Project implementation for Ubuntu, uses Unionfs when PXE booting thin or thick clients.<ref>Template:Cite web</ref>

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 is an alternative version of unionfs.<ref>Template:Cite web</ref>

overlayfs 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<ref>Template:Cite web</ref> after many years of development and discussion<ref>Template:Cite web</ref> 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.<ref>Template:Cite web</ref>

The Plan 9 from Bell Labs operating system uses union mounts extensively to build custom namespaces per user or processes.

Union mounts have also been available in BSD since at least 1995.<ref>Template:Cite web</ref>

The GNU Hurd has an implementation of Unionfs.<ref>Template:Cite web</ref> 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.).<ref>Template:Cite web</ref>

Sun Microsystems 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 SunOS 3, circa 1986.<ref>Template:Cite book</ref>

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.<ref>Template:Cite web</ref>

See also

References

Template:Reflist

  • Template:Github - FUSE-based union file system which transparently expands ZIP files

Template:File systems