mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-29 11:26:44 -05:00
Rework config, centralize fuse config (#1547)
This commit is contained in:
parent
00e5467e99
commit
727c522fb8
46 changed files with 1294 additions and 1316 deletions
|
|
@ -18,37 +18,71 @@ mergerfs [does not impact](usage_and_functionality.md) the underlying
|
|||
filesystems and can be added or removed without any impact it is
|
||||
extremely easy to test and experiment with different settings.
|
||||
|
||||
Additional reading:
|
||||
|
||||
* [Config/Options](../config/options.md)
|
||||
|
||||
|
||||
## What create policy should I use?
|
||||
|
||||
If it isn't clear to you then you should use `pfrd` as described in
|
||||
the [quickstart guide](../quickstart.md).
|
||||
|
||||
|
||||
## Why is pfrd the default create policy?
|
||||
|
||||
Originally the default was `epmfs` however it was found to cause
|
||||
significant confusion among new users who expected mergerfs to always
|
||||
choose a branch with available space. For mergerfs v2.41.0 it was
|
||||
decided to change the default to the less restrictive policy `pfrd`.
|
||||
significant confusion among new users who assumed mergerfs to behave
|
||||
like other software which always choose a branch with most available
|
||||
space without any filtering or restrictions. The reason for using
|
||||
`epmfs` was to allow people to use mergerfs without impacting the
|
||||
layout of their data across the branches. Keeping the total entropy of
|
||||
the system in check. This, however, was not understood by users who
|
||||
did not read the documentation and caused significant support burdens.
|
||||
|
||||
For mergerfs v2.41.0 it was decided to change the default to `pfrd` to
|
||||
minimize the support burden.
|
||||
|
||||
`pfrd` was chosen because it prioritizes placement to branches based
|
||||
on free space (percentage wise) without overloading a specific branch
|
||||
as `mfs`, `lus`, or other policies could when a singular branch has
|
||||
significantly more free space. Since it is impossible to know the
|
||||
usage and access patterns of the filesystem spreading out files across
|
||||
the branches also spreads the load and therefore good for general use
|
||||
cases making it a good default.
|
||||
|
||||
Additional reading:
|
||||
|
||||
* [functions, categories and policies](../config/functions_categories_policies.md)
|
||||
|
||||
|
||||
## How can I ensure files are collocated on the same branch?
|
||||
|
||||
Many people like the idea of ensuring related files, such as all the
|
||||
files to a TV show season or songs in an album, are stored on the same
|
||||
storage device. However, most people have no actual need for this
|
||||
storage device. However, most people have no technical need for this
|
||||
behavior.
|
||||
|
||||
1. If you backup your data it is extremely likely your backup solution
|
||||
can restore only those files you are missing.
|
||||
2. Software such as **Sonarr** can manage the downloading and post
|
||||
processing of bespoke episodes which may be missing in a
|
||||
season. Either by downloading the episode individually if available
|
||||
or by downloading a full season.
|
||||
can restore only those files you are missing. There is no need to
|
||||
store data in related units to ensure restoring data is easy.
|
||||
2. Software such as [Sonarr](https://sonarr.tv) can manage the
|
||||
downloading and post processing of bespoke files / episodes which
|
||||
may be missing. Either by downloading the episode individually if
|
||||
available or by downloading a full season.
|
||||
3. There is no benefit to keeping files collocated with regard to
|
||||
drive spinup, caching, or other secondary concern.
|
||||
drive spinup, caching, or other secondary concern. In fact
|
||||
depending on usage patterns placing the data on the same underlying
|
||||
device could harm performance.
|
||||
|
||||
The main use case for wanting collocation is where the branch is going
|
||||
to be removed from the pool and you wish to have all data from some
|
||||
logical set on that device. Such as you intend to take a drive out of
|
||||
the pool to take on a trip and want a whole show on the
|
||||
drive. However, even in these situations you typically end up needing
|
||||
to curate the files anyway because it has show A but not show B.
|
||||
to be removed from the pool and used in isolation temporarily and you
|
||||
wish to have all data from some logical set on that device. Such as
|
||||
you intend to take a drive out of the pool to take on a trip and want
|
||||
a whole show or artist's works on the drive. However, even in these
|
||||
situations you typically end up needing to curate the files anyway
|
||||
because it has show A but not show B. In such cases it is more
|
||||
convient to use a separate devices and sync what you wish to it.
|
||||
|
||||
All that said you can accomplish collocation to varying degrees using
|
||||
the following methods:
|
||||
|
|
@ -56,33 +90,37 @@ the following methods:
|
|||
1. Use
|
||||
[mergerfs.consolidate](https://github.com/trapexit/mergerfs-tools/blob/master/src/mergerfs.consolidate)
|
||||
when consolidation is needed.
|
||||
2. Use a `msp` create policy.
|
||||
2. Use a `msp` create policy to do a best effort collocation without
|
||||
needing explicit directory curation.
|
||||
3. Use `epmfs` or other `ep` create policy and manually create paths
|
||||
on the branches directly.
|
||||
4. Use a `ep` `create` policy and `rand` for `mkdir`.
|
||||
on the branches directly as you need/desire.
|
||||
4. Use a `ep` `create` policy and `pfrd` or `rand` for `mkdir`.
|
||||
|
||||
|
||||
## How can I balance files across the pool?
|
||||
|
||||
Similar to collocation there is generally little reason to balance
|
||||
files.
|
||||
files across the pool branches.
|
||||
|
||||
1. Since prediction of a filesystem's death or loss of data is near
|
||||
impossible there is little reason to balance in hopes of limiting
|
||||
data loss.
|
||||
1. Since prediction of a device's/filesystem's death or loss of data
|
||||
is near impossible there is little reason to balance in hopes of
|
||||
limiting data loss.
|
||||
2. While performance could be impacted by having too much reading or
|
||||
writing happen to singular underlying filesystems balancing won't
|
||||
help unless you have the ability to manage the access patterns to
|
||||
the pool.
|
||||
3. Over time most configurations will lead to a random distribution of
|
||||
files across the branches which is effectively "balancing."
|
||||
3. Over time the churn of adding and removing files will lead to a
|
||||
random distribution of files across the branches which is
|
||||
effectively "balancing" if using create policies which do not favor
|
||||
any particular branch.
|
||||
|
||||
If you wish to move files around or balance the pool you can:
|
||||
All that said if you wish to move files around or balance the pool you
|
||||
can:
|
||||
|
||||
1. Use `rand` or `pfrd` create policies and just use your system as
|
||||
normal.
|
||||
2. Write simple scripts using rsync or similar to move files around as
|
||||
you wish.
|
||||
2. Write scripts using rsync or similar to move files around as you
|
||||
wish.
|
||||
3. Use
|
||||
[mergerfs.balance](https://github.com/trapexit/mergerfs-tools/blob/master/src/mergerfs.balance). Keep
|
||||
in mind that this tool is really just an example of how to
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
## What should mergerfs NOT be used for?
|
||||
|
||||
* Situations where you need large amounts of contiguous space beyond
|
||||
that available on any singular device. Such as putting 10GiB file on
|
||||
2 6GiB filesystems.
|
||||
* databases: Even if the database stored data in separate files
|
||||
(mergerfs wouldn't offer much otherwise) the higher latency of the
|
||||
indirection will really harm performance. If it is a lightly used
|
||||
|
|
@ -13,9 +16,9 @@
|
|||
should stick with RAID. However, it is fine to put a filesystem
|
||||
which is on a RAID setup in mergerfs.
|
||||
|
||||
**However, if using [passthrough](../config/passthrough.md) the above
|
||||
situations are less likely to be a concern. Best to do testing for
|
||||
your specific use case.**
|
||||
**However, if using [passthrough](../config/passthrough.md) the
|
||||
performance related issues above are less likely to be a concern. Best
|
||||
to do testing for your specific use case.**
|
||||
|
||||
|
||||
## It's mentioned that there are some security issues with mhddfs. What are they? How does mergerfs address them?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue