Skip to content

Commit

Permalink
Add NFS options to remote filesystems section of readme
Browse files Browse the repository at this point in the history
  • Loading branch information
trapexit committed Feb 20, 2024
1 parent 7fabe51 commit 1916e54
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2054,11 +2054,15 @@ generally recommended to use SMB when possible till situations
change. That said issues should still be reported. NFS is not really
recommended but it isn't unsupported.

When exporting mergerfs via NFS ensure to set the following config:
mergerfs settings:
* noforget
* inodecalc=path-hash
* export-support=false (only available in v2.40.0 and above)

NFS export settings:
* fsid=UUID
* no\_root\_squash

`noforget` is needed because NFS uses the `name_to_handle_at` and
`open_by_handle_at` functions which allow a program to keep a
reference to a file without technically having it open in the typical
Expand Down Expand Up @@ -2093,6 +2097,16 @@ Also see [Kernel Issues &
Bugs](https://github.com/trapexit/mergerfs/wiki/Kernel-Issues-&-Bugs)
for more details.

`fsid=UUID` is needed because FUSE filesystems don't have different
`st_dev` values which can cause issues when exporting. The easiest
thing to do is set each mergerfs export `fsid` to some random
value. An easy way to generate a random value is to use the command
line tool `uuidgen` or through a website such as
[uuidgenerator.net](https://www.uuidgenerator.net/).

`no_root_squash` is not strictly necessary but can lead to confusing
permission and ownership issues.


## SMB / CIFS

Expand Down
18 changes: 15 additions & 3 deletions man/mergerfs.1
Original file line number Diff line number Diff line change
Expand Up @@ -2591,9 +2591,10 @@ use SMB when possible till situations change.
That said issues should still be reported.
NFS is not really recommended but it isn\[cq]t unsupported.
.PP
When exporting mergerfs via NFS ensure to set the following config: *
noforget * inodecalc=path-hash * export-support=false (only available in
v2.40.0 and above)
mergerfs settings: * noforget * inodecalc=path-hash *
export-support=false (only available in v2.40.0 and above)
.PP
NFS export settings: * fsid=UUID * no_root_squash
.PP
\f[C]noforget\f[R] is needed because NFS uses the
\f[C]name_to_handle_at\f[R] and \f[C]open_by_handle_at\f[R] functions
Expand Down Expand Up @@ -2635,6 +2636,17 @@ appropriate details.
Also see Kernel Issues &
Bugs (https://github.com/trapexit/mergerfs/wiki/Kernel-Issues-&-Bugs)
for more details.
.PP
\f[C]fsid=UUID\f[R] is needed because FUSE filesystems don\[cq]t have
different \f[C]st_dev\f[R] values which can cause issues when exporting.
The easiest thing to do is set each mergerfs export \f[C]fsid\f[R] to
some random value.
An easy way to generate a random value is to use the command line tool
\f[C]uuidgen\f[R] or through a website such as
uuidgenerator.net (https://www.uuidgenerator.net/).
.PP
\f[C]no_root_squash\f[R] is not strictly necessary but can lead to
confusing permission and ownership issues.
.SS SMB / CIFS
.PP
SMB (https://en.wikipedia.org/wiki/Server_Message_Block) is a protocol
Expand Down

0 comments on commit 1916e54

Please sign in to comment.