mount -t nfs4 fails, but mount -t nfs succeeds [SOLVED]

Ed Greshko Ed.Greshko at greshko.com
Fri Apr 27 08:10:21 UTC 2012


On 04/27/2012 03:57 PM, Jonathan Ryshpan wrote:
> What a lot of comments!  This deserves a reply at length.  I state a lot
> of things below as fact.  But snce I'm still pretty ignorant about nfs4
> some of them may not be true.  Those who know please put in corrections;
> and we may arrive at the truth about something that's still pretty murky
> to most people.  Comments on particular postings follow.
>
> Nfs4 exports a tree of directories from a server to a client.  The root
> of the tree must be the root of the filesystem on the host and the
> line containing it in /etc/exports must contain the option fsid=root
> (alternately fsid=0).  If such a line appears in /etc/exports then any
> directory on the server can be exported, and the client can mount any
> directory appearing there.  Nfs4 works through a firewall, provided
> that port port 2049/tcp is opened; nfs3 requires that the firewall be
> (completely) disabled.  "showmount -e <host>"  doesn't work through a
> firewall, it appears to be associated with nfs3.  There is no utility
> like it that works through port 2049/tcp; administrators have to know
> which files are available via the nfs4 port from which servers.
>
> There's an intro to setting up nfs4 (link from Ed Greshko) that states
> that the fsid=0 option can be applied to any directory, and then other
> directories to be exported should be (bound to) subdirectories of this
> one; but I haven't been able to get it to work.  Funky problems:
>
> 1) If the client has an actual name or exact IP address in /etc/exports,
> like this line:
>         /nfs4           amito:/(rw,fsid=0,...)
> or
>         /nfs4           192.168.2.5(rw,fsid=0,...)
> mount attempts fail with the message "No such file or directory".  
>
> 2)If the line in /etc/exports has a form like
>         /nfs4           192.168.0.0/24(rw,fsid=0,...)
> mount attempts fail with the message "access denied by server".
> There's probably some problem with the options in the parentheses,
> but I've tried them all, starting with the exact ones in the intro
> without success.  On the other hand, exporting the actual root
>         /               amito:(rw,fsid=0,..)
> mounts fine.  
>
> I hope to be enlightened.

A few things....

First, it may be helpful for you to post the contents of your server's /etc/exports
and /etc/fstab.

Second, have you modified your idmap.conf such that you have identical Domain =
lines?  Note that after modification the nfs-idmap.service needs to be restarted.


-- 
Never be afraid to laugh at yourself, after all, you could be missing out on the joke
of the century. -- Dame Edna Everage


More information about the users mailing list