Skip to content

“rclone nfsmount” uses mount_nfs incompatible with BSD Unix #8578

Closed

Description

@ghollf

The associated forum post URL from https://forum.rclone.org

https://forum.rclone.org/t/rclone-mount-on-openbsd-supported/51387

What is the problem you are having with rclone?

"rclone nfsmount" raises error "mount_nfs: -o mountport: option not supported"

What is your rclone version (output from rclone version)

rclone v1.69.3

  • os/version: openbsd 7.7 (64 bit)
  • os/kernel: 7.7 (amd64)
  • os/type: openbsd
  • os/arch: amd64
  • go/version: go1.24.3
  • go/linking: static
  • go/tags: none

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

  • os/version: openbsd 7.7 (64 bit)

Which cloud storage system are you using? (e.g. Google Drive)

OneDrive

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

rclone nfsmount USR:DIR /home/onedrive/DIR

A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)

2025/05/31 23:17:00 DEBUG : rclone: Version "v1.69.1-DEV" starting with parameters ["rclone" "nfsmount" "USR:DIR" "/home/onedrive/DIR" "-vv"]
2025/05/31 23:17:00 DEBUG : Creating backend with remote "USR:DIR"
2025/05/31 23:17:00 DEBUG : Using config file from "/home/onedrive/.config/rclone/rclone.conf"
2025/05/31 23:17:01 DEBUG : OneDrive root 'USR': Next delta token is: NDslMjM0OyUyMzE7MzsyYjA4ZWNjMC1kNjE0LTRjNWUtYWQzYy0yNjk3Mzc2OThkYjQ7NjM4ODQzMjMwMTgwOTMwMDAwOzY2ODg4OTcxOTslMjM7JTIzOyUyMzA7JTIz
2025/05/31 23:17:01 NOTICE: OneDrive root 'USR': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
2025/05/31 23:17:01 WARNING: context.Background: NFS writes don't work without a cache, the filesystem will be served read-only
2025/05/31 23:17:01 DEBUG : nfs: Starting memory handle cache
2025/05/31 23:17:01 DEBUG : Running mount command: ["mount" "-o" "port=33945" "-o" "mountport=33945" "-o" "tcp" "localhost:USR DIR" "/home/onedrive/DIR"]
2025/05/31 23:17:01 NOTICE: NFS Server running at 127.0.0.1:33945
2025/05/31 23:17:01 CRITICAL: Fatal error: failed to mount FUSE fs: mount_nfs: -o mountport: option not supported: failed to mount NFS volume: exit status 1

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Activity

  1. ncw commented on Jun 4, 2025

    @ncw
    Member

    @ghollf this code hasn't been tested on *BSD I think.

    If you or anyone would like to have a go at fixing this then the code is here

    // Options
    options := []string{
    "-o", fmt.Sprintf("port=%s", port),
    "-o", fmt.Sprintf("mountport=%s", port),
    "-o", "tcp",
    }

    It would need a bit of if runtime.GOOS == "openbsd" {

  2. hjicks commented on Apr 24, 2026

    @hjicks

    Hi there,
    apparently OpenBSD lacks mountport and it would get it from portmap. i have the did following to register rclone's server:

    # define a storage first, we use the name and type 'local'
    $ rclone config
    <snip>
    $ rclone serve nfs --addr localhost:<PORT> local:/
    # make sure no service is running
    $ doas rcctl stop nfsd portmap
    $ doas pkill -9 mountd # you can't stop mountd via rcctl(8)
    # start portmap again and register rclone's server
    $ doas rcctl -f start portmap
    $ doas rpcinfo -s nfs 3 <PORT>
    $ doas rpcinfo -s mountd 3 <PORT>

    replace <PORT> with one you gave to --addr.
    Note that while that can be 2049, you gotta either run rclone as root OR tune sysctl(8) values in securelevel 0. but that doesn't matter much.

    Now, for mounting it:

    $ doas mount_nfs -T localhost:/ /mnt/
    mount_nfs: can't access /: Authentication error

    A quick peek at wireshark shows that last packet we are getting with the following data:

    Frame 10: 116 bytes on wire (928 bits), 116 bytes captured (928 bits) on interface lo0, id 0
    Null/Loopback
    Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
    Transmission Control Protocol, Src Port: 2049, Dst Port: 715, Seq: 1, Ack: 113, Len: 60
    Remote Procedure Call, Type:Reply XID:0x26f4865b
        Fragment header: Last fragment, 56 bytes
        XID: 0x26f4865b (653559387)
        Message Type: Reply (1)
        [Program: MOUNT (100005)]
        [Program Version: 3]
        [Procedure: MNT (1)]
        Reply State: accepted (0)
        [This is a reply to a request in frame 8]
        [Time from request: 0.000160000 seconds]
        Verifier
        Accept State: RPC executed successfully (0)
    Mount Service
        [Program Version: 3]
        [V3 Procedure: MNT (1)]
        Status: OK (0)
        fhandle
        Flavors: 1
        Flavor: AUTH_NULL (0)
    

    Now i'm not sure if any of BSDs support AUTH_NULL. I dont see any code for neither OpenBSD nor NetBSD about it and quick greps in FreeBSD and Dragonfly sources didnt got me an answer, but i assume they lack it as well.

    While we can add support for AUTH_NULL to NFS client in BSD kernels, that effort has to be shared among BSDs, which might not be very easy and requires a bit of help from others.

    Currently only AUTH_UNIX seems to be commonly available across all of them.

    If anyone with FreeBSD/NetBSD/Dragonfly can check if they can mount rclone's nfs server, that'd be wonderful.

  3. ncw commented on Apr 24, 2026

    @ncw
    Member

    I just had a quick grep through the github.com/willscott/go-nfs source code (the library we use) and I don't think it supports anything other than Null Auth :-(

  4. added a commit that references this issue on Jul 30, 2026
    47fb3c7
  5. added 2 commits that reference this issue on Oct 6, 2026
    f1bdf31
    9b242cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions