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.

107 lines
4.4 KiB

  1. # Compatibility and Integration
  2. ## What filesystems can be used as branches?
  3. ext4, btrfs, xfs, f2fs, zfs, nfs, etc.
  4. On the surface any filesystem should work but there could be issues
  5. with non-POSIX compliant filesystems such as vfat, ntfs, cifs, exfat,
  6. etc. When directories need to be created or files moved by mergerfs if
  7. the filesystem returns errors due to not supporting certain POSIX
  8. filesystem features it could result in the core functions failing.
  9. Since mergerfs is not generally used with non-POSIX filesystems this
  10. has not been a problem for users and there are some checks for known
  11. edgecases but it is possible some are not accounted for. If use with a
  12. filesystem results in issues please [file a
  13. ticket](https://github.com/trapexit/mergerfs/issues) with the details.
  14. ## Can I use mergerfs without SnapRAID? SnapRAID without mergerfs?
  15. Yes. They are completely unrelated pieces of software that just happen
  16. to work well together.
  17. ## Does mergerfs support CoW / copy-on-write / writes to read-only filesystems?
  18. Not in the sense of a filesystem like BTRFS or ZFS nor in the
  19. overlayfs or aufs sense. It does offer a
  20. [cow-shell](http://manpages.ubuntu.com/manpages/bionic/man1/cow-shell.1.html)
  21. like hard link breaking (copy to temp file then rename over original)
  22. which can be useful when wanting to save space by hardlinking
  23. duplicate files but wish to treat each name as if it were a unique and
  24. separate file.
  25. If you want to write to a read-only filesystem you should look at
  26. overlayfs. You can always include the overlayfs mount into a mergerfs
  27. pool.
  28. ## Can mergerfs run via Docker, Podman, Kubernetes, etc.
  29. Yes. With Docker you'll need to include `--cap-add=SYS_ADMIN
  30. --device=/dev/fuse --security-opt=apparmor:unconfined` or similar with
  31. other container runtimes. You should also be running it as root or
  32. given sufficient caps to allow mergerfs to change user and group
  33. identity as well as have root like filesystem permissions. This
  34. ability is critical to how mergerfs works.
  35. Also, as mentioned by [hotio](https://hotio.dev/containers/mergerfs),
  36. with Docker you should probably be mounting with `bind-propagation`
  37. set to `slave`.
  38. ## How does mergerfs interact with user namespaces?
  39. FUSE does not have any special integration with Linux user namespaces
  40. used by container runtime platforms like Docker, Podman, etc. The
  41. uid/gid values passed to mergerfs will be the host level values rather
  42. than that seen inside the container. Meaning `root` in a container
  43. with user namespaces configured will not be `root` to mergerfs. Same
  44. with any other uid/gid. Meaning your permissions on your branches must
  45. work with the translated values from the id mapping.
  46. It is generally recommended to not use user namespacing / id mapping
  47. given the complication it introduces.
  48. ## Can mergerfs be used with NFS root squash?
  49. If mergerfs is pooling a NFS mount then root squash should be disabled
  50. as mergerfs needs to be able to have elevated privileges to do what it
  51. does.
  52. If you are exporting mergerfs over NFS then it is not really necessary.
  53. See the [section on remote filesystems.](../remote_filesystems.md)
  54. ## Does inotify and fanotify work?
  55. Yes. You can test by using
  56. [inotifywait](https://man7.org/linux/man-pages/man1/inotifywait.1.html) or
  57. [inotifywatch](https://man7.org/linux/man-pages/man1/inotifywatch.1.html).
  58. However, you can not get notifications for events that occur outside
  59. of the mergerfs mount. For instance if you are doing
  60. [out-of-band](usage_and_functionality.md#can-filesystems-be-removed-from-the-pool-without-affecting-them)
  61. changes it is not possible to get those events forwarded through
  62. mergerfs. FUSE offers no mechanism to publish events and even if it
  63. did it would require somewhat expensive
  64. [inotify](https://man7.org/linux/man-pages/man7/inotify.7.html) or
  65. [fanotify](https://man7.org/linux/man-pages/man7/fanotify.7.html)
  66. watches on all branches.
  67. Most software which has the ability to actively monitor a filesystem
  68. (such as Plex, Emby, Jellyfin, Airsonic, etc.) are using `inotify` or
  69. `fanotify`.
  70. If you must add content out-of-band the only way to get real-time
  71. updates (via inotify or fanotify) is to add the underlying branches to
  72. the software rather than using the mergerfs mount. An alternative is
  73. to enable regular library scanning. Plex, for instance, has "Scan my
  74. library periodically". Additionally, if you are using software such as
  75. Radarr, Sonarr, or Lidarr you can configure it to trigger library
  76. updates in a number of services. This can be found under `Settings >
  77. Connect`.