What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

NFS mounting issues

pedeb04

Occasional Visitor
When I try to configure backupmon to backup to a Network-NFS I get an error.
My test confige is:
(1) : Test Target Media Type : Network-NFS

(2) : Test Target Username : admin

(3) : Test Target Password : admin

(4) : Test Target NFS Path : 192.168.50.46:/srv/nfsshared

|--- Test NFS Mount Options : nfsvers=3,nolock,_netdev,rsize=8192,wsize=8192

(5) : Test Target Backup Mount Point : /tmp/mnt/testbackups

(6) : Test Target Dir Path : /router/test-backup

(7) : Test CIFS/SMB Version : N/A

My message is bad file descriptor.
I also tried without the NFS Mount options, bad file descriptor
I can mount from the server nfs share from my linux desktop ok.
my server /etc/exports
/srv/nfsshared 192.168.50.0/24(rw,root_squash)

INFO: Backup Target (192.168.50.46) reachable via PING.

INFO: External test drive mount point exists. Found under: /tmp/mnt/testbackups

mount: RPC: Remote system error - Connection timed out

mount: mounting 192.168.50.46:/srv/nfsshared on /tmp/mnt/testbackups failed: Bad file descriptor

WARNING: Unable to mount to external NFS network drive. Retrying...

mount: RPC: Remote system error - Connection timed out

mount: mounting 192.168.50.46:/srv/nfsshared on /tmp/mnt/testbackups failed: Bad file descriptor

WARNING: Unable to mount to external NFS network drive. Retrying...

mount: RPC: Remote system error - Connection timed out

mount: mounting 192.168.50.46:/srv/nfsshared on /tmp/mnt/testbackups failed: Bad file descriptor

WARNING: Unable to mount to external NFS network drive. Retrying...

ERROR: Unable to mount to external NFS network drive [/tmp/mnt/testbackups]. Please check your configuration. Exiting.

Press any key to acknowledge...
 
I am thinking that the root_squash directive on your server might be an issue. The router is trying to connect as user root which your server will change to an anonymous user. If your permissions on the server do not allow for an anonymous user it may be the reason it's failing.

It's just a thought as I'm no expert with NFS.
 
Last edited:
Following up on this while doing some googling, you could try modifying your exports file on your server;

Code:
/srv/nfsshared 192.168.50.0/24(rw,root_squash,anonuid=xxxx,anongid=xxxx)

Where xxxx is the actual uid and gid you want mapped when a root user mounts the share.

The anonuid and anongid directives work alongside the root_squash directive by changing the uid and gid of the anonymous user from the system default uid/gid to the specified uid/gid.
 
I tried changing the exports file on the server to
Code:
/srv/nfsshared 192.168.50.0/24(rw,no_root_squash)
Still error bad file descriptor
Then because I am the owner of /svr/nfsshared ie uid=1000 and gid=1000
I tried the following
Code:
/srv/nfsshared 192.168.50.0/24(rw,root_squash,anonuid=1000,anongid=1000)
Still error bad file descriptor
 
OK, so I played around a bit this morning with this. I had to stop as my daughter is home this week and she remote works, so she needs the internet.

So, first, you have not listed the router or firmware version you are using, can you please add this information to your signature. It does help.

On my RTAX86U-Pro, the manual means of setting up an NFS share has changed from my previous RTAX88U. You need to load a few more kernel modules now and create a directory. I almost had it down, then my daughter had to go to work. I'll finish testing tonight or tomorrow morning.

In the meantime, if you have not done so, from the GUI, go to USB Applications -> NFS Exports, and turn on NFS. That should load the required kernel modules and the mountd daemon, if not already done so.

Also, in your mount statement, you may need to add the option nfsvers=3 as the router does not support NFSv4.

@Viktor Jaep - On my RT-AX86U-Pro, it seems that for NFS to work, without turning on NFS in the GUI, you now need to;

1. Create directory /var/lib/nfs -> This is new
2. Load the following kernel modules nfs nfsv3 nfs lockd sunrpc exportfs Not just nfs, as before
3. Then you can start the daemon -> /usr/sbin/mountd -N 2.

I'll try to finish testing tonight or tomarrow (when I can get the internet among a house full of guests this week.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top