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.

245 lines
12 KiB

  1. # OPTIONS
  2. These options are the same regardless of whether you use them with the
  3. `mergerfs` commandline program, in fstab, or in a config file.
  4. ### mount options
  5. - **config**: Path to a config file. Same arguments as below in
  6. key=val / ini style format.
  7. - **branches**: Colon delimited list of branches.
  8. - **minfreespace=SIZE**: The minimum space value used for creation
  9. policies. Can be overridden by branch specific option. Understands
  10. 'K', 'M', and 'G' to represent kilobyte, megabyte, and gigabyte
  11. respectively. (default: 4G)
  12. - **moveonenospc=BOOL|POLICY**: When enabled if a **write** fails with
  13. **ENOSPC** (no space left on device) or **EDQUOT** (disk quota
  14. exceeded) the policy selected will run to find a new location for
  15. the file. An attempt to move the file to that branch will occur
  16. (keeping all metadata possible) and if successful the original is
  17. unlinked and the write retried. (default: false, true = mfs)
  18. - **inodecalc=passthrough|path-hash|devino-hash|hybrid-hash**: Selects
  19. the inode calculation algorithm. (default: hybrid-hash)
  20. - **dropcacheonclose=BOOL**: When a file is requested to be closed
  21. call `posix_fadvise` on it first to instruct the kernel that we no
  22. longer need the data and it can drop its cache. Recommended when
  23. **cache.files=partial|full|auto-full|per-process** to limit double
  24. caching. (default: false)
  25. - **direct-io-allow-mmap=BOOL**: On newer kernels (>= 6.6) it is
  26. possible to disable file page caching while still allowing for
  27. shared mmap support. mergerfs will enable this feature if available
  28. but an option is provided to turn it off for testing and debugging
  29. purposes. (default: true)
  30. - **symlinkify=BOOL**: When enabled and a file is not writable and its
  31. mtime or ctime is older than **symlinkify_timeout** files will be
  32. reported as symlinks to the original files. Please read more below
  33. before using. (default: false)
  34. - **symlinkify_timeout=UINT**: Time to wait, in seconds, to activate
  35. the **symlinkify** behavior. (default: 3600)
  36. - **nullrw=BOOL**: Turns reads and writes into no-ops. The request
  37. will succeed but do nothing. Useful for benchmarking
  38. mergerfs. (default: false)
  39. - **lazy-umount-mountpoint=BOOL**: mergerfs will attempt to "lazy
  40. umount" the mountpoint before mounting itself. Useful when
  41. performing live upgrades of mergerfs. (default: false)
  42. - **ignorepponrename=BOOL**: Ignore path preserving on
  43. rename. Typically rename and link act differently depending on the
  44. policy of `create` (read below). Enabling this will cause rename and
  45. link to always use the non-path preserving behavior. This means
  46. files, when renamed or linked, will stay on the same
  47. filesystem. (default: false)
  48. - **export-support=BOOL**: Sets a low-level FUSE feature intended to
  49. indicate the filesystem can support being exported via
  50. NFS. (default: true)
  51. - **security_capability=BOOL**: If false return ENOATTR when xattr
  52. security.capability is queried. (default: true)
  53. - **xattr=passthrough|noattr|nosys**: Runtime control of
  54. xattrs. Default is to passthrough xattr requests. 'noattr' will
  55. short circuit as if nothing exists. 'nosys' will respond with ENOSYS
  56. as if xattrs are not supported or disabled. (default: passthrough)
  57. - **link_cow=BOOL**: When enabled if a regular file is opened which
  58. has a link count > 1 it will copy the file to a temporary file and
  59. rename over the original. Breaking the link and providing a basic
  60. copy-on-write function similar to cow-shell. (default: false)
  61. - **statfs=base|full**: Controls how statfs works. 'base' means it
  62. will always use all branches in statfs calculations. 'full' is in
  63. effect path preserving and only includes branches where the path
  64. exists. (default: base)
  65. - **statfs_ignore=none|ro|nc**: 'ro' will cause statfs calculations to
  66. ignore available space for branches mounted or tagged as 'read-only'
  67. or 'no create'. 'nc' will ignore available space for branches tagged
  68. as 'no create'. (default: none)
  69. - **nfsopenhack=off|git|all**: A workaround for exporting mergerfs
  70. over NFS where there are issues with creating files for write while
  71. setting the mode to read-only. (default: off)
  72. - **branches-mount-timeout=UINT**: Number of seconds to wait at
  73. startup for branches to be a mount other than the mountpoint's
  74. filesystem. (default: 0)
  75. - **follow-symlinks=never|directory|regular|all**: Turns symlinks into
  76. what they point to. (default: never)
  77. - **link-exdev=passthrough|rel-symlink|abs-base-symlink|abs-pool-symlink**:
  78. When a link fails with EXDEV optionally create a symlink to the file
  79. instead.
  80. - **rename-exdev=passthrough|rel-symlink|abs-symlink**: When a rename
  81. fails with EXDEV optionally move the file to a special directory and
  82. symlink to it.
  83. - **readahead=UINT**: Set readahead (in kilobytes) for mergerfs and
  84. branches if greater than 0. (default: 0)
  85. - **posix_acl=BOOL**: Enable POSIX ACL support (if supported by kernel
  86. and underlying filesystem). (default: false)
  87. - **async_read=BOOL**: Perform reads asynchronously. If disabled or
  88. unavailable the kernel will ensure there is at most one pending read
  89. request per file handle and will attempt to order requests by
  90. offset. (default: true)
  91. - **fuse_msg_size=UINT**: Set the max number of pages per FUSE
  92. message. Only available on Linux >= 4.20 and ignored
  93. otherwise. (min: 1; max: 256; default: 256)
  94. - **threads=INT**: Number of threads to use. When used alone
  95. (`process-thread-count=-1`) it sets the number of threads reading
  96. and processing FUSE messages. When used together it sets the number
  97. of threads reading from FUSE. When set to zero it will attempt to
  98. discover and use the number of logical cores. If the thread count is
  99. set negative it will look up the number of cores then divide by the
  100. absolute value. ie. threads=-2 on an 8 core machine will result in 8
  101. / 2 = 4 threads. There will always be at least 1 thread. If set to
  102. -1 in combination with `process-thread-count` then it will try to
  103. pick reasonable values based on CPU thread count. NOTE: higher
  104. number of threads increases parallelism but usually decreases
  105. throughput. (default: 0)
  106. - **read-thread-count=INT**: Alias for `threads`.
  107. - **process-thread-count=INT**: Enables separate thread pool to
  108. asynchronously process FUSE requests. In this mode
  109. `read-thread-count` refers to the number of threads reading FUSE
  110. messages which are dispatched to process threads. -1 means disabled
  111. otherwise acts like `read-thread-count`. (default: -1)
  112. - **process-thread-queue-depth=UINT**: Sets the number of requests any
  113. single process thread can have queued up at one time. Meaning the
  114. total memory usage of the queues is queue depth multiplied by the
  115. number of process threads plus read thread count. 0 sets the depth
  116. to the same as the process thread count. (default: 0)
  117. - **pin-threads=STR**: Selects a strategy to pin threads to CPUs
  118. (default: unset)
  119. - **flush-on-close=never|always|opened-for-write**: Flush data cache
  120. on file close. Mostly for when writeback is enabled or merging
  121. network filesystems. (default: opened-for-write)
  122. - **scheduling-priority=INT**: Set mergerfs' scheduling
  123. priority. Valid values range from -20 to 19. See `setpriority` man
  124. page for more details. (default: -10)
  125. - **fsname=STR**: Sets the name of the filesystem as seen in
  126. **mount**, **df**, etc. Defaults to a list of the source paths
  127. concatenated together with the longest common prefix removed.
  128. - **func.FUNC=POLICY**: Sets the specific FUSE function's policy. See
  129. below for the list of value types. Example: **func.getattr=newest**
  130. - **func.readdir=seq|cosr|cor|cosr:INT|cor:INT**: Sets `readdir`
  131. policy. INT value sets the number of threads to use for
  132. concurrency. (default: seq)
  133. - **category.action=POLICY**: Sets policy of all FUSE functions in the
  134. action category. (default: epall)
  135. - **category.create=POLICY**: Sets policy of all FUSE functions in the
  136. create category. (default: epmfs)
  137. - **category.search=POLICY**: Sets policy of all FUSE functions in the
  138. search category. (default: ff)
  139. - **cache.open=UINT**: 'open' policy cache timeout in
  140. seconds. (default: 0)
  141. - **cache.statfs=UINT**: 'statfs' cache timeout in seconds. (default: 0)
  142. - **cache.attr=UINT**: File attribute cache timeout in
  143. seconds. (default: 1)
  144. - **cache.entry=UINT**: File name lookup cache timeout in
  145. seconds. (default: 1)
  146. - **cache.negative_entry=UINT**: Negative file name lookup cache
  147. timeout in seconds. (default: 0)
  148. - **cache.files=libfuse|off|partial|full|auto-full|per-process**: File
  149. page caching mode (default: libfuse)
  150. - **cache.files.process-names=LIST**: A pipe | delimited list of
  151. process [comm](https://man7.org/linux/man-pages/man5/proc.5.html)
  152. names to enable page caching for when
  153. `cache.files=per-process`. (default: "rtorrent|qbittorrent-nox")
  154. - **cache.writeback=BOOL**: Enable kernel writeback caching (default:
  155. false)
  156. - **cache.symlinks=BOOL**: Cache symlinks (if supported by kernel)
  157. (default: false)
  158. - **cache.readdir=BOOL**: Cache readdir (if supported by kernel)
  159. (default: false)
  160. - **parallel-direct-writes=BOOL**: Allow the kernel to dispatch
  161. multiple, parallel (non-extending) write requests for files opened
  162. with `cache.files=per-process` (if the process is not in `process-names`)
  163. or `cache.files=off`. (This requires kernel support, and was added in v6.2)
  164. - **direct_io**: deprecated - Bypass page cache. Use `cache.files=off`
  165. instead. (default: false)
  166. - **kernel_cache**: deprecated - Do not invalidate data cache on file
  167. open. Use `cache.files=full` instead. (default: false)
  168. - **auto_cache**: deprecated - Invalidate data cache if file mtime or
  169. size change. Use `cache.files=auto-full` instead. (default: false)
  170. - **async_read**: deprecated - Perform reads asynchronously. Use
  171. `async_read=true` instead.
  172. - **sync_read**: deprecated - Perform reads synchronously. Use
  173. `async_read=false` instead.
  174. - **splice_read**: deprecated - Does nothing.
  175. - **splice_write**: deprecated - Does nothing.
  176. - **splice_move**: deprecated - Does nothing.
  177. - **allow_other**: deprecated - mergerfs v2.35.0 and newer sets this FUSE option
  178. automatically if running as root.
  179. - **use_ino**: deprecated - mergerfs should always control inode
  180. calculation so this is enabled all the time.
  181. **NOTE:** Options are evaluated in the order listed so if the options
  182. are **func.rmdir=rand,category.action=ff** the **action** category
  183. setting will override the **rmdir** setting.
  184. **NOTE:** Always look at the documentation for the version of mergerfs
  185. you're using. Not all features are available in older releases. Use
  186. `man mergerfs` or find the docs as linked in the release.
  187. #### Value Types
  188. - BOOL = 'true' | 'false'
  189. - INT = [MIN_INT,MAX_INT]
  190. - UINT = [0,MAX_INT]
  191. - SIZE = 'NNM'; NN = INT, M = 'K' | 'M' | 'G' | 'T'
  192. - STR = string (may refer to an enumerated value, see details of
  193. argument)
  194. - FUNC = filesystem function
  195. - CATEGORY = function category
  196. - POLICY = mergerfs function policy
  197. ### branches
  198. The 'branches' argument is a colon (':') delimited list of paths to be
  199. pooled together. It does not matter if the paths are on the same or
  200. different filesystems nor does it matter the filesystem type (within
  201. reason). Used and available space will not be duplicated for paths on
  202. the same filesystem and any features which aren't supported by the
  203. underlying filesystem (such as file attributes or extended attributes)
  204. will return the appropriate errors.
  205. Branches currently have two options which can be set. A type which
  206. impacts whether or not the branch is included in a policy calculation
  207. and a individual minfreespace value. The values are set by prepending
  208. an `=` at the end of a branch designation and using commas as
  209. delimiters. Example: `/mnt/drive=RW,1234`
  210. #### branch mode
  211. - RW: (read/write) - Default behavior. Will be eligible in all policy
  212. categories.
  213. - RO: (read-only) - Will be excluded from `create` and `action`
  214. policies. Same as a read-only mounted filesystem would be (though
  215. faster to process).
  216. - NC: (no-create) - Will be excluded from `create` policies. You can't
  217. create on that branch but you can change or delete.
  218. #### minfreespace
  219. Same purpose and syntax as the global option but specific to the
  220. branch. If not set the global value is used.
  221. #### globbing
  222. To make it easier to include multiple branches mergerfs supports
  223. [globbing](http://linux.die.net/man/7/glob). **The globbing tokens
  224. MUST be escaped when using via the shell else the shell itself will
  225. apply the glob itself.**
  226. ```
  227. ```