2024-12-21 16:36:07 +01:00
# mergerfs - a featureful union filesystem
2025-11-04 00:02:46 -06:00
**mergerfs** is a [union
filesystem](https://en.wikipedia.org/wiki/Union_mount) that makes
2025-12-24 00:25:39 -05:00
multiple filesystems and/or directories appear as a single unified
directory. mergerfs is designed to simplify how you manage files
across multiple independent filesystems without the complexity,
fragility, or cost of RAID or similar storage aggregation
technologies.
mergerfs as a smart pooling layer allows you to combine any number of
[existing
filesystems](faq/usage_and_functionality.md#can -mergerfs-be-used-with-filesystems-which-already-have-data);
whether they are on hard drives, SSDs, network shares, or other
mounted storage; into what looks like one large filesystem, while
2025-11-04 00:02:46 -06:00
still maintaining direct access to each individual filesystem. Unlike
2025-12-24 00:25:39 -05:00
RAID, there's no rebuild process if a device fails. You only lose
those files that were on that specific filesystem. You can also add or
remove filesystems at any time without restructuring the pool.
2025-11-04 00:02:46 -06:00
mergerfs excels at cost-effective storage expansion, making it ideal
for media libraries, backups, archival data, and other write-sometimes,
read-often workloads where you need lots of space but don't want
2025-12-24 00:25:39 -05:00
the overhead of traditional storage aggregation technologies.
2025-11-04 00:02:46 -06:00
**Key advantages:**
2026-01-27 05:00:22 -08:00
* [Non-destructive ](faq/usage_and_functionality.md#is-adding-or-removing-mergerfs-tofrom-my-setup-destructive ) adding and removing of filesystems (even at runtime)
* Mix and match filesystems of any [size ](faq/technical_behavior_and_limitations.md#are-there-any-size-limitations-to-files-directories-etc ),
2025-12-24 00:25:39 -05:00
[type ](faq/compatibility_and_integration.md#what-filesystems-can-be-used-as-branches ),
or [underlying
device](faq/compatibility_and_integration.md#what -types-of-storage-devices-does-mergerfs-work-with)
2025-11-04 00:02:46 -06:00
* No parity calculations or rebuild times
2025-12-24 00:25:39 -05:00
* Does not require hard drives to be spinning if not in use
* [Direct access to files ](faq/usage_and_functionality.md#can-filesystems-still-be-used-directly-outside-of-mergerfs-while-pooled ) on individual filesystems when needed
* Flexible [policies ](config/functions_categories_policies.md ) for controlling where new files are created
2025-11-04 00:02:46 -06:00
For users seeking alternatives to mhddfs, unionfs, aufs, or DrivePool,
mergerfs offers a mature, actively maintained solution with extensive
configuration options and documentation. See the [project comparisons
2025-12-24 00:25:39 -05:00
for more details.](project_comparisons.md)
2025-08-10 18:23:55 -04:00
2024-12-21 16:36:07 +01:00
2024-12-23 22:12:26 -06:00
## Features
2024-12-21 16:36:07 +01:00
2024-12-23 22:12:26 -06:00
* Logically combine numerous filesystems/paths into a single
2026-01-27 05:00:22 -08:00
mount point (JBOFS: Just a Bunch of FileSystems, think filesystem
[reverse proxy ](https://en.wikipedia.org/wiki/Reverse_proxy ))
2024-12-23 22:12:26 -06:00
* Combine paths of the same or different filesystems
* Ability to add or remove filesystems/paths without impacting the
rest of the data
* Unaffected by individual filesystem failure
2025-11-04 00:02:46 -06:00
* Configurable file creation placement
2025-08-10 18:23:55 -04:00
* File IO [passthrough ](config/passthrough.md ) for near native IO
performance (where supported)
2024-12-23 22:12:26 -06:00
* Works with filesystems of any size
2025-08-10 18:23:55 -04:00
* Works with filesystems of [almost any
type](faq/compatibility_and_integration.md#what -filesystems-can-be-used-as-branches)
2024-12-23 22:12:26 -06:00
* Ignore read-only filesystems when creating files
2025-09-19 20:20:28 -04:00
* [Hard links ](faq/technical_behavior_and_limitations.md#do-hard-links-work )
2025-10-24 22:31:04 -05:00
* Hard link [copy-on-write / CoW ](config/link-cow.md )
2025-11-04 00:02:46 -06:00
* [Runtime configurability ](runtime_interface.md )
2024-12-23 22:12:26 -06:00
* Support for extended attributes (xattrs)
* Support for file attributes (chattr)
* Support for POSIX ACLs
2024-12-21 16:36:07 +01:00
2024-12-23 22:12:26 -06:00
## Non-features
2024-12-21 16:36:07 +01:00
2025-10-13 12:44:53 -04:00
* RAID like redundancy (see [SnapRAID ](https://www.snapraid.it ) and
[NonRAID ](https://github.com/qvr/nonraid ))
2026-01-27 05:00:22 -08:00
* RAID like performance improvements
2025-11-04 00:02:46 -06:00
* LVM/RAID style block device aggregation
* Data integrity checks, snapshots, file versioning
* Read/write overlays on top of read-only filesystems (like OverlayFS)
* File whiteout
2024-12-23 22:12:26 -06:00
* Splitting of files across branches
2025-11-04 00:02:46 -06:00
* Active rebalancing of content
2025-12-24 00:25:39 -05:00
* [Actively attempt to keep hard drives spun down ](faq/limit_drive_spinup.md )
2024-12-21 16:36:07 +01:00
2024-12-23 22:12:26 -06:00
## How it works
2024-12-21 16:36:07 +01:00
2025-04-04 18:41:58 -05:00
mergerfs logically merges multiple filesystem paths together. Not
block devices, not filesystem mounts, just paths. It acts as a proxy
2025-12-24 00:25:39 -05:00
to the underlying filesystem. Combining the behaviors of some
2025-04-04 18:41:58 -05:00
functions and being a selector for others.
2024-12-21 16:36:07 +01:00
2024-12-23 22:12:26 -06:00
When the contents of a directory are requested mergerfs combines the
list of files from each directory, deduplicating entries, and returns
that list.
When a file or directory is created a policy is first run to determine
which branch will be selected for the creation.
For functions which change attributes or remove the file the behavior
may be applied to all instances found.
2025-09-21 15:25:24 -04:00
The way in which mergerfs behaves is controlled by the
2025-11-04 00:02:46 -06:00
[config / options / settings ](config/options.md ). More specifically by
2025-09-21 15:25:24 -04:00
[policies ](config/functions_categories_policies.md ).
2024-12-23 22:12:26 -06:00
### Visualization
```
A + B = C
/disk1 /disk2 /merged
| | |
+-- /dir1 +-- /dir1 +-- /dir1
| | | | | |
2025-08-10 18:23:55 -04:00
| +-- file1 | | | +-- file1
| | +-- file2 | +-- file2
| | +-- file3 | +-- file3
| | |
+-- /dir2 | +-- /dir2
| | | | |
2025-09-22 17:23:50 -04:00
| +-- file4 | | +-- file4
2025-08-10 18:23:55 -04:00
| | |
| +-- /dir3 +-- /dir3
| | | | |
| | +-- file5 | +-- file5
| | |
+-- file6 | +-- file6
+-- file7 +-- file7 +-- file7
2024-12-23 22:12:26 -06:00
```
2025-04-04 18:41:58 -05:00
## Getting Started
Head to the [quick start guide ](quickstart.md ).
2025-09-21 15:25:24 -04:00
## About This Documentation
* Like the software the documentation changes over time. Ensure that
you are reading the documentation related to the version of the
software you are using.
* The documentation is explicit, literal, and reasonably thorough. If
a suspected feature is not mentioned it does not exist. Do not read
into the wording. What is described is how it functions. If you feel
like something is not explained sufficiently or missing please [ask
in one of the supported forums](support.md#contact -issue-submission)
and the docs will be updated.
2025-11-04 00:02:46 -06:00
* The search feature of MkDocs is not great. Searching for "literal
2026-01-27 05:00:22 -08:00
strings" will generally not work. Alternative solutions are being
2025-11-04 00:02:46 -06:00
investigated.
2025-12-24 00:25:39 -05:00
* While not intended for end users nor completely accurate some might
find the AI generated docs at https://deepwiki.com/trapexit/mergerfs
interesting or useful.