nfs mount problem

Brian Wootton Brian.Meg at btinternet.com
Fri Sep 24 11:13:46 UTC 2010


On 24/09/10 05:15, kubuntu-users-request at lists.ubuntu.com wrote:
> Subject:
> Re: nfs mount problem
> From:
> Tom H <tomh0665 at gmail.com>
> Date:
> Thu, 23 Sep 2010 15:47:16 -0400
>
> To:
> kubuntu-users at lists.ubuntu.com
>
>
> On Thu, Sep 23, 2010 at 2:41 PM, Brian Wootton<Brian.Meg at btinternet.com>  wrote:
>
>    
>>>>>>> >>>>  >>    I can't for the life me get an nfs mount to work,
>>>>>>> >>>>  >>    this is the entry I've put in /etc/exports:
>>>>>>> >>>>  >>
>>>>>>> >>>>  >>    /pub/brian      meg(ro,insecure,all_squash,sync,no_subtree_check)
>>>>>>> >>>>  >>
>>>>>>> >>>>  >>    which at least generates no errors from the server nfs daemon, but
>>>>>>> >>>>  >>    all I get from the mount command on the client is 'access denied by
>>>>>>> >>>>  >>    server'. mutter, mutter.
>>>>>>> >>>>  >>    I've tried ip addresses, I've tried a multitude of differnet options(in-
>>>>>>> >>>>  >>    cluding none), makes no difference, still get access denied by server
>>>>>>> >>>>  >>    on the client machine.
>>>>>>> >>>>  >>       I've read 'man exports' until my eyes water. I found some useful
>>>>>>> >>>>  >>    howtos on google, but still 'access denied by server'.
>>>>>>> >>>>  >>       If any-one has a magic entry for me to try I'd be glad to try it, or any
>>>>>>> >>>>  >>    helpful hints.
>>>>>>>                
>>>>> >>>>
>>>>> >>>  >
>>>>> >>>  >    Please give us some extra information (if it's there), like:
>>>>> >>>  >    - Command used to mount the share
>>>>> >>>  >    - Other lines in /etc/exports
>>>>> >>>  >    - Changes you did in other files (/etc/default/nfs-common, /etc/idmap.conf)
>>>>> >>>  >    - Is the portmap daemon running?
>>>>> >>>  >    - Do you have nfs-common installed on the client and nfs-kernel-server on the
>>>>> >>>  >    server?
>>>>> >>>  >    - What does 'showmount -e' on the server tell you?
>>>>> >>>  >
>>>>> >>>  >    I see you use the insecure option? The only use of that option that I know of
>>>>> >>>  >    is the NFS kioslave, but that will not work in your case because your share is
>>>>> >>>  >    a subdirectory. [1]
>>>>> >>>  >
>>>>> >>>  >    [1]https://bugs.launchpad.net/bugs/385514
>>>>>            
>>>> >>>
>>>>          
>>> >>  I just assumed that it might be an nfsv4 "root fs" problem but this is
>>> >>  a more comprehensive and "holistic" approach.
>>> >>
>>> >>  I would add "rpcinfo -p" on the server.
>>> >>
>>> >>  The "insecure" option is needed if you have OS X clients.
>>> >>
>>>        
>> >
>> >  This is a cut/paste from konsole
>> >  ------------------------------------------------------------------------------------
>> >
>>      
>>> >>  % sudo /etc/init.d/nfs-kernel-server start
>>> >>  [sudo] password for brian:
>>> >>     * Exporting directories for NFS kernel daemon...                                                                                                               [ OK ]
>>> >>     * Starting NFS kernel daemon                                                                                                                                   [ OK ]
>>> >>  % showmount -e
>>> >>  Export list for meg:
>>> >>  /pub/brian meg
>>> >>  % ps aux | grep portmap
>>> >>  daemon     667  0.0  0.0   8256   616 ?        Ss   11:04   0:00 portmap
>>> >>  brian     4585  0.0  0.0   7632   992 pts/1    S+   19:23   0:00 grep --color=auto portmap
>>> >>  % ls -ls /pub
>>> >>  total 4
>>> >>  4 drwxr-xr-x 2 brian brian 4096 2010-09-18 11:14 brian
>>> >>
>>> >>  % more /etc/exports
>>> >>  # /etc/exports: the access control list for filesystems which may be exported
>>> >>  #               to NFS clients.  See unfsd(8).
>>> >>  /pub/brian      meg(ro,insecure,all_squash,sync,no_subtree_check)
>>> >>  ---------------------------------------------------------------------------
>>> >>
>>>        
>> >  /pub is owned by root.
>> >
>> >  My client machine is a laptop running the latest Mandriva Spring release
>> >  and I have used KNetAttach as well as 'mount -t nfs meg:/pub/brian
>> >  also used IP address here - all no go.
>> >    I think it has to be the arguments to the entry in etc/exports, but
>> >  I've tried
>> >  so many different combinations now I'm utterly confused. I don't like or
>> >  want 'insecure'.
>> >  I'm starting the nfs server manually for the moment, when I can get it all
>> >  working I'll put it the boot-up start list.
>>      
> I still think that it might be an nfsv4 issue.
>
> Please add "fsid=0" to your export options (just in case but it should
> be the default here) and then use "mount -t nfs meg:/
> /your/mount/point"
>
> The "insecure" isn't as bad as it sounds. It simply allows nfs to use
> non-privileged ports.
>    
% more /etc/exports
# /etc/exports: the access control list for filesystems which may be 
exported
#               to NFS clients.  See unfsd(8).
/pub/brian      nutmeg(rw,subtree_check)

Got it all working properly with the above entry in meg(the server)

su% mount -t nfs meg:/pub/brian /pub/brian

and with the above command in meg(the client).

There were 3 different stupidities on my part,
1.wrong ip entries in the router which confused the 2 machines
    and me.
2.needed to change back  the default  to 'subtree_check' in exports
3.read the man mount command more carefully and
   get the syntax right.
When I got all 3 of these right _at the same time_ it all worked like
a dream. Only the directory /pub/brian is exported and only brian
can write to it - so I am now happy.
thanks for all your suggestions
brian




>
>    





More information about the kubuntu-users mailing list