Union mount
In computer operating systems, union mounting is a way of combining multiple directories into one that appears to contain their combined contents.[src] Union mounting is supported in Linux, BSD and several of its successors, and Plan 9, with similar but subtly different behavior.[src] As an example application of union mounting, consider the need to update the information contained on a CD-ROM or DVD.[src] While a CD-ROM is not writable, one can overlay the CD's mount point with a writable directory in a union mount.[src] Then, updating files in the union directory will cause them to end up in the writable directory, giving the illusion that the CD-ROM's contents have been updated.[src]
In computer operating systems, union mounting is a way of combining multiple directories into one that appears to contain their combined contents.[src] Union mounting is supported in Linux, BSD and several of its successors, and Plan 9, with similar but subtly different behavior.[src] As an example application of union mounting, consider the need to update the information contained on a CD-ROM or DVD.[src] While a CD-ROM is not writable, one can overlay the CD's mount point with a writable directory in a union mount.[src] Then, updating files in the union directory will cause them to end up in the writable directory, giving the illusion that the CD-ROM's contents have been updated.[src] ==Implementations== ===Plan 9=== In the Plan 9 operating system from Bell Labs (mid-1980s onward), union mounting is a central concept, replacing several older Unix conventions with union directories; for example, several directories containing executables, unioned together at a single directory, replace the variable for command lookup in the shell.[src] Plan 9 union semantics are greatly simplified compared to the implementations for POSIX-style operating systems: the union of two directories is simply the concatenation of their contents, so a directory listing of the union may display duplicate names.[src] Also, no effort is made to recursively merge subdirectories, leading to an extremely simple implementation.[src] Directories are unioned in a controllable order; , where is a union directory, denotes the file called in the first constituent directory that contains such a file.[src] ===Unix and BSD=== Unix/POSIX implementations of unions have requirements different from the Plan 9 implementation due to constraints in the traditional Unix file system behavior, which greatly complicates their implementation and often leads to compromises.[src] Problems that union mounting on Unix-like operating systems encounters include: Duplicate file names within a directory are not acceptable, since this would break applications' expectations of how a Unix file system works.[src] Putting a logical, stack-like precedence ordering on the union's constituents partially solves this problem, but requires memory to record which files need to be skipped over during a directory listing (which is otherwise a nearly stateless operation).[src] Deletion requires special support: if files with the same name exist in several of the union directory's constituents, simply deleting it from one of the constituents causes a file from one of the others to reappear in its stead.[src] Insertion of a directory into the stack can cause incoherency in the kernel's file name cache.[src] Renaming a file within a single mounted file system (using the system call) should be an atomic operation, but renaming within a union mount can require changes to multiple of the union's constituent directories.[src] A possible solution is to disallow in such situations and require implementations to copy-and-delete instead.[src] Stable inode numbers for files, hard links and memory-mapped I/O ( ) are hard to implement correctly.[src] Early attempts to add unioning to Unix filesystems included the 3-d filesystem (Bell Labs) and the Translucent File Service in SunOS (Sun Microsystems, 1988 ).[src] An implementation of union mounting was added to the BSD version of Unix in version 4.4 (1994), taking inspiration from these earlier attempts, Plan 9 and the stackable file systems in Spring (Sun, 1994).[src] 4.4BSD implements the stack-of-directories approach outlined above.[src] As in Plan 9, operations traverse this stack top-down to resolve names, but unlike Plan 9, BSD union mounts are recursive, so that the contents of subdirectories appear merged in the union directory.[src] Also unlike the Plan 9 version, all layers except the top are read-only: modifying files in the union causes their contents to first be copied into the top layer of the stack, where the modifications are then applied.[src] Deletion of files is implemented by writing a special type of file called a whiteout to the top directory, which has the effect of marking the file name as non-existent and hiding files with the same name in the lower layers of the stack.[src] Whiteouts require support from the underlying file system.[src] ===Linux=== Union mounting was implemented for Linux 0.99 in 1993; this initial implementation was called the Inheriting File System, but was abandoned by its developer because of its complexity.[src] The next major implementation was UnionFS, which grew out of the FiST project at Stony Brook University.[src] An attempt to replace UnionFS, aufs, was released in 2006, followed in 2009 by OverlayFS.[src] In 2014 OverlayFS union mount implementation was added to the standard Linux kernel source code.[src] Similarly, GlusterFS offers the ability to mount different filesystems distributed across a network, rather than being located on the same machine.[src] MergerFS, originally released in 2014, is an actively developed open-source FUSE plugin, allowing pooling of arbitrary directories.[src]
35 sentences · 35 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Union mount." encyclopegia.org, 2025, https://encyclopegia.org/wiki/union-mount. Accessed 27 November 2026.
Chicago
"Union mount." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/union-mount.
APA
encyclopegia.org. (2025). Union mount. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/union-mount
Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| release date | 2006 | Wikipedia |
| release date | 2014 | Wikipedia |