NFS export not working

I currently have this in my server's /etc/exports
Code:
/ -alldirs -maproot=root  fastcat

the relevant section of /etc/rc.conf is
Code:
nfs_server_enable="YES"
nfs_client_enable="YES"
rpcbind_enable="YES"
mountd_enable="YES"
mountd_flags="-r"

But my client (fastcat) gets "access denied", and showmount -e momcat is blank

On momcat (the server) showmount -e is also blank, and /var/log/messages says it doesn't like the only line in /etc/exports, though it doesn't say why not.

I've tried using an ip range and mask, and a subset of / in case 11.3 doesn't like exporting root (iirc, it worked fine under 10.2) but have had no joy. I'm lost.
 
There is nothing syntax-wise wrong with /etc/exports. You should probably dump it to make sure there are no funny characters:
Code:
# od -c /etc/exports
0000000    /       -   a   l   l   d   i   r   s       -   m   a   p   r
0000020    o   o   t   =   r   o   o   t       f   a   s   t   c   a   t
0000040   \n                                                            
0000041
Make sure you can ping fastcat from your NFS server.
There's a few other daemons you should probably start on the server:
Code:
mountd_enable=YES
mountd_flags="-r"
nfs_client_enable="YES"
nfs_server_enable="YES"
nfscbd_enable="YES"
nfsuserd_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
rpcbind_enable="YES"
What happens when you restart mountd:
Code:
service mountd restart
 
I may have got a hint from the boot log this morning, though I've not yet found anything in the docs about what it means or how to fix it: fileid mismatch.
 
Apparently my nsd isn't resolving names, though only the reverse file shows errors. That doesn't seem to be connected very much with the nfs problem, though.
 
For a quick work-around, put the host names in /etc/hosts on the server and the client and make sure the resolvers use it:
Code:
$ grep hosts /etc/nsswitch.conf
hosts: files dns
 
I try to avoid depending on hosts because I inevitably get them out of sync.

But I did manage to fix the problem, though I can't now remember what I did (aged brain). I'll have to review before I can report on the solution.
 
Back
Top