- The RELEASE=1 profile replaced 2.42.0's NDEBUG=1 one, but the static archives and the container image still build with NDEBUG=1, which therefore selected the debug profile: -O0 -g3 with assertions on. Both Makefiles accept NDEBUG=1 again, as -O3 -DNDEBUG, and the debug profile defines DEBUG. The vendored libfuse follows the same profile as mergerfs. - make release first removes the objects, binaries and stamp under build/ and cleans vendored/libfuse, because make only compares timestamps: objects from an earlier debug build were otherwise linked into the release binary unchanged. Packages and build reports in build/pkgs are kept; TEST_release_pkg_preservation checks both. - make release also builds preload.so. It takes the release defines through its own PRELOAD_CPPFLAGS: the global CPPFLAGS add _FILE_OFFSET_BITS=64, which would hide its unsuffixed open/openat/fopen/creat interposers. - mergerfs.spec builds the release target, as debian/rules does. The distribution's CFLAGS, CXXFLAGS and LDFLAGS still apply. - The release driver mounts the repository with ":ro,z", not ":ro:z", which Podman read as an extra field instead of a mount option. TEST_release_metadata runs the driver against a fake podman and checks the volume argument and the build report. - Remove release-installer: build-release has no installer target. - make help printed a literal "\n" where /bin/sh is bash. Match the build.md transcript to its output and document the profiles. Performance: static archives and the container image go from -O0 with assertions back to optimized builds, now -O3 -DNDEBUG (2.42.0: -O2 -DNDEBUG). RPM packages keep the distribution's -O2 and no longer evaluate assertions. A plain make is unoptimized, as before. |
||
|---|---|---|
| .github | ||
| buildtools | ||
| debian | ||
| man | ||
| mkdocs | ||
| src | ||
| tests | ||
| tools | ||
| vendored | ||
| .gitignore | ||
| DEPENDENCIES | ||
| LICENSE | ||
| Makefile | ||
| mergerfs.spec | ||
| README.md | ||
mergerfs - a featureful union filesystem
mergerfs is a FUSE based union filesystem geared towards simplifying storage and management of files across numerous commodity storage devices. It is similar to mhddfs, unionfs, aufs, DrivePool, etc.
Features
- Logically combine numerous filesystems/paths into a single mount point (JBOFS: Just a Bunch of FileSystems)
- 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
- Configurable file selection and creation placement
- File IO passthrough for near native IO performance (where supported)
- Works with filesystems of any size
- Works with filesystems of almost any type
- Ignore read-only filesystems when creating files
- Hard links
- Hard link copy-on-write / CoW
- Runtime configurable
- Support for extended attributes (xattrs)
- Support for file attributes (chattr)
- Support for POSIX ACLs
Non-features
- Read/write overlay on top of read-only filesystem like OverlayFS
- File whiteout
- RAID like parity calculation (see SnapRAID)
- Redundancy
- Splitting of files across branches
How it works
mergerfs logically merges multiple filesystem paths together. Not block devices, not filesystem mounts, just paths. It acts as a proxy to the underlying filesystem paths. Combining the behaviors of some functions and being a selector for others.
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.
The way in which mergerfs behaves is controlled by the config/options/settings. More specifically by policies.
Visualization
A + B = C
/disk1 /disk2 /merged
| | |
+-- /dir1 +-- /dir1 +-- /dir1
| | | | | |
| +-- file1 | | | +-- file1
| | +-- file2 | +-- file2
| | +-- file3 | +-- file3
| | |
+-- /dir2 | +-- /dir2
| | | | |
| +-- file4 | | +-- file4
| | |
| +-- /dir3 +-- /dir3
| | | | |
| | +-- file5 | +-- file5
| | |
+-- file6 | +-- file6
+-- file7 +-- file7 +-- file7
QuickStart
https://trapexit.github.io/mergerfs/latest/quickstart/
Documentation
https://trapexit.github.io/mergerfs
Support
https://trapexit.github.io/mergerfs/latest/support/
Sponsorship and Donations
https://github.com/trapexit/support
Development and support of a project like mergerfs requires a significant amount of time and effort. The software is released under the very liberal ISC license and is therefore free to use for personal or commercial uses.
If you are a non-commercial user and find mergerfs and its support valuable and would like to support the project financially it would be very much appreciated.
If you are using mergerfs commercially please consider sponsoring the project to ensure it continues to be maintained and receive updates. If custom features are needed feel free to contact me directly.