For those, here on the internet, asking themselves what is this f*cking `rpc failed: 2` while mounting an NFS, i’ts possible that teh response is here :
Your NFS client, trying to mount the NFS share will use RPC to communicate with the serveur, il will go like :
> PORTMAP GETPORT(Program: NFS, Version: 3, Proto: TCP)
< PORTMAP Port: 2049
> PORTMAP GETPORT(Program: MOUNT, Version: 3, Proto: TCP)
< PORTMAP Port 49066
> MOUNT MNT(Program Version: 3, Path: /srv/nfsroot/ )
< MOUNT Reply error 2, "remote can't support version #", Program Version (Minimum): 1, Program Version (Maximum): 2
You can see that the response is "remote can't support version #" and we should have found this solution in the RFC 1831 (RPCv2) stating :
Given that a call message was accepted, the following is the status
of an attempt to call a remote procedure.
enum accept_stat {
SUCCESS = 0, /* RPC executed successfully */
PROG_UNAVAIL = 1, /* remote hasn't exported program */
PROG_MISMATCH = 2, /* remote can't support version # */
PROC_UNAVAIL = 3, /* program can't support procedure */
GARBAGE_ARGS = 4, /* procedure can't decode params */
SYSTEM_ERR = 5 /* errors like memory allocation failure */
};
So the problem is you client is asking for a NFS version greater that your server runs … but if your server is running NFS v3, check a `ps aux | grep [r]pc.mountd` for :
root 1411 0.0 0.0 18808 1036 ? Ss Apr15 0:00 /usr/sbin/rpc.mountd –manage-gids –no-nfs-version 3
Did you catch the –no-nfs-version 3 ? If your server is compiled with NFSv3 support, drop the –no-nfs-version 3 in your configuration and it should work !
Enjoy !
THX!
Hey thanks for your post. My diskless workstations all of a sudden just stopped working and this was the issue. For anyone running Unbutu check out /etc/init.d/nfs-kernel-server on your NFS server machine. On or around line 104 you’ll see the following:
RPCMOUNTDOPTS=”$RPCMOUNTDOPTS –no-nfs-version 3″
Simply change it to:
RPCMOUNTDOPTS=”$RPCMOUNTDOPTS ” #–no-nfs-version 3″
Thanks guys.
Many thanks…. very useful
Thanks !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Hi, thanks man!
Your post was right on the money and helped my solved my problem. Good background info too.
THANKS :)
Thanks! You also helped me!
It seems that “rpcinfo” binary has disappeared for some reason.
In my case I commented those lines:
/etc/init.d/nfs-kernel-server:
# $PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
# RPCMOUNTDOPTS=”$RPCMOUNTDOPTS –no-nfs-version 3″