LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NFS mounting problem (https://www.linuxquestions.org/questions/linux-newbie-8/nfs-mounting-problem-659605/)

alirezan1 07-31-2008 06:29 PM

NFS mounting problem
 
Hi guys,

I have two servers that are connected to my main network (call them Serv 1 and Serv 2). I have a client that's also connected to the same network (call it Client).

I bind a static IP to an existing interface on my primary server (Serv 1) and use that IP address to mount NFS shares by the client. I can read/write/modify and all with no problem.

But say the primary server (Serv1) fails to work and I have to switch to Serv 2. I take the Serv 1 offline and bind the same static IP address to serv 2 and start NFS on that. Although I can ping the serv2 from the client, I can't use the NFS shares (which are identical in every way to the shares on the serv 1). It just gets stuck when I try to access NFS shares on Serv2. Does anybody know what's wrong? Here's the ipcinfor -p output from serv2 that I thought might be useful:

root /home/alireza Localhost# rpcinfo -p

program vers proto port

100000 2 tcp 111 portmapper

100000 2 udp 111 portmapper

100003 2 udp 2049 nfs

100003 3 udp 2049 nfs

100021 1 udp 32790 nlockmgr

100021 3 udp 32790 nlockmgr

100021 4 udp 32790 nlockmgr

100003 2 tcp 2049 nfs

100003 3 tcp 2049 nfs

100021 1 tcp 48599 nlockmgr

100021 3 tcp 48599 nlockmgr

100021 4 tcp 48599 nlockmgr

100005 1 udp 855 mountd

100005 1 tcp 858 mountd

100005 2 udp 855 mountd

100005 2 tcp 858 mountd

100005 3 udp 855 mountd

100005 3 tcp 858 mountd

root /home/alireza Localhost# service nfs status

rpc.mountd (pid 17639) is running...

nfsd (pid 17635 17634 17633 17632 17631 17630 17629 17628) is running...



Thanks !

onebuck 07-31-2008 10:36 PM

Hi,

My crystal ball is cracked so everything is fuzzy! So to SWAG;

You should check your '/etc/hosts', '/etc/hosts.allow', and '/etc/hosts.deny'. Don't forget your '/etc/exports' file. Whenever you want to change be sure to update the exportfs.

Code:

excerpt from 'man exportfs';
NAME
      exportfs - maintain list of NFS exported file systems

SYNOPSIS
      /usr/sbin/exportfs [-avi] [-o options,..] [client:/path ..]
      /usr/sbin/exportfs -r [-v]
      /usr/sbin/exportfs [-av] -u [client:/path ..]
      /usr/sbin/exportfs [-v]
      /usr/sbin/exportfs -f

DESCRIPTION
      The  exportfs command is used to maintain the current table of exported
      file systems for NFS. This list  is  kept  in  a  separate  file  named
      /var/lib/nfs/xtab  which  is read by mountd when a remote host requests
      access to mount a file tree, and parts of the list which are active are
      kept in the kernel's export table.

      Normally  this  xtab file is initialized with the list of all file sys-
      tems named in /etc/exports by invoking exportfs -a.


sunils1973 07-31-2008 11:46 PM

run exportfs -rv

jay73 07-31-2008 11:59 PM

Try showmount on the server, to see what is going on.


All times are GMT -5. The time now is 01:53 PM.