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.

195 lines
8.8 KiB

  1. # KNOWN ISSUES / BUGS
  2. #### kernel issues & bugs
  3. [https://github.com/trapexit/mergerfs/wiki/Kernel-Issues-&-Bugs](https://github.com/trapexit/mergerfs/wiki/Kernel-Issues-&-Bugs)
  4. #### directory mtime is not being updated
  5. Remember that the default policy for `getattr` is `ff`. The
  6. information for the first directory found will be returned. If it
  7. wasn't the directory which had been updated then it will appear
  8. outdated.
  9. The reason this is the default is because any other policy would be
  10. more expensive and for many applications it is unnecessary. To always
  11. return the directory with the most recent mtime or a faked value based
  12. on all found would require a scan of all filesystems.
  13. If you always want the directory information from the one with the
  14. most recent mtime then use the `newest` policy for `getattr`.
  15. #### 'mv /mnt/pool/foo /mnt/disk1/foo' removes 'foo'
  16. This is not a bug.
  17. Run in verbose mode to better understand what's happening:
  18. ```
  19. $ mv -v /mnt/pool/foo /mnt/disk1/foo
  20. copied '/mnt/pool/foo' -> '/mnt/disk1/foo'
  21. removed '/mnt/pool/foo'
  22. $ ls /mnt/pool/foo
  23. ls: cannot access '/mnt/pool/foo': No such file or directory
  24. ```
  25. `mv`, when working across devices, is copying the source to target and
  26. then removing the source. Since the source **is** the target in this
  27. case, depending on the unlink policy, it will remove the just copied
  28. file and other files across the branches.
  29. If you want to move files to one filesystem just copy them there and
  30. use mergerfs.dedup to clean up the old paths or manually remove them
  31. from the branches directly.
  32. #### cached memory appears greater than it should be
  33. Use `cache.files=off` and/or `dropcacheonclose=true`. See the section
  34. on page caching.
  35. #### NFS clients returning ESTALE / Stale file handle
  36. NFS generally does not like out of band changes. Take a look at the
  37. section on NFS in the [remote-filesystems](remote_filesystems.md) for
  38. more details.
  39. #### rtorrent fails with ENODEV (No such device)
  40. Be sure to set
  41. `cache.files=partial|full|auto-full|per-processe`. rtorrent and some
  42. other applications use [mmap](http://linux.die.net/man/2/mmap) to read
  43. and write to files and offer no fallback to traditional methods. FUSE
  44. does not currently support mmap while using `direct_io`. There may be
  45. a performance penalty on writes with `direct_io` off as well as the
  46. problem of double caching but it's the only way to get such
  47. applications to work. If the performance loss is too high for other
  48. apps you can mount mergerfs twice. Once with `direct_io` enabled and
  49. one without it. Be sure to set `dropcacheonclose=true` if not using
  50. `direct_io`.
  51. #### Plex doesn't work with mergerfs
  52. It does. If you're trying to put Plex's config / metadata / database
  53. on mergerfs you can't set `cache.files=off` because Plex is using
  54. sqlite3 with mmap enabled. Shared mmap is not supported by Linux's
  55. FUSE implementation when page caching is disabled. To fix this place
  56. the data elsewhere (preferable) or enable `cache.files` (with
  57. `dropcacheonclose=true`). Sqlite3 does not need mmap but the developer
  58. needs to fall back to standard IO if mmap fails.
  59. This applies to other software: Radarr, Sonarr, Lidarr, Jellyfin, etc.
  60. I would recommend reaching out to the developers of the software
  61. you're having troubles with and asking them to add a fallback to
  62. regular file IO when mmap is unavailable.
  63. If the issue is that scanning doesn't seem to pick up media then be
  64. sure to set `func.getattr=newest`, though generally, a full scan will
  65. pick up all media anyway.
  66. #### When a program tries to move or rename a file it fails
  67. Please read the section above regarding [rename and link](functions_categories_and_policies.md#rename-and-link).
  68. The problem is that many applications do not properly handle `EXDEV`
  69. errors which `rename` and `link` may return even though they are
  70. perfectly valid situations which do not indicate actual device,
  71. filesystem, or OS errors. The error will only be returned by mergerfs
  72. if using a path preserving policy as described in the policy section
  73. above. If you do not care about path preservation simply change the
  74. mergerfs policy to the non-path preserving version. For example: `-o
  75. category.create=mfs` Ideally the offending software would be fixed and
  76. it is recommended that if you run into this problem you contact the
  77. software's author and request proper handling of `EXDEV` errors.
  78. #### my 32bit software has problems
  79. Some software have problems with 64bit inode values. The symptoms can
  80. include EOVERFLOW errors when trying to list files. You can address
  81. this by setting `inodecalc` to one of the 32bit based algos as
  82. described in the relevant section.
  83. #### Samba: Moving files / directories fails
  84. Workaround: Copy the file/directory and then remove the original
  85. rather than move.
  86. This isn't an issue with Samba but some SMB clients. GVFS-fuse v1.20.3
  87. and prior (found in Ubuntu 14.04 among others) failed to handle
  88. certain error codes correctly. Particularly **STATUS_NOT_SAME_DEVICE**
  89. which comes from the **EXDEV** which is returned by **rename** when
  90. the call is crossing mount points. When a program gets an **EXDEV** it
  91. needs to explicitly take an alternate action to accomplish its
  92. goal. In the case of **mv** or similar it tries **rename** and on
  93. **EXDEV** falls back to a manual copying of data between the two
  94. locations and unlinking the source. In these older versions of
  95. GVFS-fuse if it received **EXDEV** it would translate that into
  96. **EIO**. This would cause **mv** or most any application attempting to
  97. move files around on that SMB share to fail with a IO error.
  98. [GVFS-fuse v1.22.0](https://bugzilla.gnome.org/show_bug.cgi?id=734568)
  99. and above fixed this issue but a large number of systems use the older
  100. release. On Ubuntu, the version can be checked by issuing `apt-cache
  101. showpkg gvfs-fuse`. Most distros released in 2015 seem to have the
  102. updated release and will work fine but older systems may
  103. not. Upgrading gvfs-fuse or the distro in general will address the
  104. problem.
  105. In Apple's MacOSX 10.9 they replaced Samba (client and server) with
  106. their own product. It appears their new client does not handle
  107. **EXDEV** either and responds similarly to older releases of gvfs on
  108. Linux.
  109. #### Trashing files occasionally fails
  110. This is the same issue as with Samba. `rename` returns `EXDEV` (in our
  111. case that will really only happen with path preserving policies like
  112. `epmfs`) and the software doesn't handle the situation well. This is
  113. unfortunately a common failure of software which moves files
  114. around. The standard indicates that an implementation `MAY` choose to
  115. support non-user home directory trashing of files (which is a
  116. `MUST`). The implementation `MAY` also support "top directory trashes"
  117. which many probably do.
  118. To create a `$topdir/.Trash` directory as defined in the standard use
  119. the [mergerfs-tools](https://github.com/trapexit/mergerfs-tools) tool
  120. `mergerfs.mktrash`.
  121. #### Supplemental user groups
  122. Due to the overhead of
  123. [getgroups/setgroups](http://linux.die.net/man/2/setgroups) mergerfs
  124. utilizes a cache. This cache is opportunistic and per thread. Each
  125. thread will query the supplemental groups for a user when that
  126. particular thread needs to change credentials and will keep that data
  127. for the lifetime of the thread. This means that if a user is added to
  128. a group it may not be picked up without the restart of
  129. mergerfs. However, since the high level FUSE API's (at least the
  130. standard version) thread pool dynamically grows and shrinks it's
  131. possible that over time a thread will be killed and later a new thread
  132. with no cache will start and query the new data.
  133. The gid cache uses fixed storage to simplify the design and be
  134. compatible with older systems which may not have C++11
  135. compilers. There is enough storage for 256 users' supplemental
  136. groups. Each user is allowed up to 32 supplemental groups. Linux >=
  137. 2.6.3 allows up to 65535 groups per user but most other \*nixs allow
  138. far less. NFS allows only 16. The system does handle overflow
  139. gracefully. If the user has more than 32 supplemental groups only the
  140. first 32 will be used. If more than 256 users are using the system
  141. when an uncached user is found it will evict an existing user's cache
  142. at random. So long as there aren't more than 256 active users this
  143. should be fine. If either value is too low for your needs you will
  144. have to modify `gidcache.hpp` to increase the values. Note that doing
  145. so will increase the memory needed by each thread.
  146. While not a bug some users have found when using containers that
  147. supplemental groups defined inside the container don't work properly
  148. with regard to permissions. This is expected as mergerfs lives outside
  149. the container and therefore is querying the host's group
  150. database. There might be a hack to work around this (make mergerfs
  151. read the /etc/group file in the container) but it is not yet
  152. implemented and would be limited to Linux and the /etc/group
  153. DB. Preferably users would mount in the host group file into the
  154. containers or use a standard shared user & groups technology like NIS
  155. or LDAP.