LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Linux NFS Server IP address changed (http://www.linuxquestions.org/questions/linux-server-73/linux-nfs-server-ip-address-changed-743017/)

dsmatharu 07-27-2009 01:59 AM

Linux NFS Server IP address changed
 
Had to change IP address for NFS Server and clients.

The Server & Client are able to ping each other.
However the mount command times out.

On investigation from client side :

$ showmount -a <nfs-server>
All mount points on <nfs-server>:
<old ip of server>:/backup

have attempted exportfs -ra and restart
but the above old ip remains.

No clue how to update this entry on the nfs-server

Thanks for your help.

catkin 07-27-2009 02:40 AM

Hello dsmatharu

What's in your /etc/exports file? If it includes host names rather than IP addresses then what happens if you run
Code:

nslookup <host name>
for each <host name> in the exports file?

If the name resolution service on your system is configured to use /etc/hosts then the contents of your /etc/hosts file may need updating to match your IP changes.

Best

Charles

dsmatharu 07-27-2009 03:21 AM

Hello Charles,

Thanks for your reply.

/etc/hosts have already been updated.
nslookup fails with "No Answer"

It seems that the NFS Server has memorized the earlier ip
somewhere that needs to be updated.

Updating the /etc/exportfs with new IPs instead of hostname
and doing a "exportfs -r" did not help either.

Regards,
dsmatharu

catkin 07-27-2009 03:54 AM

Hello dsmatharu :)
Quote:

Originally Posted by dsmatharu (Post 3621387)
/etc/hosts have already been updated.
nslookup fails with "No Answer"

"No Answer"? Does that mean it couldn't contact a name resolving service and timed out, or that it got an answer which was that there is no such name? This could be a "red herring" if the NFS server is not using the same name resolution mechanisms as nslookup.

Quote:

Originally Posted by dsmatharu (Post 3621387)
It seems that the NFS Server has memorized the earlier ip somewhere that needs to be updated.

Updating the /etc/exportfs with new IPs instead of hostname
and doing a "exportfs -r" did not help either.

That's a typo, /etc/exportfs instead of /etc/exports?

The persistent IP addresses could be in the kernel tables. Try flushing and reloading by
Code:

exportfs -f
exportfs -a

What's in your rmtab file (maybe /var/lib/nfs/rmtab)?

Possible to reboot?

Best

Charles

dsmatharu 07-27-2009 03:55 AM

Update : Done for now
 
Removed the earlier entry, then added again.

Didn't work imediately

After sometime tried mount and it worked.

Strange thing is that now the "showmount -a <nfs-server>
shows two entries ( old and new ip both )

Regards,

dsmatharu 07-27-2009 04:18 AM

/var/lib/nfs/rmtab have both entries that i see with "showmount -a <nfs-server>"
Now atleast am able to appreciate where those came from !!!

Is it recommended to edit rmtab ?

Will keep a watch. Hopefully gets updated on nfs restart or a reboot !!!

Regards,

catkin 07-27-2009 06:28 AM

rmtab easily gets out of date because it relies on the NFS clients to inform the NFS server that they have unmounted the NFS file system. If the NFS server IP was changed while an NFS client had one of its exports mounted then the client would not know about the new IP address and would try to notify the old address.

If you are certain that an entry in rmtab is invalid you can delete it.


All times are GMT -5. The time now is 11:08 PM.