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.

184 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. (default: false)
  52. - **ignorepponrename=BOOL**: Ignore path preserving on
  53. rename. Typically rename and link act differently depending on the
  54. policy of `create` (read below). Enabling this will cause rename and
  55. link to always use the non-path preserving behavior. This means
  56. files, when renamed or linked, will stay on the same
  57. filesystem. (default: false)
  58. - **export-support=BOOL**: Sets a low-level FUSE feature intended to
  59. indicate the filesystem can support being exported via
  60. NFS. (default: true)
  61. - **security_capability=BOOL**: If false return ENOATTR when xattr
  62. security.capability is queried. (default: true)
  63. - **xattr=passthrough|noattr|nosys**: Runtime control of
  64. xattrs. Default is to passthrough xattr requests. 'noattr' will
  65. short circuit as if nothing exists. 'nosys' will respond with ENOSYS
  66. as if xattrs are not supported or disabled. (default: passthrough)
  67. - **link_cow=BOOL**: When enabled if a regular file is opened which
  68. has a link count > 1 it will copy the file to a temporary file and
  69. rename over the original. Breaking the link and providing a basic
  70. copy-on-write function similar to cow-shell. (default: false)
  71. - **statfs=base|full**: Controls how statfs works. 'base' means it
  72. will always use all branches in statfs calculations. 'full' is in
  73. effect path preserving and only includes branches where the path
  74. exists. (default: base)
  75. - **statfs_ignore=none|ro|nc**: 'ro' will cause statfs calculations to
  76. ignore available space for branches mounted or tagged as 'read-only'
  77. or 'no create'. 'nc' will ignore available space for branches tagged
  78. as 'no create'. (default: none)
  79. - **nfsopenhack=off|git|all**: A workaround for exporting mergerfs
  80. over NFS where there are issues with creating files for write while
  81. setting the mode to read-only. (default: off)
  82. - **branches-mount-timeout=UINT**: Number of seconds to wait at
  83. startup for branches to be a mount other than the mountpoint's
  84. filesystem. (default: 0)
  85. - **follow-symlinks=never|directory|regular|all**: Turns symlinks into
  86. what they point to. (default: never)
  87. - **link-exdev=passthrough|rel-symlink|abs-base-symlink|abs-pool-symlink**:
  88. When a link fails with EXDEV optionally create a symlink to the file
  89. instead.
  90. - **rename-exdev=passthrough|rel-symlink|abs-symlink**: When a rename
  91. fails with EXDEV optionally move the file to a special directory and
  92. symlink to it.
  93. - **readahead=UINT**: Set readahead (in kilobytes) for mergerfs and
  94. branches if greater than 0. (default: 0)
  95. - **posix_acl=BOOL**: Enable POSIX ACL support (if supported by kernel
  96. and underlying filesystem). (default: false)
  97. - **async_read=BOOL**: Perform reads asynchronously. If disabled or
  98. unavailable the kernel will ensure there is at most one pending read
  99. request per file handle and will attempt to order requests by
  100. offset. (default: true)
  101. - **fuse_msg_size=UINT**: Set the max number of pages per FUSE
  102. message. Only available on Linux >= 4.20 and ignored
  103. otherwise. (min: 1; max: 256; default: 256)
  104. - **threads=INT**: Number of threads to use. When used alone
  105. (`process-thread-count=-1`) it sets the number of threads reading
  106. and processing FUSE messages. When used together it sets the number
  107. of threads reading from FUSE. When set to zero it will attempt to
  108. discover and use the number of logical cores. If the thread count is
  109. set negative it will look up the number of cores then divide by the
  110. absolute value. ie. threads=-2 on an 8 core machine will result in 8
  111. / 2 = 4 threads. There will always be at least 1 thread. If set to
  112. -1 in combination with `process-thread-count` then it will try to
  113. pick reasonable values based on CPU thread count. NOTE: higher
  114. number of threads increases parallelism but usually decreases
  115. throughput. (default: 0)
  116. - **read-thread-count=INT**: Alias for `threads`.
  117. - **process-thread-count=INT**: Enables separate thread pool to
  118. asynchronously process FUSE requests. In this mode
  119. `read-thread-count` refers to the number of threads reading FUSE
  120. messages which are dispatched to process threads. -1 means disabled
  121. otherwise acts like `read-thread-count`. (default: -1)
  122. - **process-thread-queue-depth=UINT**: Sets the number of requests any
  123. single process thread can have queued up at one time. Meaning the
  124. total memory usage of the queues is queue depth multiplied by the
  125. number of process threads plus read thread count. 0 sets the depth
  126. to the same as the process thread count. (default: 0)
  127. - **pin-threads=STR**: Selects a strategy to pin threads to CPUs
  128. (default: unset)
  129. - **flush-on-close=never|always|opened-for-write**: Flush data cache
  130. on file close. Mostly for when writeback is enabled or merging
  131. network filesystems. (default: opened-for-write)
  132. - **scheduling-priority=INT**: Set mergerfs' scheduling
  133. priority. Valid values range from -20 to 19. See `setpriority` man
  134. page for more details. (default: -10)
  135. - **fsname=STR**: Sets the name of the filesystem as seen in
  136. **mount**, **df**, etc. Defaults to a list of the source paths
  137. concatenated together with the longest common prefix removed.
  138. - **func.FUNC=POLICY**: Sets the specific FUSE function's policy. See
  139. below for the list of value types. Example: **func.getattr=newest**
  140. - **func.readdir=seq|cosr|cor|cosr:INT|cor:INT**: Sets `readdir`
  141. policy. INT value sets the number of threads to use for
  142. concurrency. (default: seq)
  143. - **category.action=POLICY**: Sets policy of all FUSE functions in the
  144. action category. (default: epall)
  145. - **category.create=POLICY**: Sets policy of all FUSE functions in the
  146. create category. (default: epmfs)
  147. - **category.search=POLICY**: Sets policy of all FUSE functions in the
  148. search category. (default: ff)
  149. - **cache.statfs=UINT**: 'statfs' cache timeout in seconds. (default: 0)
  150. - **cache.attr=UINT**: File attribute cache timeout in
  151. seconds. (default: 1)
  152. - **cache.entry=UINT**: File name lookup cache timeout in
  153. seconds. (default: 1)
  154. - **cache.negative_entry=UINT**: Negative file name lookup cache
  155. timeout in seconds. (default: 0)
  156. - **cache.files=libfuse|off|partial|full|auto-full|per-process**: File
  157. page caching mode (default: libfuse)
  158. - **cache.files.process-names=LIST**: A pipe | delimited list of
  159. process [comm](https://man7.org/linux/man-pages/man5/proc.5.html)
  160. names to enable page caching for when
  161. `cache.files=per-process`. (default: "rtorrent|qbittorrent-nox")
  162. - **cache.writeback=BOOL**: Enable kernel writeback caching (default:
  163. false)
  164. - **cache.symlinks=BOOL**: Cache symlinks (if supported by kernel)
  165. (default: false)
  166. - **cache.readdir=BOOL**: Cache readdir (if supported by kernel)
  167. (default: false)
  168. - **parallel-direct-writes=BOOL**: Allow the kernel to dispatch
  169. multiple, parallel (non-extending) write requests for files opened
  170. with `cache.files=per-process` (if the process is not in `process-names`)
  171. or `cache.files=off`. (This requires kernel support, and was added in v6.2)
  172. **NOTE:** Options are evaluated in the order listed so if the options
  173. are **func.rmdir=rand,category.action=ff** the **action** category
  174. setting will override the **rmdir** setting.
  175. **NOTE:** Always look at the documentation for the version of mergerfs
  176. you're using. Not all features are available in older releases.