Can't connect to rclone serve nfs

What is the problem you are having with rclone?

I can't connect to the nfs created by rclone.

I've tried from multiple OSes and all give the same result

  • Fedora 40

  • Fedora 40 server

  • Synology DSM 7.2

Error when running mount command

command as root mount -t nfs -o port=6666 <redactedRcloneHost>::/ /mnt/rclone-nfs -vv

error


mount.nfs: timeout set for Wed Aug 7 23:00:36 2024

mount.nfs: trying text-based options 'port=6666,vers=4.2,addr=<redactedRcloneHost>:,clientaddr=<clientIP>:'

mount.nfs: mount(2): Input/output error

mount.nfs: mount system call failed for /mnt/juje-nas-nfs

it also fails with other options like vers=3 or mountport=6666 or both set.

When doing dmesg I get this error log


[82843.425236] NFS: nfs4_discover_server_trunking unhandled error -5. Exiting with error EIO

firewall is disabled

Run the command 'rclone version' and share the full output of the command.


rclone v1.67.0

- os/version: debian 12.6 (64 bit)

- os/kernel: 6.1.0-22-amd64 (x86_64)

- os/type: linux

- os/arch: amd64

- go/version: go1.22.4

- go/linking: static

- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

samba

The command you were trying to run (eg rclone copy /tmp remote:tmp)


rclone serve nfs remote-samba:/ --addr 0.0.0.0:6666 --vfs-cache-mode=full -vv

The rclone config contents with secrets removed.


[remote-samba]

type = smb

host = <REDACTEDIP>

user = samba-user

pass = <redacted>

A log from the command with the -vv flag


2024/08/07 22:41:04 DEBUG : rclone: Version "v1.67.0" starting with parameters ["rclone" "serve" "nfs" "remote-samba:/" "--addr" "0.0.0.0:6666" "--vfs-cache-mode=full" "-vv"]

2024/08/07 22:41:04 DEBUG : Creating backend with remote "remote-samba:/"

2024/08/07 22:41:04 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"

2024/08/07 22:41:04 DEBUG : fs cache: renaming cache item "remote-samba:/" to be canonical "remote-samba:"

2024/08/07 22:41:04 INFO : smb://samba-user@<REDACTEDIP>:445/: poll-interval is not supported by this remote

2024/08/07 22:41:04 DEBUG : vfs cache: root is "/root/.cache/rclone"

2024/08/07 22:41:04 DEBUG : vfs cache: data root is "/root/.cache/rclone/vfs/remote-samba"

2024/08/07 22:41:04 DEBUG : vfs cache: metadata root is "/root/.cache/rclone/vfsMeta/remote-samba"

2024/08/07 22:41:04 DEBUG : Creating backend with remote "/root/.cache/rclone/vfs/remote-samba/"

2024/08/07 22:41:04 DEBUG : fs cache: renaming cache item "/root/.cache/rclone/vfs/remote-samba/" to be canonical "/root/.cache/rclone/vfs/remote-samba"

2024/08/07 22:41:04 DEBUG : Creating backend with remote "/root/.cache/rclone/vfsMeta/remote-samba/"

2024/08/07 22:41:04 DEBUG : fs cache: renaming cache item "/root/.cache/rclone/vfsMeta/remote-samba/" to be canonical "/root/.cache/rclone/vfsMeta/remote-samba"

2024/08/07 22:41:04 INFO : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)

2024/08/07 22:41:04 NOTICE: NFS Server running at [::]:6666

Can you try the latest beta? Lots of fixes went into serve nfs recently.

Actually I don't think the fixes got merged yet, can you try this?

v1.68.0-beta.8062.a5e84274e.fix-nfs-handles on branch fix-nfs-handles

thanks for the quick response

I installed that fix-nfs-handles beta but I'm still seeing the same error.
On rclone side I can see this log message when trying to do the mount -t nfs from the client

2024/08/08 09:34:10 DEBUG : [NFS DEBUG] request: RPC #337324203 (nfs.Null)
2024/08/08 09:34:10 DEBUG : [NFS DEBUG] request: RPC #354101419 (nfs.GetAttr)
2024/08/08 09:34:10 DEBUG : nfs: FromHandle: handle=
2024/08/08 09:34:10 DEBUG : nfs: >FromHandle: path=[], err=invalid UUID (got 0 bytes)

Hope it helps

You definitely need mountport= in your mount options and rclone does not support nfs v4.

Try this with the new binary.

mount -t nfs -o port=$PORT,mountport=$PORT,tcp $HOSTNAME:/ path/to/mountpoint

That is from rclone serve nfs --help with the new binary.

Also try rclone nfsmount which runs a serve nfs and mounts it in one step to see if that works. You can use -vv and I think it will show the mount command (if not you can get it with ps)

Thank you for the detailed response
I tried with the new binary and now it works, I can mount it without errors.

Now I have a different but unrelated problem, speed. But I'll investigate that separately.
Thanks

1 Like

Btw I've just merged these changes to master so they are now in the current beta.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.