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.

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