Author Topic: nfs client query with server  (Read 3705 times)

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
nfs client query with server
« on: February 24, 2016, 01:59:26 PM »
Good afternoon all!  I am attempting to query an NFS server (which is configured correctly without problems from a non-TC client), but am running into some bizarre behavior.  On the client I attempt to run the 'showmount' command, but get the following error:

$ showmount -e server
clnt_create: RPC: Unknown host

I get the same thing if I attempt to query the server by IP address.  Looking online, I could only find solutions that say to adjust the /etc/hosts file, but after modifying that file, nothing changes.  I've restarted the nfs-client (/usr/local/etc/init.d/nfs-client restart) afterwareds, but no difference.  I can verify that rpcbind and rpc.statd are running and show that I have several 'portmapper' and 'status' instances when running 'rpcinfo -p' on the client.  I can also successfully mount NFS shares on the TC machine, just not query the server for the available shares.  Any help would greatly be appreciated!

Thanks,
Dave

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 681
Re: nfs client query with server
« Reply #1 on: February 25, 2016, 12:58:09 AM »
How do you config the /etc/exports ?

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: nfs client query with server
« Reply #2 on: February 25, 2016, 06:11:55 AM »
Good morning Patrikg, since this is a client there shouldn't be an /etc/exports file right?

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: nfs client query with server
« Reply #3 on: February 25, 2016, 07:23:55 AM »
Can anyone else show the results of an 'rpcinfo -p localhost' on a *client* nfs machine.  I can see that the non-working TC client doesn't have any entries for nlockmgr, but the working non-TC client does have several entries for this.

Thanks,
Dave

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 681
Re: nfs client query with server
« Reply #4 on: February 25, 2016, 07:51:28 AM »
Maybe you right.. but what...let say you have this diffrent lines in exports.

/home/patrik/picore *(rw,sync,no_root_squash,no_subtree_check)
/home/patrik/picore server(rw,sync,no_root_squash,no_subtree_check)
/home/patrik/picore 192.168.0.0/24(rw,sync,no_root_squash,no_subtree_check)

There are some different lookups for the server.

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: nfs client query with server
« Reply #5 on: February 25, 2016, 08:05:23 AM »
Thanks for the continued help patrikg.  I just checked the working NFS client and there isn't an /etc/exports file.  Although this is a Linux Mint machine so the file could be somewhere else (although nothing turned up with a 'find /etc -name exports' call).  I don't think that is the problem.  What do you get on a working NFS client by issuing an 'rpcinfo -p localhost'?

Thanks,
Dave

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11292
Re: nfs client query with server
« Reply #6 on: February 25, 2016, 08:24:35 AM »
Hi wysiwyg
Only the server needs an exports file. Do you have  iana-etc.tcz  installed?
Quote
Can anyone else show the results of an 'rpcinfo -p localhost' on a *client* nfs machine.
Code: [Select]
tc@box:~/guilib/picmanip$ rpcinfo -p localhost
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  39239  status
    100024    1   tcp  39852  status
    100005    1   udp  45661  mountd
    100005    1   tcp  56641  mountd
    100005    2   udp  45661  mountd
    100005    2   tcp  56641  mountd
    100005    3   udp  45661  mountd
    100005    3   tcp  56641  mountd
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100021    1   udp  46251  nlockmgr
    100021    3   udp  46251  nlockmgr
    100021    4   udp  46251  nlockmgr
    100021    1   tcp  60316  nlockmgr
    100021    3   tcp  60316  nlockmgr
    100021    4   tcp  60316  nlockmgr
tc@box:~/guilib/picmanip$ showmount -e localhost

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: nfs client query with server
« Reply #7 on: February 25, 2016, 08:38:49 AM »
Hey Rich!  I figured that the exports file was only required for the server.  And I quickly looked for that package, but it isn't available for x86_64 repo.  I d/l'ed from the 32bit repo (since it's just text files), but it should be added to the 64bit repo too.  Upon installing that package, it resolved the issue.  This may also may need to be added as a dependency for the nfs-utils.tcz package.

Thanks,
Dave

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: nfs client query with server
« Reply #8 on: February 25, 2016, 08:48:21 AM »
I do have another question.  Is there a way to get the nfs-client to start automatically during bootup?  Currently I have to manually start it every time the computer is rebooted.

Thanks,
Dave

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11292
Re: nfs client query with server
« Reply #9 on: February 25, 2016, 08:56:47 AM »
Hi wysiwyg
If you are running a GUI you could place the command in a file and save it to the  ~/.X.d  directory.

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: nfs client query with server
« Reply #10 on: February 25, 2016, 09:01:38 AM »
Got it!  Thanks again Rich!

Dave

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11292
Re: nfs client query with server
« Reply #11 on: February 25, 2016, 09:09:43 AM »
Hi wysiwyg
Quote
And I quickly looked for that package, but it isn't available for x86_64 repo.  I d/l'ed from the 32bit repo (since it's just text files), but it should be added to the 64bit repo too.  Upon installing that package, it resolved the issue.  This may also may need to be added as a dependency for the nfs-utils.tcz package.
It should probably be added as a dependency, or at least a noted added to the info file that it may be required.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 681
Re: nfs client query with server
« Reply #12 on: February 25, 2016, 02:26:04 PM »
Beware of the Linux Mint hacked iso.
http://blog.linuxmint.com/?p=2994

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: nfs client query with server
« Reply #13 on: February 25, 2016, 02:29:14 PM »
Thanks for the tip patrikg!  Fortunately I am running version 16 of that OS (for a year or so).  The hacked versions were 17.3+.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14630
Re: nfs client query with server
« Reply #14 on: February 25, 2016, 09:21:01 PM »
iana-etc copied to x86_64 repo - comment added to nfs-utils info file.