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.

1465 lines
54 KiB

9 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
8 years ago
9 years ago
9 years ago
  1. .\"t
  2. .\" Automatically generated by Pandoc 1.16.0.2
  3. .\"
  4. .TH "mergerfs" "1" "2017\-05\-26" "mergerfs user manual" ""
  5. .hy
  6. .SH NAME
  7. .PP
  8. mergerfs \- a featureful union filesystem
  9. .SH SYNOPSIS
  10. .PP
  11. mergerfs \-o<options> <srcmounts> <mountpoint>
  12. .SH DESCRIPTION
  13. .PP
  14. \f[B]mergerfs\f[] is a union filesystem geared towards simplifying
  15. storage and management of files across numerous commodity storage
  16. devices.
  17. It is similar to \f[B]mhddfs\f[], \f[B]unionfs\f[], and \f[B]aufs\f[].
  18. .SH FEATURES
  19. .IP \[bu] 2
  20. Runs in userspace (FUSE)
  21. .IP \[bu] 2
  22. Configurable behaviors
  23. .IP \[bu] 2
  24. Support for extended attributes (xattrs)
  25. .IP \[bu] 2
  26. Support for file attributes (chattr)
  27. .IP \[bu] 2
  28. Runtime configurable (via xattrs)
  29. .IP \[bu] 2
  30. Safe to run as root
  31. .IP \[bu] 2
  32. Opportunistic credential caching
  33. .IP \[bu] 2
  34. Works with heterogeneous filesystem types
  35. .IP \[bu] 2
  36. Handling of writes to full drives (transparently move file to drive with
  37. capacity)
  38. .IP \[bu] 2
  39. Handles pool of readonly and read/write drives
  40. .IP \[bu] 2
  41. Turn read\-only files into symlinks to increase read performance
  42. .SH How it works
  43. .PP
  44. mergerfs logically merges multiple paths together.
  45. Think a union of sets.
  46. The file/s or directory/s acted on or presented through mergerfs are
  47. based on the policy chosen for that particular action.
  48. Read more about policies below.
  49. .IP
  50. .nf
  51. \f[C]
  52. A\ \ \ \ \ \ \ \ \ +\ \ \ \ \ \ B\ \ \ \ \ \ \ \ =\ \ \ \ \ \ \ C
  53. /disk1\ \ \ \ \ \ \ \ \ \ \ /disk2\ \ \ \ \ \ \ \ \ \ \ /merged
  54. |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |
  55. +\-\-\ /dir1\ \ \ \ \ \ \ \ +\-\-\ /dir1\ \ \ \ \ \ \ \ +\-\-\ /dir1
  56. |\ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ |
  57. |\ \ \ +\-\-\ file1\ \ \ \ |\ \ \ +\-\-\ file2\ \ \ \ |\ \ \ +\-\-\ file1
  58. |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ +\-\-\ file3\ \ \ \ |\ \ \ +\-\-\ file2
  59. +\-\-\ /dir2\ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ +\-\-\ file3
  60. |\ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ +\-\-\ /dir3\ \ \ \ \ \ \ \ |
  61. |\ \ \ +\-\-\ file4\ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ +\-\-\ /dir2
  62. |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\-\-\ file5\ \ \ |\ \ \ |
  63. +\-\-\ file6\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ +\-\-\ file4
  64. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |
  65. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\-\-\ /dir3
  66. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ |
  67. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ +\-\-\ file5
  68. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |
  69. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ +\-\-\ file6
  70. \f[]
  71. .fi
  72. .PP
  73. mergerfs does \f[B]not\f[] support the copy\-on\-write (CoW) behavior
  74. found in \f[B]aufs\f[] and \f[B]overlayfs\f[].
  75. You can \f[B]not\f[] mount a read\-only filesystem and write to it.
  76. However, mergerfs will ignore read\-only drives when creating new files
  77. so you can mix rw and ro drives.
  78. .SH OPTIONS
  79. .SS mount options
  80. .IP \[bu] 2
  81. \f[B]defaults\f[]: a shortcut for FUSE\[aq]s \f[B]atomic_o_trunc\f[],
  82. \f[B]auto_cache\f[], \f[B]big_writes\f[], \f[B]default_permissions\f[],
  83. \f[B]splice_move\f[], \f[B]splice_read\f[], and \f[B]splice_write\f[].
  84. These options seem to provide the best performance.
  85. .IP \[bu] 2
  86. \f[B]direct_io\f[]: causes FUSE to bypass caching which can increase
  87. write speeds at the detriment of reads.
  88. Note that not enabling \f[C]direct_io\f[] will cause double caching of
  89. files and therefore less memory for caching generally.
  90. However, \f[C]mmap\f[] does not work when \f[C]direct_io\f[] is enabled.
  91. .IP \[bu] 2
  92. \f[B]minfreespace=value\f[]: the minimum space value used for creation
  93. policies.
  94. Understands \[aq]K\[aq], \[aq]M\[aq], and \[aq]G\[aq] to represent
  95. kilobyte, megabyte, and gigabyte respectively.
  96. (default: 4G)
  97. .IP \[bu] 2
  98. \f[B]moveonenospc=true|false\f[]: when enabled (set to \f[B]true\f[]) if
  99. a \f[B]write\f[] fails with \f[B]ENOSPC\f[] or \f[B]EDQUOT\f[] a scan of
  100. all drives will be done looking for the drive with most free space which
  101. is at least the size of the file plus the amount which failed to write.
  102. An attempt to move the file to that drive will occur (keeping all
  103. metadata possible) and if successful the original is unlinked and the
  104. write retried.
  105. (default: false)
  106. .IP \[bu] 2
  107. \f[B]use_ino\f[]: causes mergerfs to supply file/directory inodes rather
  108. than libfuse.
  109. While not a default it is generally recommended it be enabled so that
  110. hard linked files share the same inode value.
  111. .IP \[bu] 2
  112. \f[B]dropcacheonclose=true|false\f[]: when a file is requested to be
  113. closed call \f[C]posix_fadvise\f[] on it first to instruct the kernel
  114. that we no longer need the data and it can drop its cache.
  115. Recommended when \f[B]direct_io\f[] is not enabled to limit double
  116. caching.
  117. (default: false)
  118. .IP \[bu] 2
  119. \f[B]symlinkify=true|false\f[]: when enabled (set to \f[B]true\f[]) and
  120. a file is not writable and its mtime or ctime is older than
  121. \f[B]symlinkify_timeout\f[] files will be reported as symlinks to the
  122. original files.
  123. Please read more below before using.
  124. (default: false)
  125. .IP \[bu] 2
  126. \f[B]symlinkify_timeout=value\f[]: time to wait, in seconds, to activate
  127. the \f[B]symlinkify\f[] behavior.
  128. (default: 3600)
  129. .IP \[bu] 2
  130. \f[B]nullrw=true|false\f[]: turns reads and writes into no\-ops.
  131. The request will succeed but do nothing.
  132. Useful for benchmarking mergerfs.
  133. (default: false)
  134. .IP \[bu] 2
  135. \f[B]ignorepponrename=true|false\f[]: ignore path preserving on rename.
  136. Typically rename and link act differently depending on the policy of
  137. \f[C]create\f[] (read below).
  138. Enabling this will cause rename and link to always use the non\-path
  139. preserving behavior.
  140. This means files, when renamed or linked, will stay on the same drive.
  141. (default: false)
  142. .IP \[bu] 2
  143. \f[B]threads=num\f[]: number of threads to use in multithreaded mode.
  144. When set to zero (the default) it will attempt to discover and use the
  145. number of logical cores.
  146. If the lookup fails it will fall back to using 4.
  147. If the thread count is set negative it will look up the number of cores
  148. then divide by the absolute value.
  149. ie.
  150. threads=\-2 on an 8 core machine will result in 8 / 2 = 4 threads.
  151. There will always be at least 1 thread.
  152. NOTE: higher number of threads increases parallelism but usually
  153. decreases throughput.
  154. (default: number of cores)
  155. .IP \[bu] 2
  156. \f[B]fsname=name\f[]: sets the name of the filesystem as seen in
  157. \f[B]mount\f[], \f[B]df\f[], etc.
  158. Defaults to a list of the source paths concatenated together with the
  159. longest common prefix removed.
  160. .IP \[bu] 2
  161. \f[B]func.<func>=<policy>\f[]: sets the specific FUSE function\[aq]s
  162. policy.
  163. See below for the list of value types.
  164. Example: \f[B]func.getattr=newest\f[]
  165. .IP \[bu] 2
  166. \f[B]category.<category>=<policy>\f[]: Sets policy of all FUSE functions
  167. in the provided category.
  168. Example: \f[B]category.create=mfs\f[]
  169. .PP
  170. \f[B]NOTE:\f[] Options are evaluated in the order listed so if the
  171. options are \f[B]func.rmdir=rand,category.action=ff\f[] the
  172. \f[B]action\f[] category setting will override the \f[B]rmdir\f[]
  173. setting.
  174. .SS srcmounts
  175. .PP
  176. The srcmounts (source mounts) argument is a colon (\[aq]:\[aq])
  177. delimited list of paths to be included in the pool.
  178. It does not matter if the paths are on the same or different drives nor
  179. does it matter the filesystem.
  180. Used and available space will not be duplicated for paths on the same
  181. device and any features which aren\[aq]t supported by the underlying
  182. filesystem (such as file attributes or extended attributes) will return
  183. the appropriate errors.
  184. .PP
  185. To make it easier to include multiple source mounts mergerfs supports
  186. globbing (http://linux.die.net/man/7/glob).
  187. \f[B]The globbing tokens MUST be escaped when using via the shell else
  188. the shell itself will expand it.\f[]
  189. .IP
  190. .nf
  191. \f[C]
  192. $\ mergerfs\ \-o\ defaults,allow_other,use_ino\ /mnt/disk\\*:/mnt/cdrom\ /media/drives
  193. \f[]
  194. .fi
  195. .PP
  196. The above line will use all mount points in /mnt prefixed with
  197. \f[B]disk\f[] and the \f[B]cdrom\f[].
  198. .PP
  199. To have the pool mounted at boot or otherwise accessable from related
  200. tools use \f[B]/etc/fstab\f[].
  201. .IP
  202. .nf
  203. \f[C]
  204. #\ <file\ system>\ \ \ \ \ \ \ \ <mount\ point>\ \ <type>\ \ \ \ \ \ \ \ \ <options>\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <dump>\ \ <pass>
  205. /mnt/disk*:/mnt/cdrom\ \ /media/drives\ \ fuse.mergerfs\ \ defaults,allow_other,use_ino\ \ 0\ \ \ \ \ \ \ 0
  206. \f[]
  207. .fi
  208. .PP
  209. \f[B]NOTE:\f[] the globbing is done at mount or xattr update time (see
  210. below).
  211. If a new directory is added matching the glob after the fact it will not
  212. be automatically included.
  213. .PP
  214. \f[B]NOTE:\f[] for mounting via \f[B]fstab\f[] to work you must have
  215. \f[B]mount.fuse\f[] installed.
  216. For Ubuntu/Debian it is included in the \f[B]fuse\f[] package.
  217. .SS symlinkify
  218. .PP
  219. Due to the levels of indirection introduced by mergerfs and the
  220. underlying technology FUSE there can be varying levels of performance
  221. degredation.
  222. This feature will turn non\-directories which are not writable into
  223. symlinks to the original file found by the \f[C]readlink\f[] policy
  224. after the mtime and ctime are older than the timeout.
  225. .PP
  226. \f[B]WARNING:\f[] The current implementation has a known issue in which
  227. if the file is open and being used when the file is converted to a
  228. symlink then the application which has that file open will receive an
  229. error when using it.
  230. This is unlikely to occur in practice but is something to keep in mind.
  231. .PP
  232. \f[B]WARNING:\f[] Some backup solutions, such as CrashPlan, do not
  233. backup the target of a symlink.
  234. If using this feature it will be necessary to point any backup software
  235. to the original drives or configure the software to follow symlinks if
  236. such an option is available.
  237. Alternatively create two mounts.
  238. One for backup and one for general consumption.
  239. .SS nullrw
  240. .PP
  241. Due to how FUSE works there is an overhead to all requests made to a
  242. FUSE filesystem.
  243. Meaning that even a simple passthrough will have some slowdown.
  244. However, generally the overhead is minimal in comparison to the cost of
  245. the underlying I/O.
  246. By disabling the underlying I/O we can test the theoretical performance
  247. boundries.
  248. .PP
  249. By enabling \f[C]nullrw\f[] mergerfs will work as it always does
  250. \f[B]except\f[] that all reads and writes will be no\-ops.
  251. A write will succeed (the size of the write will be returned as if it
  252. were successful) but mergerfs does nothing with the data it was given.
  253. Similarly a read will return the size requested but won\[aq]t touch the
  254. buffer.
  255. .PP
  256. Example:
  257. .IP
  258. .nf
  259. \f[C]
  260. $\ dd\ if=/dev/zero\ of=/path/to/mergerfs/mount/benchmark\ ibs=1M\ obs=512\ count=1024
  261. 1024+0\ records\ in
  262. 2097152+0\ records\ out
  263. 1073741824\ bytes\ (1.1\ GB,\ 1.0\ GiB)\ copied,\ 15.4067\ s,\ 69.7\ MB/s
  264. $\ dd\ if=/dev/zero\ of=/path/to/mergerfs/mount/benchmark\ ibs=1M\ obs=1M\ count=1024
  265. 1024+0\ records\ in
  266. 1024+0\ records\ out
  267. 1073741824\ bytes\ (1.1\ GB,\ 1.0\ GiB)\ copied,\ 0.219585\ s,\ 4.9\ GB/s
  268. $\ dd\ if=/path/to/mergerfs/mount/benchmark\ of=/dev/null\ bs=512\ count=102400
  269. 102400+0\ records\ in
  270. 102400+0\ records\ out
  271. 52428800\ bytes\ (52\ MB,\ 50\ MiB)\ copied,\ 0.757991\ s,\ 69.2\ MB/s
  272. $\ dd\ if=/path/to/mergerfs/mount/benchmark\ of=/dev/null\ bs=1M\ count=1024
  273. 1024+0\ records\ in
  274. 1024+0\ records\ out
  275. 1073741824\ bytes\ (1.1\ GB,\ 1.0\ GiB)\ copied,\ 0.18405\ s,\ 5.8\ GB/s
  276. \f[]
  277. .fi
  278. .PP
  279. It\[aq]s important to test with different \f[C]obs\f[] (output block
  280. size) values since the relative overhead is greater with smaller values.
  281. As you can see above the size of a read or write can massively impact
  282. theoretical performance.
  283. If an application performs much worse through mergerfs it could very
  284. well be that it doesn\[aq]t optimally size its read and write requests.
  285. .SH FUNCTIONS / POLICIES / CATEGORIES
  286. .PP
  287. The POSIX filesystem API has a number of functions.
  288. \f[B]creat\f[], \f[B]stat\f[], \f[B]chown\f[], etc.
  289. In mergerfs these functions are grouped into 3 categories:
  290. \f[B]action\f[], \f[B]create\f[], and \f[B]search\f[].
  291. Functions and categories can be assigned a policy which dictates how
  292. \f[B]mergerfs\f[] behaves.
  293. Any policy can be assigned to a function or category though some may not
  294. be very useful in practice.
  295. For instance: \f[B]rand\f[] (random) may be useful for file creation
  296. (create) but could lead to very odd behavior if used for \f[C]chmod\f[]
  297. (though only if there were more than one copy of the file).
  298. .PP
  299. Policies, when called to create, will ignore drives which are readonly.
  300. This allows for readonly and read/write drives to be mixed together.
  301. Note that the drive must be explicitly mounted with the \f[B]ro\f[]
  302. mount option for this to work.
  303. .SS Function / Category classifications
  304. .PP
  305. .TS
  306. tab(@);
  307. lw(7.9n) lw(62.1n).
  308. T{
  309. Category
  310. T}@T{
  311. FUSE Functions
  312. T}
  313. _
  314. T{
  315. action
  316. T}@T{
  317. chmod, chown, link, removexattr, rename, rmdir, setxattr, truncate,
  318. unlink, utimens
  319. T}
  320. T{
  321. create
  322. T}@T{
  323. create, mkdir, mknod, symlink
  324. T}
  325. T{
  326. search
  327. T}@T{
  328. access, getattr, getxattr, ioctl, listxattr, open, readlink
  329. T}
  330. T{
  331. N/A
  332. T}@T{
  333. fallocate, fgetattr, fsync, ftruncate, ioctl, read, readdir, release,
  334. statfs, write
  335. T}
  336. .TE
  337. .PP
  338. Due to FUSE limitations \f[B]ioctl\f[] behaves differently if its acting
  339. on a directory.
  340. It\[aq]ll use the \f[B]getattr\f[] policy to find and open the directory
  341. before issuing the \f[B]ioctl\f[].
  342. In other cases where something may be searched (to confirm a directory
  343. exists across all source mounts) \f[B]getattr\f[] will also be used.
  344. .SS Path Preservation
  345. .PP
  346. Policies, as described below, are of two core types.
  347. \f[C]path\ preserving\f[] and \f[C]non\-path\ preserving\f[].
  348. .PP
  349. All policies which start with \f[C]ep\f[] (\f[B]epff\f[],
  350. \f[B]eplfs\f[], \f[B]eplus\f[], \f[B]epmfs\f[], \f[B]eprand\f[]) are
  351. \f[C]path\ preserving\f[].
  352. \f[C]ep\f[] stands for \f[C]existing\ path\f[].
  353. .PP
  354. As the descriptions explain a path preserving policy will only consider
  355. drives where the relative path being accessed already exists.
  356. .PP
  357. When using non\-path preserving policies where something is created
  358. paths will be copied to target drives as necessary.
  359. .SS Policy descriptions
  360. .PP
  361. .TS
  362. tab(@);
  363. lw(16.6n) lw(53.4n).
  364. T{
  365. Policy
  366. T}@T{
  367. Description
  368. T}
  369. _
  370. T{
  371. all
  372. T}@T{
  373. Search category: acts like \f[B]ff\f[].
  374. Action category: apply to all found.
  375. Create category: for \f[B]mkdir\f[], \f[B]mknod\f[], and
  376. \f[B]symlink\f[] it will apply to all found.
  377. \f[B]create\f[] works like \f[B]ff\f[].
  378. It will exclude readonly drives and those with free space less than
  379. \f[B]minfreespace\f[].
  380. T}
  381. T{
  382. epall (existing path, all)
  383. T}@T{
  384. Search category: acts like \f[B]epff\f[].
  385. Action category: apply to all found.
  386. Create category: for \f[B]mkdir\f[], \f[B]mknod\f[], and
  387. \f[B]symlink\f[] it will apply to all existing paths found.
  388. \f[B]create\f[] works like \f[B]epff\f[].
  389. Excludes readonly drives and those with free space less than
  390. \f[B]minfreespace\f[].
  391. T}
  392. T{
  393. epff (existing path, first found)
  394. T}@T{
  395. Given the order of the drives, as defined at mount time or configured at
  396. runtime, act on the first one found where the relative path already
  397. exists.
  398. For \f[B]create\f[] category functions it will exclude readonly drives
  399. and those with free space less than \f[B]minfreespace\f[] (unless there
  400. is no other option).
  401. Falls back to \f[B]ff\f[].
  402. T}
  403. T{
  404. eplfs (existing path, least free space)
  405. T}@T{
  406. Of all the drives on which the relative path exists choose the drive
  407. with the least free space.
  408. For \f[B]create\f[] category functions it will exclude readonly drives
  409. and those with free space less than \f[B]minfreespace\f[].
  410. Falls back to \f[B]lfs\f[].
  411. T}
  412. T{
  413. eplus (existing path, least used space)
  414. T}@T{
  415. Of all the drives on which the relative path exists choose the drive
  416. with the least used space.
  417. For \f[B]create\f[] category functions it will exclude readonly drives
  418. and those with free space less than \f[B]minfreespace\f[].
  419. Falls back to \f[B]lus\f[].
  420. T}
  421. T{
  422. epmfs (existing path, most free space)
  423. T}@T{
  424. Of all the drives on which the relative path exists choose the drive
  425. with the most free space.
  426. For \f[B]create\f[] category functions it will exclude readonly drives
  427. and those with free space less than \f[B]minfreespace\f[].
  428. Falls back to \f[B]mfs\f[].
  429. T}
  430. T{
  431. eprand (existing path, random)
  432. T}@T{
  433. Calls \f[B]epall\f[] and then randomizes.
  434. Otherwise behaves the same as \f[B]epall\f[].
  435. T}
  436. T{
  437. erofs
  438. T}@T{
  439. Exclusively return \f[B]\-1\f[] with \f[B]errno\f[] set to
  440. \f[B]EROFS\f[] (Read\-only filesystem).
  441. By setting \f[B]create\f[] functions to this you can in effect turn the
  442. filesystem mostly readonly.
  443. T}
  444. T{
  445. ff (first found)
  446. T}@T{
  447. Given the order of the drives, as defined at mount time or configured at
  448. runtime, act on the first one found.
  449. For \f[B]create\f[] category functions it will exclude readonly drives
  450. and those with free space less than \f[B]minfreespace\f[] (unless there
  451. is no other option).
  452. T}
  453. T{
  454. lfs (least free space)
  455. T}@T{
  456. Pick the drive with the least available free space.
  457. For \f[B]create\f[] category functions it will exclude readonly drives
  458. and those with free space less than \f[B]minfreespace\f[].
  459. Falls back to \f[B]mfs\f[].
  460. T}
  461. T{
  462. lus (least used space)
  463. T}@T{
  464. Pick the drive with the least used space.
  465. For \f[B]create\f[] category functions it will exclude readonly drives
  466. and those with free space less than \f[B]minfreespace\f[].
  467. Falls back to \f[B]mfs\f[].
  468. T}
  469. T{
  470. mfs (most free space)
  471. T}@T{
  472. Pick the drive with the most available free space.
  473. For \f[B]create\f[] category functions it will exclude readonly drives.
  474. Falls back to \f[B]ff\f[].
  475. T}
  476. T{
  477. newest
  478. T}@T{
  479. Pick the file / directory with the largest mtime.
  480. For \f[B]create\f[] category functions it will exclude readonly drives
  481. and those with free space less than \f[B]minfreespace\f[] (unless there
  482. is no other option).
  483. T}
  484. T{
  485. rand (random)
  486. T}@T{
  487. Calls \f[B]all\f[] and then randomizes.
  488. T}
  489. .TE
  490. .SS Defaults
  491. .PP
  492. .TS
  493. tab(@);
  494. l l.
  495. T{
  496. Category
  497. T}@T{
  498. Policy
  499. T}
  500. _
  501. T{
  502. action
  503. T}@T{
  504. all
  505. T}
  506. T{
  507. create
  508. T}@T{
  509. epmfs
  510. T}
  511. T{
  512. search
  513. T}@T{
  514. ff
  515. T}
  516. .TE
  517. .SS rename & link
  518. .PP
  519. \f[B]NOTE:\f[] If you\[aq]re receiving errors from software when files
  520. are moved / renamed then you should consider changing the create policy
  521. to one which is \f[B]not\f[] path preserving, enabling
  522. \f[C]ignorepponrename\f[], or contacting the author of the offending
  523. software and requesting that \f[C]EXDEV\f[] be properly handled.
  524. .PP
  525. rename (http://man7.org/linux/man-pages/man2/rename.2.html) is a tricky
  526. function in a merged system.
  527. Under normal situations rename only works within a single filesystem or
  528. device.
  529. If a rename can\[aq]t be done atomically due to the source and
  530. destination paths existing on different mount points it will return
  531. \f[B]\-1\f[] with \f[B]errno = EXDEV\f[] (cross device).
  532. .PP
  533. Originally mergerfs would return EXDEV whenever a rename was requested
  534. which was cross directory in any way.
  535. This made the code simple and was technically complient with POSIX
  536. requirements.
  537. However, many applications fail to handle EXDEV at all and treat it as a
  538. normal error or otherwise handle it poorly.
  539. Such apps include: gvfsd\-fuse v1.20.3 and prior, Finder / CIFS/SMB
  540. client in Apple OSX 10.9+, NZBGet, Samba\[aq]s recycling bin feature.
  541. .PP
  542. As a result a compromise was made in order to get most software to work
  543. while still obeying mergerfs\[aq] policies.
  544. Below is the rather complicated logic.
  545. .IP \[bu] 2
  546. If using a \f[B]create\f[] policy which tries to preserve directory
  547. paths (epff,eplfs,eplus,epmfs)
  548. .IP \[bu] 2
  549. Using the \f[B]rename\f[] policy get the list of files to rename
  550. .IP \[bu] 2
  551. For each file attempt rename:
  552. .RS 2
  553. .IP \[bu] 2
  554. If failure with ENOENT run \f[B]create\f[] policy
  555. .IP \[bu] 2
  556. If create policy returns the same drive as currently evaluating then
  557. clone the path
  558. .IP \[bu] 2
  559. Re\-attempt rename
  560. .RE
  561. .IP \[bu] 2
  562. If \f[B]any\f[] of the renames succeed the higher level rename is
  563. considered a success
  564. .IP \[bu] 2
  565. If \f[B]no\f[] renames succeed the first error encountered will be
  566. returned
  567. .IP \[bu] 2
  568. On success:
  569. .RS 2
  570. .IP \[bu] 2
  571. Remove the target from all drives with no source file
  572. .IP \[bu] 2
  573. Remove the source from all drives which failed to rename
  574. .RE
  575. .IP \[bu] 2
  576. If using a \f[B]create\f[] policy which does \f[B]not\f[] try to
  577. preserve directory paths
  578. .IP \[bu] 2
  579. Using the \f[B]rename\f[] policy get the list of files to rename
  580. .IP \[bu] 2
  581. Using the \f[B]getattr\f[] policy get the target path
  582. .IP \[bu] 2
  583. For each file attempt rename:
  584. .RS 2
  585. .IP \[bu] 2
  586. If the source drive != target drive:
  587. .IP \[bu] 2
  588. Clone target path from target drive to source drive
  589. .IP \[bu] 2
  590. Rename
  591. .RE
  592. .IP \[bu] 2
  593. If \f[B]any\f[] of the renames succeed the higher level rename is
  594. considered a success
  595. .IP \[bu] 2
  596. If \f[B]no\f[] renames succeed the first error encountered will be
  597. returned
  598. .IP \[bu] 2
  599. On success:
  600. .RS 2
  601. .IP \[bu] 2
  602. Remove the target from all drives with no source file
  603. .IP \[bu] 2
  604. Remove the source from all drives which failed to rename
  605. .RE
  606. .PP
  607. The the removals are subject to normal entitlement checks.
  608. .PP
  609. The above behavior will help minimize the likelihood of EXDEV being
  610. returned but it will still be possible.
  611. .PP
  612. \f[B]link\f[] uses the same basic strategy.
  613. .SS readdir
  614. .PP
  615. readdir (http://linux.die.net/man/3/readdir) is different from all other
  616. filesystem functions.
  617. While it could have it\[aq]s own set of policies to tweak its behavior
  618. at this time it provides a simple union of files and directories found.
  619. Remember that any action or information queried about these files and
  620. directories come from the respective function.
  621. For instance: an \f[B]ls\f[] is a \f[B]readdir\f[] and for each
  622. file/directory returned \f[B]getattr\f[] is called.
  623. Meaning the policy of \f[B]getattr\f[] is responsible for choosing the
  624. file/directory which is the source of the metadata you see in an
  625. \f[B]ls\f[].
  626. .SS statvfs
  627. .PP
  628. statvfs (http://linux.die.net/man/2/statvfs) normalizes the source
  629. drives based on the fragment size and sums the number of adjusted blocks
  630. and inodes.
  631. This means you will see the combined space of all sources.
  632. Total, used, and free.
  633. The sources however are dedupped based on the drive so multiple sources
  634. on the same drive will not result in double counting it\[aq]s space.
  635. .SH BUILDING
  636. .PP
  637. \f[B]NOTE:\f[] Prebuilt packages can be found at:
  638. https://github.com/trapexit/mergerfs/releases
  639. .PP
  640. First get the code from github (http://github.com/trapexit/mergerfs).
  641. .IP
  642. .nf
  643. \f[C]
  644. $\ git\ clone\ https://github.com/trapexit/mergerfs.git
  645. $\ #\ or
  646. $\ wget\ https://github.com/trapexit/mergerfs/releases/download/<ver>/mergerfs\-<ver>.tar.gz
  647. \f[]
  648. .fi
  649. .SS Debian / Ubuntu
  650. .IP
  651. .nf
  652. \f[C]
  653. $\ sudo\ apt\-get\ \-y\ update
  654. $\ sudo\ apt\-get\ \-y\ install\ git\ make
  655. $\ cd\ mergerfs
  656. $\ make\ install\-build\-pkgs
  657. $\ #\ build\-essential\ git\ g++\ debhelper\ libattr1\-dev\ python\ automake\ libtool\ lsb\-release
  658. $\ make\ deb
  659. $\ sudo\ dpkg\ \-i\ ../mergerfs_version_arch.deb
  660. \f[]
  661. .fi
  662. .SS Fedora
  663. .IP
  664. .nf
  665. \f[C]
  666. $\ su\ \-
  667. #\ dnf\ \-y\ update
  668. #\ dnf\ \-y\ install\ git\ make
  669. #\ cd\ mergerfs
  670. #\ make\ install\-build\-pkgs
  671. #\ #\ rpm\-build\ libattr\-devel\ gcc\-c++\ which\ python\ automake\ libtool\ gettext\-devel
  672. #\ make\ rpm
  673. #\ rpm\ \-i\ rpmbuild/RPMS/<arch>/mergerfs\-<verion>.<arch>.rpm
  674. \f[]
  675. .fi
  676. .SS Generically
  677. .PP
  678. Have git, g++, make, python, libattr1, automake, libtool installed.
  679. .IP
  680. .nf
  681. \f[C]
  682. $\ cd\ mergerfs
  683. $\ make
  684. $\ sudo\ make\ install
  685. \f[]
  686. .fi
  687. .SH RUNTIME
  688. .SS \&.mergerfs pseudo file
  689. .IP
  690. .nf
  691. \f[C]
  692. <mountpoint>/.mergerfs
  693. \f[]
  694. .fi
  695. .PP
  696. There is a pseudo file available at the mount point which allows for the
  697. runtime modification of certain \f[B]mergerfs\f[] options.
  698. The file will not show up in \f[B]readdir\f[] but can be
  699. \f[B]stat\f[]\[aq]ed and manipulated via
  700. {list,get,set}xattrs (http://linux.die.net/man/2/listxattr) calls.
  701. .PP
  702. Even if xattrs are disabled for mergerfs the
  703. {list,get,set}xattrs (http://linux.die.net/man/2/listxattr) calls
  704. against this pseudo file will still work.
  705. .PP
  706. Any changes made at runtime are \f[B]not\f[] persisted.
  707. If you wish for values to persist they must be included as options
  708. wherever you configure the mounting of mergerfs (fstab).
  709. .SS Keys
  710. .PP
  711. Use \f[C]xattr\ \-l\ /mount/point/.mergerfs\f[] to see all supported
  712. keys.
  713. Some are informational and therefore readonly.
  714. .SS user.mergerfs.srcmounts
  715. .PP
  716. Used to query or modify the list of source mounts.
  717. When modifying there are several shortcuts to easy manipulation of the
  718. list.
  719. .PP
  720. .TS
  721. tab(@);
  722. l l.
  723. T{
  724. Value
  725. T}@T{
  726. Description
  727. T}
  728. _
  729. T{
  730. [list]
  731. T}@T{
  732. set
  733. T}
  734. T{
  735. +<[list]
  736. T}@T{
  737. prepend
  738. T}
  739. T{
  740. +>[list]
  741. T}@T{
  742. append
  743. T}
  744. T{
  745. \-[list]
  746. T}@T{
  747. remove all values provided
  748. T}
  749. T{
  750. \-<
  751. T}@T{
  752. remove first in list
  753. T}
  754. T{
  755. \->
  756. T}@T{
  757. remove last in list
  758. T}
  759. .TE
  760. .SS minfreespace
  761. .PP
  762. Input: interger with an optional multiplier suffix.
  763. \f[B]K\f[], \f[B]M\f[], or \f[B]G\f[].
  764. .PP
  765. Output: value in bytes
  766. .SS moveonenospc
  767. .PP
  768. Input: \f[B]true\f[] and \f[B]false\f[]
  769. .PP
  770. Ouput: \f[B]true\f[] or \f[B]false\f[]
  771. .SS categories / funcs
  772. .PP
  773. Input: short policy string as described elsewhere in this document
  774. .PP
  775. Output: the policy string except for categories where its funcs have
  776. multiple types.
  777. In that case it will be a comma separated list
  778. .SS Example
  779. .IP
  780. .nf
  781. \f[C]
  782. [trapexit:/tmp/mount]\ $\ xattr\ \-l\ .mergerfs
  783. user.mergerfs.srcmounts:\ /tmp/a:/tmp/b
  784. user.mergerfs.minfreespace:\ 4294967295
  785. user.mergerfs.moveonenospc:\ false
  786. \&...
  787. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.category.search\ .mergerfs
  788. ff
  789. [trapexit:/tmp/mount]\ $\ xattr\ \-w\ user.mergerfs.category.search\ newest\ .mergerfs
  790. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.category.search\ .mergerfs
  791. newest
  792. [trapexit:/tmp/mount]\ $\ xattr\ \-w\ user.mergerfs.srcmounts\ +/tmp/c\ .mergerfs
  793. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.srcmounts\ .mergerfs
  794. /tmp/a:/tmp/b:/tmp/c
  795. [trapexit:/tmp/mount]\ $\ xattr\ \-w\ user.mergerfs.srcmounts\ =/tmp/c\ .mergerfs
  796. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.srcmounts\ .mergerfs
  797. /tmp/c
  798. [trapexit:/tmp/mount]\ $\ xattr\ \-w\ user.mergerfs.srcmounts\ \[aq]+</tmp/a:/tmp/b\[aq]\ .mergerfs
  799. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.srcmounts\ .mergerfs
  800. /tmp/a:/tmp/b:/tmp/c
  801. \f[]
  802. .fi
  803. .SS file / directory xattrs
  804. .PP
  805. While they won\[aq]t show up when using
  806. listxattr (http://linux.die.net/man/2/listxattr) \f[B]mergerfs\f[]
  807. offers a number of special xattrs to query information about the files
  808. served.
  809. To access the values you will need to issue a
  810. getxattr (http://linux.die.net/man/2/getxattr) for one of the following:
  811. .IP \[bu] 2
  812. \f[B]user.mergerfs.basepath:\f[] the base mount point for the file given
  813. the current getattr policy
  814. .IP \[bu] 2
  815. \f[B]user.mergerfs.relpath:\f[] the relative path of the file from the
  816. perspective of the mount point
  817. .IP \[bu] 2
  818. \f[B]user.mergerfs.fullpath:\f[] the full path of the original file
  819. given the getattr policy
  820. .IP \[bu] 2
  821. \f[B]user.mergerfs.allpaths:\f[] a NUL (\[aq]\[aq]) separated list of
  822. full paths to all files found
  823. .IP
  824. .nf
  825. \f[C]
  826. [trapexit:/tmp/mount]\ $\ ls
  827. A\ B\ C
  828. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.fullpath\ A
  829. /mnt/a/full/path/to/A
  830. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.basepath\ A
  831. /mnt/a
  832. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.relpath\ A
  833. /full/path/to/A
  834. [trapexit:/tmp/mount]\ $\ xattr\ \-p\ user.mergerfs.allpaths\ A\ |\ tr\ \[aq]\\0\[aq]\ \[aq]\\n\[aq]
  835. /mnt/a/full/path/to/A
  836. /mnt/b/full/path/to/A
  837. \f[]
  838. .fi
  839. .SH TOOLING
  840. .IP \[bu] 2
  841. https://github.com/trapexit/mergerfs\-tools
  842. .IP \[bu] 2
  843. mergerfs.ctl: A tool to make it easier to query and configure mergerfs
  844. at runtime
  845. .IP \[bu] 2
  846. mergerfs.fsck: Provides permissions and ownership auditing and the
  847. ability to fix them
  848. .IP \[bu] 2
  849. mergerfs.dedup: Will help identify and optionally remove duplicate files
  850. .IP \[bu] 2
  851. mergerfs.balance: Rebalance files across drives by moving them from the
  852. most filled to the least filled
  853. .IP \[bu] 2
  854. mergerfs.mktrash: Creates FreeDesktop.org Trash specification compatible
  855. directories on a mergerfs mount
  856. .IP \[bu] 2
  857. https://github.com/trapexit/scorch
  858. .IP \[bu] 2
  859. scorch: A tool to help discover silent corruption of files
  860. .IP \[bu] 2
  861. https://github.com/trapexit/bbf
  862. .IP \[bu] 2
  863. bbf (bad block finder): a tool to scan for and \[aq]fix\[aq] hard drive
  864. bad blocks and find the files using those blocks
  865. .SH CACHING
  866. .PP
  867. MergerFS does not natively support any sort of caching.
  868. Most users have no use for such a feature and it would greatly
  869. complicate the code.
  870. However, there are a few situations where a cache drive could help with
  871. a typical mergerfs setup.
  872. .IP "1." 3
  873. Fast network, slow drives, many readers: You\[aq]ve a 10+Gbps network
  874. with many readers and your regular drives can\[aq]t keep up.
  875. .IP "2." 3
  876. Fast network, slow drives, small\[aq]ish bursty writes: You have a
  877. 10+Gbps network and wish to transfer amounts of data less than your
  878. cache drive but wish to do so quickly.
  879. .PP
  880. The below will mostly address usecase #2.
  881. It will also work for #1 assuming the data is regularly accessed and was
  882. placed into the system via this method.
  883. Otherwise a similar script may need to be written to populate the cache
  884. from the backing pool.
  885. .IP "1." 3
  886. Create 2 mergerfs pools.
  887. One which includes just the backing drives and one which has both the
  888. cache drives (SSD,NVME,etc.) and backing drives.
  889. .IP "2." 3
  890. The \[aq]cache\[aq] pool should have the cache drives listed first.
  891. .IP "3." 3
  892. The best policies to use for the \[aq]cache\[aq] pool would probably be
  893. \f[C]ff\f[], \f[C]epff\f[], \f[C]lfs\f[], or \f[C]eplfs\f[].
  894. The latter two under the assumption that the cache drive(s) are far
  895. smaller than the backing drives.
  896. If using path preserving policies remember that you\[aq]ll need to
  897. manually create the core directories of those paths you wish to be
  898. cached.
  899. (Be sure the permissions are in sync.
  900. Use \f[C]mergerfs.fsck\f[] to check / correct them.)
  901. .IP "4." 3
  902. Enable \f[C]moveonenospc\f[] and set \f[C]minfreespace\f[]
  903. appropriately.
  904. .IP "5." 3
  905. Set your programs to use the cache pool.
  906. .IP "6." 3
  907. Save one of the below scripts.
  908. .IP "7." 3
  909. Use \f[C]crontab\f[] (as root) to schedule the command at whatever
  910. frequency is appropriate for your workflow.
  911. .SS Time based expiring
  912. .PP
  913. Move files from cache to backing pool based only on the last time the
  914. file was accessed.
  915. .IP
  916. .nf
  917. \f[C]
  918. #!/bin/bash
  919. if\ [\ $#\ !=\ 3\ ];\ then
  920. \ \ echo\ "usage:\ $0\ <cache\-drive>\ <backing\-pool>\ <days\-old>"
  921. \ \ exit\ 1
  922. fi
  923. CACHE="${1}"
  924. BACKING="${2}"
  925. N=${3}
  926. find\ "${CACHE}"\ \-type\ f\ \-atime\ +${N}\ \-printf\ \[aq]%P\\n\[aq]\ |\ \\
  927. \ \ rsync\ \-\-files\-from=\-\ \-aq\ \-\-remove\-source\-files\ "${CACHE}/"\ "${BACKING}/"
  928. \f[]
  929. .fi
  930. .SS Percentage full expiring
  931. .PP
  932. Move the oldest file from the cache to the backing pool.
  933. Continue till below percentage threshold.
  934. .IP
  935. .nf
  936. \f[C]
  937. #!/bin/bash
  938. if\ [\ $#\ !=\ 3\ ];\ then
  939. \ \ echo\ "usage:\ $0\ <cache\-drive>\ <backing\-pool>\ <percentage>"
  940. \ \ exit\ 1
  941. fi
  942. CACHE="${1}"
  943. BACKING="${2}"
  944. PERCENTAGE=${3}
  945. set\ \-o\ errexit
  946. while\ [\ $(df\ \-\-output=pcent\ "${CACHE}"\ |\ grep\ \-v\ Use\ |\ cut\ \-d\[aq]%\[aq]\ \-f1)\ \-gt\ ${PERCENTAGE}\ ]
  947. do
  948. \ \ \ \ FILE=$(find\ "${CACHE}"\ \-type\ f\ \-printf\ \[aq]%A\@\ %P\\n\[aq]\ |\ \\
  949. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sort\ |\ \\
  950. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ head\ \-n\ 1\ |\ \\
  951. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cut\ \-d\[aq]\ \[aq]\ \-f2\-)
  952. \ \ \ \ test\ \-n\ "${FILE}"
  953. \ \ \ \ rsync\ \-aq\ \-\-remove\-source\-files\ "${CACHE}/./${FILE}"\ "${BACKING}/"
  954. done
  955. \f[]
  956. .fi
  957. .SH TIPS / NOTES
  958. .IP \[bu] 2
  959. The recommended options are
  960. \f[B]defaults,allow_other,direct_io,use_ino\f[].
  961. (\f[B]use_ino\f[] will only work when used with mergerfs 2.18.0 and
  962. above.)
  963. .IP \[bu] 2
  964. Run mergerfs as \f[C]root\f[] unless you\[aq]re merging paths which are
  965. owned by the same user otherwise strange permission issues may arise.
  966. .IP \[bu] 2
  967. https://github.com/trapexit/backup\-and\-recovery\-howtos : A set of
  968. guides / howtos on creating a data storage system, backing it up,
  969. maintaining it, and recovering from failure.
  970. .IP \[bu] 2
  971. If you don\[aq]t see some directories and files you expect in a merged
  972. point or policies seem to skip drives be sure the user has permission to
  973. all the underlying directories.
  974. Use \f[C]mergerfs.fsck\f[] to audit the drive for out of sync
  975. permissions.
  976. .IP \[bu] 2
  977. Do \f[I]not\f[] use \f[C]direct_io\f[] if you expect applications (such
  978. as rtorrent) to mmap (http://linux.die.net/man/2/mmap) files.
  979. It is not currently supported in FUSE w/ \f[C]direct_io\f[] enabled.
  980. .IP \[bu] 2
  981. Since POSIX gives you only error or success on calls its difficult to
  982. determine the proper behavior when applying the behavior to multiple
  983. targets.
  984. \f[B]mergerfs\f[] will return an error only if all attempts of an action
  985. fail.
  986. Any success will lead to a success returned.
  987. This means however that some odd situations may arise.
  988. .IP \[bu] 2
  989. Kodi (http://kodi.tv), Plex (http://plex.tv),
  990. Subsonic (http://subsonic.org), etc.
  991. can use directory mtime (http://linux.die.net/man/2/stat) to more
  992. efficiently determine whether to scan for new content rather than simply
  993. performing a full scan.
  994. If using the default \f[B]getattr\f[] policy of \f[B]ff\f[] its possible
  995. \f[B]Kodi\f[] will miss an update on account of it returning the first
  996. directory found\[aq]s \f[B]stat\f[] info and its a later directory on
  997. another mount which had the \f[B]mtime\f[] recently updated.
  998. To fix this you will want to set \f[B]func.getattr=newest\f[].
  999. Remember though that this is just \f[B]stat\f[].
  1000. If the file is later \f[B]open\f[]\[aq]ed or \f[B]unlink\f[]\[aq]ed and
  1001. the policy is different for those then a completely different file or
  1002. directory could be acted on.
  1003. .IP \[bu] 2
  1004. Some policies mixed with some functions may result in strange behaviors.
  1005. Not that some of these behaviors and race conditions couldn\[aq]t happen
  1006. outside \f[B]mergerfs\f[] but that they are far more likely to occur on
  1007. account of attempt to merge together multiple sources of data which
  1008. could be out of sync due to the different policies.
  1009. .IP \[bu] 2
  1010. For consistency its generally best to set \f[B]category\f[] wide
  1011. policies rather than individual \f[B]func\f[]\[aq]s.
  1012. This will help limit the confusion of tools such as
  1013. rsync (http://linux.die.net/man/1/rsync).
  1014. However, the flexibility is there if needed.
  1015. .SH KNOWN ISSUES / BUGS
  1016. .SS directory mtime is not being updated
  1017. .PP
  1018. Remember that the default policy for \f[C]getattr\f[] is \f[C]ff\f[].
  1019. The information for the first directory found will be returned.
  1020. If it wasn\[aq]t the directory which had been updated then it will
  1021. appear outdated.
  1022. .PP
  1023. The reason this is the default is because any other policy would be far
  1024. more expensive and for many applications it is unnecessary.
  1025. To always return the directory with the most recent mtime or a faked
  1026. value based on all found would require a scan of all drives.
  1027. That alone is far more expensive than \f[C]ff\f[] but would also
  1028. possibly spin up sleeping drives.
  1029. .PP
  1030. If you always want the directory information from the one with the most
  1031. recent mtime then use the \f[C]newest\f[] policy for \f[C]getattr\f[].
  1032. .SS cached memory appears greater than it should be
  1033. .PP
  1034. Use the \f[C]direct_io\f[] option as described above.
  1035. Due to what mergerfs is doing there ends up being two caches of a file
  1036. under normal usage.
  1037. One from the underlying filesystem and one from mergerfs.
  1038. Enabling \f[C]direct_io\f[] removes the mergerfs cache.
  1039. This saves on memory but means the kernel needs to communicate with
  1040. mergerfs more often and can therefore result in slower speeds.
  1041. .PP
  1042. Since enabling \f[C]direct_io\f[] disables \f[C]mmap\f[] this is not an
  1043. ideal situation however write speeds should be increased.
  1044. .PP
  1045. If \f[C]direct_io\f[] is disabled it is probably a good idea to enable
  1046. \f[C]dropcacheonclose\f[] to minimize double caching.
  1047. .SS NFS clients don\[aq]t work
  1048. .PP
  1049. Some NFS clients appear to fail when a mergerfs mount is exported.
  1050. Kodi in particular seems to have issues.
  1051. .PP
  1052. Try enabling the \f[C]use_ino\f[] option.
  1053. Some have reported that it fixes the issue.
  1054. .SS rtorrent fails with ENODEV (No such device)
  1055. .PP
  1056. Be sure to turn off \f[C]direct_io\f[].
  1057. rtorrent and some other applications use
  1058. mmap (http://linux.die.net/man/2/mmap) to read and write to files and
  1059. offer no failback to traditional methods.
  1060. FUSE does not currently support mmap while using \f[C]direct_io\f[].
  1061. There will be a performance penalty on writes with \f[C]direct_io\f[]
  1062. off as well as the problem of double caching but it\[aq]s the only way
  1063. to get such applications to work.
  1064. If the performance loss is too high for other apps you can mount
  1065. mergerfs twice.
  1066. Once with \f[C]direct_io\f[] enabled and one without it.
  1067. .SS Plex doesn\[aq]t work with mergerfs
  1068. .PP
  1069. It does.
  1070. If you\[aq]re trying to put Plex\[aq]s config / metadata on mergerfs you
  1071. have to leave \f[C]direct_io\f[] off because Plex is using sqlite which
  1072. apparently needs mmap.
  1073. mmap doesn\[aq]t work with \f[C]direct_io\f[].
  1074. .PP
  1075. If the issue is that scanning doesn\[aq]t seem to pick up media then be
  1076. sure to set \f[C]func.getattr=newest\f[] as mentioned above.
  1077. .SS mmap performance is really bad
  1078. .PP
  1079. There is a bug (https://lkml.org/lkml/2016/3/16/260) in caching which
  1080. affects overall performance of mmap through FUSE in Linux 4.x kernels.
  1081. It is fixed in 4.4.10 and 4.5.4 (https://lkml.org/lkml/2016/5/11/59).
  1082. .SS When a program tries to move or rename a file it fails
  1083. .PP
  1084. Please read the section above regarding rename & link (#rename--link).
  1085. .PP
  1086. The problem is that many applications do not properly handle
  1087. \f[C]EXDEV\f[] errors which \f[C]rename\f[] and \f[C]link\f[] may return
  1088. even though they are perfectly valid situations which do not indicate
  1089. actual drive or OS errors.
  1090. The error will only be returned by mergerfs if using a path preserving
  1091. policy as described in the policy section above.
  1092. If you do not care about path preservation simply change the mergerfs
  1093. policy to the non\-path preserving version.
  1094. For example: \f[C]\-o\ category.create=mfs\f[]
  1095. .PP
  1096. Ideally the offending software would be fixed and it is recommended that
  1097. if you run into this problem you contact the software\[aq]s author and
  1098. request proper handling of \f[C]EXDEV\f[] errors.
  1099. .SS Samba: Moving files / directories fails
  1100. .PP
  1101. Workaround: Copy the file/directory and then remove the original rather
  1102. than move.
  1103. .PP
  1104. This isn\[aq]t an issue with Samba but some SMB clients.
  1105. GVFS\-fuse v1.20.3 and prior (found in Ubuntu 14.04 among others) failed
  1106. to handle certain error codes correctly.
  1107. Particularly \f[B]STATUS_NOT_SAME_DEVICE\f[] which comes from the
  1108. \f[B]EXDEV\f[] which is returned by \f[B]rename\f[] when the call is
  1109. crossing mount points.
  1110. When a program gets an \f[B]EXDEV\f[] it needs to explicitly take an
  1111. alternate action to accomplish it\[aq]s goal.
  1112. In the case of \f[B]mv\f[] or similar it tries \f[B]rename\f[] and on
  1113. \f[B]EXDEV\f[] falls back to a manual copying of data between the two
  1114. locations and unlinking the source.
  1115. In these older versions of GVFS\-fuse if it received \f[B]EXDEV\f[] it
  1116. would translate that into \f[B]EIO\f[].
  1117. This would cause \f[B]mv\f[] or most any application attempting to move
  1118. files around on that SMB share to fail with a IO error.
  1119. .PP
  1120. GVFS\-fuse v1.22.0 (https://bugzilla.gnome.org/show_bug.cgi?id=734568)
  1121. and above fixed this issue but a large number of systems use the older
  1122. release.
  1123. On Ubuntu the version can be checked by issuing
  1124. \f[C]apt\-cache\ showpkg\ gvfs\-fuse\f[].
  1125. Most distros released in 2015 seem to have the updated release and will
  1126. work fine but older systems may not.
  1127. Upgrading gvfs\-fuse or the distro in general will address the problem.
  1128. .PP
  1129. In Apple\[aq]s MacOSX 10.9 they replaced Samba (client and server) with
  1130. their own product.
  1131. It appears their new client does not handle \f[B]EXDEV\f[] either and
  1132. responds similar to older release of gvfs on Linux.
  1133. .SS Trashing files occasionally fails
  1134. .PP
  1135. This is the same issue as with Samba.
  1136. \f[C]rename\f[] returns \f[C]EXDEV\f[] (in our case that will really
  1137. only happen with path preserving policies like \f[C]epmfs\f[]) and the
  1138. software doesn\[aq]t handle the situtation well.
  1139. This is unfortunately a common failure of software which moves files
  1140. around.
  1141. The standard indicates that an implementation \f[C]MAY\f[] choose to
  1142. support non\-user home directory trashing of files (which is a
  1143. \f[C]MUST\f[]).
  1144. The implementation \f[C]MAY\f[] also support "top directory trashes"
  1145. which many probably do.
  1146. .PP
  1147. To create a \f[C]$topdir/.Trash\f[] directory as defined in the standard
  1148. use the mergerfs\-tools (https://github.com/trapexit/mergerfs-tools)
  1149. tool \f[C]mergerfs.mktrash\f[].
  1150. .SS Supplemental user groups
  1151. .PP
  1152. Due to the overhead of
  1153. getgroups/setgroups (http://linux.die.net/man/2/setgroups) mergerfs
  1154. utilizes a cache.
  1155. This cache is opportunistic and per thread.
  1156. Each thread will query the supplemental groups for a user when that
  1157. particular thread needs to change credentials and will keep that data
  1158. for the lifetime of the thread.
  1159. This means that if a user is added to a group it may not be picked up
  1160. without the restart of mergerfs.
  1161. However, since the high level FUSE API\[aq]s (at least the standard
  1162. version) thread pool dynamically grows and shrinks it\[aq]s possible
  1163. that over time a thread will be killed and later a new thread with no
  1164. cache will start and query the new data.
  1165. .PP
  1166. The gid cache uses fixed storage to simplify the design and be
  1167. compatible with older systems which may not have C++11 compilers.
  1168. There is enough storage for 256 users\[aq] supplemental groups.
  1169. Each user is allowed upto 32 supplemental groups.
  1170. Linux >= 2.6.3 allows upto 65535 groups per user but most other *nixs
  1171. allow far less.
  1172. NFS allowing only 16.
  1173. The system does handle overflow gracefully.
  1174. If the user has more than 32 supplemental groups only the first 32 will
  1175. be used.
  1176. If more than 256 users are using the system when an uncached user is
  1177. found it will evict an existing user\[aq]s cache at random.
  1178. So long as there aren\[aq]t more than 256 active users this should be
  1179. fine.
  1180. If either value is too low for your needs you will have to modify
  1181. \f[C]gidcache.hpp\f[] to increase the values.
  1182. Note that doing so will increase the memory needed by each thread.
  1183. .SS mergerfs or libfuse crashing
  1184. .PP
  1185. \f[B]NOTE:\f[] as of mergerfs 2.22.0 it includes the most recent version
  1186. of libfuse so any crash should be reported.
  1187. For older releases continue reading...
  1188. .PP
  1189. If suddenly the mergerfs mount point disappears and
  1190. \f[C]Transport\ endpoint\ is\ not\ connected\f[] is returned when
  1191. attempting to perform actions within the mount directory \f[B]and\f[]
  1192. the version of libfuse (use \f[C]mergerfs\ \-v\f[] to find the version)
  1193. is older than \f[C]2.9.4\f[] its likely due to a bug in libfuse.
  1194. Affected versions of libfuse can be found in Debian Wheezy, Ubuntu
  1195. Precise and others.
  1196. .PP
  1197. In order to fix this please install newer versions of libfuse.
  1198. If using a Debian based distro (Debian,Ubuntu,Mint) you can likely just
  1199. install newer versions of
  1200. libfuse (https://packages.debian.org/unstable/libfuse2) and
  1201. fuse (https://packages.debian.org/unstable/fuse) from the repo of a
  1202. newer release.
  1203. .SS mergerfs appears to be crashing or exiting
  1204. .PP
  1205. There seems to be an issue with Linux version \f[C]4.9.0\f[] and above
  1206. in which an invalid message appears to be transmitted to libfuse (used
  1207. by mergerfs) causing it to exit.
  1208. No messages will be printed in any logs as its not a proper crash.
  1209. Debugging of the issue is still ongoing and can be followed via the
  1210. fuse\-devel
  1211. thread (https://sourceforge.net/p/fuse/mailman/message/35662577).
  1212. .SS mergerfs under heavy load and memory preasure leads to kernel panic
  1213. .PP
  1214. https://lkml.org/lkml/2016/9/14/527
  1215. .IP
  1216. .nf
  1217. \f[C]
  1218. [25192.515454]\ kernel\ BUG\ at\ /build/linux\-a2WvEb/linux\-4.4.0/mm/workingset.c:346!
  1219. [25192.517521]\ invalid\ opcode:\ 0000\ [#1]\ SMP
  1220. [25192.519602]\ Modules\ linked\ in:\ netconsole\ ip6t_REJECT\ nf_reject_ipv6\ ipt_REJECT\ nf_reject_ipv4\ configfs\ binfmt_misc\ veth\ bridge\ stp\ llc\ nf_conntrack_ipv6\ nf_defrag_ipv6\ xt_conntrack\ ip6table_filter\ ip6_tables\ xt_multiport\ iptable_filter\ ipt_MASQUERADE\ nf_nat_masquerade_ipv4\ xt_comment\ xt_nat\ iptable_nat\ nf_conntrack_ipv4\ nf_defrag_ipv4\ nf_nat_ipv4\ nf_nat\ nf_conntrack\ xt_CHECKSUM\ xt_tcpudp\ iptable_mangle\ ip_tables\ x_tables\ intel_rapl\ x86_pkg_temp_thermal\ intel_powerclamp\ eeepc_wmi\ asus_wmi\ coretemp\ sparse_keymap\ kvm_intel\ ppdev\ kvm\ irqbypass\ mei_me\ 8250_fintek\ input_leds\ serio_raw\ parport_pc\ tpm_infineon\ mei\ shpchp\ mac_hid\ parport\ lpc_ich\ autofs4\ drbg\ ansi_cprng\ dm_crypt\ algif_skcipher\ af_alg\ btrfs\ raid456\ async_raid6_recov\ async_memcpy\ async_pq\ async_xor\ async_tx\ xor\ raid6_pq\ libcrc32c\ raid0\ multipath\ linear\ raid10\ raid1\ i915\ crct10dif_pclmul\ crc32_pclmul\ aesni_intel\ i2c_algo_bit\ aes_x86_64\ drm_kms_helper\ lrw\ gf128mul\ glue_helper\ ablk_helper\ syscopyarea\ cryptd\ sysfillrect\ sysimgblt\ fb_sys_fops\ drm\ ahci\ r8169\ libahci\ mii\ wmi\ fjes\ video\ [last\ unloaded:\ netconsole]
  1221. [25192.540910]\ CPU:\ 2\ PID:\ 63\ Comm:\ kswapd0\ Not\ tainted\ 4.4.0\-36\-generic\ #55\-Ubuntu
  1222. [25192.543411]\ Hardware\ name:\ System\ manufacturer\ System\ Product\ Name/P8H67\-M\ PRO,\ BIOS\ 3904\ 04/27/2013
  1223. [25192.545840]\ task:\ ffff88040cae6040\ ti:\ ffff880407488000\ task.ti:\ ffff880407488000
  1224. [25192.548277]\ RIP:\ 0010:[<ffffffff811ba501>]\ \ [<ffffffff811ba501>]\ shadow_lru_isolate+0x181/0x190
  1225. [25192.550706]\ RSP:\ 0018:ffff88040748bbe0\ \ EFLAGS:\ 00010002
  1226. [25192.553127]\ RAX:\ 0000000000001c81\ RBX:\ ffff8802f91ee928\ RCX:\ ffff8802f91eeb38
  1227. [25192.555544]\ RDX:\ ffff8802f91ee938\ RSI:\ ffff8802f91ee928\ RDI:\ ffff8804099ba2c0
  1228. [25192.557914]\ RBP:\ ffff88040748bc08\ R08:\ 000000000001a7b6\ R09:\ 000000000000003f
  1229. [25192.560237]\ R10:\ 000000000001a750\ R11:\ 0000000000000000\ R12:\ ffff8804099ba2c0
  1230. [25192.562512]\ R13:\ ffff8803157e9680\ R14:\ ffff8803157e9668\ R15:\ ffff8804099ba2c8
  1231. [25192.564724]\ FS:\ \ 0000000000000000(0000)\ GS:ffff88041f280000(0000)\ knlGS:0000000000000000
  1232. [25192.566990]\ CS:\ \ 0010\ DS:\ 0000\ ES:\ 0000\ CR0:\ 0000000080050033
  1233. [25192.569201]\ CR2:\ 00007ffabb690000\ CR3:\ 0000000001e0a000\ CR4:\ 00000000000406e0
  1234. [25192.571419]\ Stack:
  1235. [25192.573550]\ \ ffff8804099ba2c0\ ffff88039e4f86f0\ ffff8802f91ee928\ ffff8804099ba2c8
  1236. [25192.575695]\ \ ffff88040748bd08\ ffff88040748bc58\ ffffffff811b99bf\ 0000000000000052
  1237. [25192.577814]\ \ 0000000000000000\ ffffffff811ba380\ 000000000000008a\ 0000000000000080
  1238. [25192.579947]\ Call\ Trace:
  1239. [25192.582022]\ \ [<ffffffff811b99bf>]\ __list_lru_walk_one.isra.3+0x8f/0x130
  1240. [25192.584137]\ \ [<ffffffff811ba380>]\ ?\ memcg_drain_all_list_lrus+0x190/0x190
  1241. [25192.586165]\ \ [<ffffffff811b9a83>]\ list_lru_walk_one+0x23/0x30
  1242. [25192.588145]\ \ [<ffffffff811ba544>]\ scan_shadow_nodes+0x34/0x50
  1243. [25192.590074]\ \ [<ffffffff811a0e9d>]\ shrink_slab.part.40+0x1ed/0x3d0
  1244. [25192.591985]\ \ [<ffffffff811a53da>]\ shrink_zone+0x2ca/0x2e0
  1245. [25192.593863]\ \ [<ffffffff811a64ce>]\ kswapd+0x51e/0x990
  1246. [25192.595737]\ \ [<ffffffff811a5fb0>]\ ?\ mem_cgroup_shrink_node_zone+0x1c0/0x1c0
  1247. [25192.597613]\ \ [<ffffffff810a0808>]\ kthread+0xd8/0xf0
  1248. [25192.599495]\ \ [<ffffffff810a0730>]\ ?\ kthread_create_on_node+0x1e0/0x1e0
  1249. [25192.601335]\ \ [<ffffffff8182e34f>]\ ret_from_fork+0x3f/0x70
  1250. [25192.603193]\ \ [<ffffffff810a0730>]\ ?\ kthread_create_on_node+0x1e0/0x1e0
  1251. \f[]
  1252. .fi
  1253. .PP
  1254. There is a bug in the kernel.
  1255. A work around appears to be turning off \f[C]splice\f[].
  1256. Add \f[C]no_splice_write,no_splice_move,no_splice_read\f[] to
  1257. mergerfs\[aq] options.
  1258. Should be placed after \f[C]defaults\f[] if it is used since it will
  1259. turn them on.
  1260. This however is not guaranteed to work.
  1261. .SH FAQ
  1262. .SS Why use mergerfs over mhddfs?
  1263. .PP
  1264. mhddfs is no longer maintained and has some known stability and security
  1265. issues (see below).
  1266. MergerFS provides a superset of mhddfs\[aq] features and should offer
  1267. the same or maybe better performance.
  1268. .PP
  1269. If you wish to get similar behavior to mhddfs from mergerfs then set
  1270. \f[C]category.create=ff\f[].
  1271. .SS Why use mergerfs over aufs?
  1272. .PP
  1273. While aufs can offer better peak performance mergerfs provides more
  1274. configurability and is generally easier to use.
  1275. mergerfs however does not offer the overlay / copy\-on\-write (COW)
  1276. features which aufs and overlayfs have.
  1277. .SS Why use mergerfs over LVM/ZFS/BTRFS/RAID0 drive concatenation /
  1278. striping?
  1279. .PP
  1280. With simple JBOD / drive concatenation / stripping / RAID0 a single
  1281. drive failure will result in full pool failure.
  1282. mergerfs performs a similar behavior without the possibility of
  1283. catastrophic failure and difficulties in recovery.
  1284. Drives may fail however all other data will continue to be accessable.
  1285. .PP
  1286. When combined with something like SnapRaid (http://www.snapraid.it)
  1287. and/or an offsite backup solution you can have the flexibilty of JBOD
  1288. without the single point of failure.
  1289. .SS Why use mergerfs over ZFS?
  1290. .PP
  1291. MergerFS is not intended to be a replacement for ZFS.
  1292. MergerFS is intended to provide flexible pooling of arbitrary drives
  1293. (local or remote), of arbitrary sizes, and arbitrary filesystems.
  1294. For \f[C]write\ once,\ read\ many\f[] usecases such as bulk media
  1295. storage.
  1296. Where data integrity and backup is managed in other ways.
  1297. In that situation ZFS can introduce major maintance and cost burdens as
  1298. described
  1299. here (http://louwrentius.com/the-hidden-cost-of-using-zfs-for-your-home-nas.html).
  1300. .SS Can drives be written to directly? Outside of mergerfs while pooled?
  1301. .PP
  1302. Yes.
  1303. It will be represented immediately in the pool as the policies
  1304. perscribe.
  1305. .SS Why do I get an "out of space" error even though the system says
  1306. there\[aq]s lots of space left?
  1307. .PP
  1308. First make sure you\[aq]ve read the sections above about policies, path
  1309. preserving, and the \f[B]moveonenospc\f[] option.
  1310. .PP
  1311. Remember that mergerfs is simply presenting a logical merging of the
  1312. contents of the pooled drives.
  1313. The reported free space is the aggregate space available \f[B]not\f[]
  1314. the contiguous space available.
  1315. MergerFS does not split files across drives.
  1316. If the writing of a file fills a drive and \f[B]moveonenospc\f[] is
  1317. disabled it will return an ENOSPC error.
  1318. .PP
  1319. If \f[B]moveonenospc\f[] is enabled but there exists no drives with
  1320. enough space for the file and the data to be written (or the drive
  1321. happened to fill up as the file was being moved) it will error
  1322. indicating there isn\[aq]t enough space.
  1323. .PP
  1324. It is also possible that the filesystem selected has run out of inodes.
  1325. Use \f[C]df\ \-i\f[] to list the total and available inodes per
  1326. filesystem.
  1327. In the future it might be worth considering the number of inodes
  1328. available when making placement decisions in order to minimize this
  1329. situation.
  1330. .SS Can mergerfs mounts be exported over NFS?
  1331. .PP
  1332. Yes.
  1333. Some clients (Kodi) have issues in which the contents of the NFS mount
  1334. will not be presented but users have found that enabling the
  1335. \f[C]use_ino\f[] option often fixes that problem.
  1336. .SS Can mergerfs mounts be exported over Samba / SMB?
  1337. .PP
  1338. Yes.
  1339. .SS How are inodes calculated?
  1340. .PP
  1341. mergerfs\-inode = (original\-inode | (device\-id << 32))
  1342. .PP
  1343. While \f[C]ino_t\f[] is 64 bits only a few filesystems use more than 32.
  1344. Similarly, while \f[C]dev_t\f[] is also 64 bits it was traditionally 16
  1345. bits.
  1346. Bitwise or\[aq]ing them together should work most of the time.
  1347. While totally unique inodes are preferred the overhead which would be
  1348. needed does not seem to outweighted by the benefits.
  1349. .SS It\[aq]s mentioned that there are some security issues with mhddfs.
  1350. What are they? How does mergerfs address them?
  1351. .PP
  1352. mhddfs (https://github.com/trapexit/mhddfs) manages running as
  1353. \f[B]root\f[] by calling
  1354. getuid() (https://github.com/trapexit/mhddfs/blob/cae96e6251dd91e2bdc24800b4a18a74044f6672/src/main.c#L319)
  1355. and if it returns \f[B]0\f[] then it will
  1356. chown (http://linux.die.net/man/1/chown) the file.
  1357. Not only is that a race condition but it doesn\[aq]t handle many other
  1358. situations.
  1359. Rather than attempting to simulate POSIX ACL behavior the proper way to
  1360. manage this is to use seteuid (http://linux.die.net/man/2/seteuid) and
  1361. setegid (http://linux.die.net/man/2/setegid), in effect becoming the
  1362. user making the original call, and perform the action as them.
  1363. This is what mergerfs does.
  1364. .PP
  1365. In Linux setreuid syscalls apply only to the thread.
  1366. GLIBC hides this away by using realtime signals to inform all threads to
  1367. change credentials.
  1368. Taking after \f[B]Samba\f[], mergerfs uses
  1369. \f[B]syscall(SYS_setreuid,...)\f[] to set the callers credentials for
  1370. that thread only.
  1371. Jumping back to \f[B]root\f[] as necessary should escalated privileges
  1372. be needed (for instance: to clone paths between drives).
  1373. .PP
  1374. For non\-Linux systems mergerfs uses a read\-write lock and changes
  1375. credentials only when necessary.
  1376. If multiple threads are to be user X then only the first one will need
  1377. to change the processes credentials.
  1378. So long as the other threads need to be user X they will take a readlock
  1379. allowing multiple threads to share the credentials.
  1380. Once a request comes in to run as user Y that thread will attempt a
  1381. write lock and change to Y\[aq]s credentials when it can.
  1382. If the ability to give writers priority is supported then that flag will
  1383. be used so threads trying to change credentials don\[aq]t starve.
  1384. This isn\[aq]t the best solution but should work reasonably well
  1385. assuming there are few users.
  1386. .SH SUPPORT
  1387. .PP
  1388. Filesystems are very complex and difficult to debug.
  1389. mergerfs, while being just a proxy of sorts, is also very difficult to
  1390. debug given the large number of possible settings it can have itself and
  1391. the massive number of environments it can run in.
  1392. When reporting on a suspected issue \f[B]please, please\f[] include as
  1393. much of the below information as possible otherwise it will be difficult
  1394. or impossible to diagnose.
  1395. Also please make sure to read all of the above documentation as it
  1396. includes nearly every common system or user issue.
  1397. .SS Information to include in bug reports
  1398. .IP \[bu] 2
  1399. Version of mergerfs: \f[C]mergerfs\ \-V\f[]
  1400. .IP \[bu] 2
  1401. mergerfs settings: from \f[C]/etc/fstab\f[] or command line execution
  1402. .IP \[bu] 2
  1403. Version of Linux: \f[C]uname\ \-a\f[]
  1404. .IP \[bu] 2
  1405. Versions of any additional software being used
  1406. .IP \[bu] 2
  1407. List of drives, their filesystems, and sizes (before and after issue):
  1408. \f[C]df\ \-h\f[]
  1409. .IP \[bu] 2
  1410. A \f[C]strace\f[] of the app having problems:
  1411. .IP \[bu] 2
  1412. \f[C]strace\ \-f\ \-o\ /tmp/app.strace.txt\ <cmd>\f[]
  1413. .IP \[bu] 2
  1414. A \f[C]strace\f[] of mergerfs while the program is trying to do whatever
  1415. it\[aq]s failing to do:
  1416. .RS 2
  1417. .IP \[bu] 2
  1418. \f[C]strace\ \-f\ \-p\ <mergerfsPID>\ \-o\ /tmp/mergerfs.strace.txt\f[]
  1419. .RE
  1420. .IP \[bu] 2
  1421. \f[B]Precise\f[] directions on replicating the issue.
  1422. Don\[aq]t leave \f[B]anything\f[] out.
  1423. .IP \[bu] 2
  1424. Try to recreate the problem in the simplist way using standard programs.
  1425. .SS Issue submission / Contact
  1426. .IP \[bu] 2
  1427. github.com: https://github.com/trapexit/mergerfs/issues
  1428. .IP \[bu] 2
  1429. email: trapexit\@spawn.link
  1430. .IP \[bu] 2
  1431. twitter: https://twitter.com/_trapexit
  1432. .SS Support development
  1433. .IP \[bu] 2
  1434. BitCoin: 12CdMhEPQVmjz3SSynkAEuD5q9JmhTDCZA
  1435. .IP \[bu] 2
  1436. PayPal: trapexit\@spawn.link
  1437. .IP \[bu] 2
  1438. Patreon: https://www.patreon.com/trapexit
  1439. .IP \[bu] 2
  1440. Gratipay: https://gratipay.com/~trapexit
  1441. .SH LINKS
  1442. .IP \[bu] 2
  1443. http://github.com/trapexit/mergerfs
  1444. .IP \[bu] 2
  1445. http://github.com/trapexit/mergerfs\-tools
  1446. .IP \[bu] 2
  1447. http://github.com/trapexit/scorch
  1448. .IP \[bu] 2
  1449. http://github.com/trapexit/backup\-and\-recovery\-howtos
  1450. .SH AUTHORS
  1451. Antonio SJ Musumeci <trapexit@spawn.link>.