LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 07-27-2009, 02:59 AM   #1
dsmatharu
LQ Newbie
 
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17

Rep: Reputation: 0
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.
 
Old 07-27-2009, 03:40 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
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
 
Old 07-27-2009, 04:21 AM   #3
dsmatharu
LQ Newbie
 
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
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
 
Old 07-27-2009, 04:54 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Hello dsmatharu
Quote:
Originally Posted by dsmatharu View Post
/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 View Post
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
 
Old 07-27-2009, 04:55 AM   #5
dsmatharu
LQ Newbie
 
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
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,
 
Old 07-27-2009, 05:18 AM   #6
dsmatharu
LQ Newbie
 
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
/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,
 
Old 07-27-2009, 07:28 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
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.
 
  


Reply

Tags
ip, linux, nfs, server


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Run your NFS server in the user address space with NFS-GANESHA LXer Syndicated Linux News 0 11-27-2008 05:40 AM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 06:16 AM
FC 1 Samba server - IP address changed on its own duality Fedora 4 09-01-2004 11:46 AM
nfs server reported service unavailable: Address already in use Gargomel7 Linux - Networking 0 09-16-2003 12:10 PM
changed local net address nfs is hanging at boot spooge Linux - Networking 2 08-20-2003 02:37 PM


All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration