You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
3.4 KiB

  1. # Configuration and Policies
  2. ## What settings should I use?
  3. Depends on what features you want. Generally, there are no "good",
  4. "bad", "inefficient", or "optimal" settings. Options are almost
  5. exclusively functional. Meaning they change the behavior of the
  6. software. It is best to read over the available options and choose
  7. what fits your use case. If something is not clear from the
  8. documentation please reach out and the documentation will be improved.
  9. The settings described in the [Quick Start](../quickstart.md) are
  10. sufficient for most users.
  11. Filesystems are complex and use cases numerous. There simply is no way
  12. to provide a singular setup that works for all situations. Since
  13. mergerfs [does not impact](usage_and_functionality.md) the underlying
  14. filesystems and can be added or removed without any impact it is
  15. extremely easy to test and experiment with different settings.
  16. ## How can I ensure files are collocated on the same branch?
  17. Many people like the idea of ensuring related files, such as all the
  18. files to a TV show season or songs in an album, are stored on the same
  19. storage device. However, most people have no actual need for this
  20. behavior.
  21. 1. If you backup your data it is extremely likely your backup solution
  22. can restore only those files you are missing.
  23. 2. Software such as **Sonarr** can manage the downloading and post
  24. processing of bespoke episodes which may be missing in a
  25. season. Either by downloading the episode individually if available
  26. or by downloading a full season.
  27. 3. There is no benefit to keeping files collocated with regard to
  28. drive spinup, caching, or other secondary concern.
  29. The main use case for wanting collocation is where the branch is going
  30. to be removed from the pool and you wish to have all data from some
  31. logical set on that device. Such as you intend to take a drive out of
  32. the pool to take on a trip and want a whole show on the
  33. drive. However, even in these situations you typically end up needing
  34. to curate the files anyway because it has show A but not show B.
  35. All that said you can accomplish collocation to varying degrees using
  36. the following methods:
  37. 1. Use
  38. [mergerfs.consolidate](https://github.com/trapexit/mergerfs-tools/blob/master/src/mergerfs.consolidate)
  39. when consolidation is needed.
  40. 2. Use a `msp` create policy.
  41. 3. Use `epmfs` or other `ep` create policy and manually create paths
  42. on the branches directly.
  43. 4. Use a `ep` `create` policy and `rand` for `mkdir`.
  44. ## How can I balance files across the pool?
  45. Similar to collocation there is generally little reason to balance
  46. files.
  47. 1. Since prediction of a filesystem's death or loss of data is near
  48. impossible there is little reason to balance in hopes of limiting
  49. data loss.
  50. 2. While performance could be impacted by having too much reading or
  51. writing happen to singular underlying filesystems balancing won't
  52. help unless you have the ability to manage the access patterns to
  53. the pool.
  54. 3. Over time most configurations will lead to a random distribution of
  55. files across the branches which is effectively "balancing."
  56. If you wish to move files around or balance the pool you can:
  57. 1. Use `rand` or `pfrd` create policies and just use your system as
  58. normal.
  59. 2. Write simple scripts using rsync or similar to move files around as
  60. you wish.
  61. 3. Use
  62. [mergerfs.balance](https://github.com/trapexit/mergerfs-tools/blob/master/src/mergerfs.balance). Keep
  63. in mind that this tool is really just an example of how to
  64. accomplish such a task.