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.

54 lines
2.1 KiB

  1. # branches
  2. The 'branches' argument is a colon (':') delimited list of paths to be
  3. pooled together. It does not matter if the paths are on the same or
  4. different filesystems nor does it matter the filesystem type (within
  5. reason). Used and available space will not be duplicated for paths on
  6. the same filesystem and any features which aren't supported by the
  7. underlying filesystem (such as file attributes or extended attributes)
  8. will return the appropriate errors.
  9. Branches currently have two options which can be set. A type which
  10. impacts whether or not the branch is included in a policy calculation
  11. and a individual minfreespace value. The values are set by prepending
  12. an `=` at the end of a branch designation and using commas as
  13. delimiters. Example: `/mnt/drive=RW,1234`
  14. ### branch mode
  15. - RW: (read/write) - Default behavior. Will be eligible in all policy
  16. categories.
  17. - RO: (read-only) - Will be excluded from `create` and `action`
  18. policies. Same as a read-only mounted filesystem would be (though
  19. faster to process).
  20. - NC: (no-create) - Will be excluded from `create` policies. You can't
  21. create on that branch but you can change or delete.
  22. ### minfreespace
  23. Same purpose and syntax as the global option but specific to the
  24. branch. If not set the global value is used.
  25. ### globbing
  26. To make it easier to include multiple branches mergerfs supports
  27. [globbing](http://linux.die.net/man/7/glob). **The globbing tokens
  28. MUST be escaped when using via the shell else the shell itself will
  29. apply the glob itself.**
  30. ```
  31. # mergerfs /mnt/hdd\*:/mnt/ssd /media
  32. ```
  33. The above line will use all mount points in /mnt prefixed with **hdd**
  34. and **ssd**.
  35. To have the pool mounted at boot or otherwise accessible from related
  36. tools use `/etc/fstab`.
  37. ```
  38. # <file system> <mount point> <type> <options> <dump> <pass>
  39. /mnt/hdd*:/mnt/ssd /media mergerfs minfreespace=16G 0 0
  40. ```
  41. **NOTE:** The globbing is done at mount or when updated using the runtime API. If a new directory is added matching the glob after the fact it will not be automatically included.