LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 10-21-2009, 05:51 PM   #1
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155
Blog Entries: 2

Rep: Reputation: 15
NFS server problem


Hi All,

I have centos 5.3 linux install and NFS shared from here to two servers. It was working fine and all of sudden it is unmounted. Again i tired to mount but it says servers down messages eventhough server is up with network connectivity.

I started nfs and portmap in server which are all running in the server

[root@spnas1 ~]# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 749 status
100024 1 tcp 752 status
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 37536 nlockmgr
100021 3 udp 37536 nlockmgr
100021 4 udp 37536 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 41789 nlockmgr
100021 3 tcp 41789 nlockmgr
100021 4 tcp 41789 nlockmgr
100005 1 udp 966 mountd
100005 1 tcp 969 mountd
100005 2 udp 966 mountd
100005 2 tcp 969 mountd
100005 3 udp 966 mountd
100005 3 tcp 969 mountd

when mount from nfs , it says the following messages , In addition to this i have added this entry in /etc/fstab

[root@spdev1 ~]# mount nfsserver:/data1 /sharedData/
mount to NFS server 'nfsserver' failed: server is down.

Any help would be highly appreciated!!
Thanks
 
Old 10-21-2009, 06:02 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
The name of your NFS server is spnas1, isn't it? Not nfsserver? Or is this one of those n hostname -> single ip gigs?

Code:
host nfsserver
Code:
ping nfsserver
?

Which ports are open?
Code:
nmap nfsserver

Are you able to mount an NFS file system on localhost (that is, can you mount an NFS filesystem locally on the NFS server?)

Last edited by jhwilliams; 10-21-2009 at 06:04 PM.
 
Old 10-21-2009, 06:09 PM   #3
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
oops , It showed the ipaddress instead of nfsserver which i replaced, so hostname is spnas1 only .


[root@spnas1 ~]# nmap spnas1

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-10-21 16:07 PDT
Interesting ports on spnas1.etouch.net (192.168.0.34):
Not shown: 1673 closed ports
PORT STATE SERVICE
22/tcp open ssh
111/tcp open rpcbind
621/tcp open unknown
691/tcp open resvc
752/tcp open qrh
901/tcp open samba-swat
2049/tcp open nfs

Nmap finished: 1 IP address (1 host up) scanned in 0.109 seconds
 
Old 10-21-2009, 06:24 PM   #4
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Perhaps try to mount the filesystem locally on the server:

mount -tnfs localhost:/share/ /somedir

And then see if anything telling appears in the logs:

sudo rgrep -i nfs /var/log
 
Old 10-21-2009, 06:35 PM   #5
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
I tried the above , it works and mounted in locally
mount -tnfs localhost:/data1 /mnt

the message in /var/log is

Oct 21 16:31:50 spnas1 mountd[25875]: authenticated mount request from 127.0.0.1:750 for /data1 (/data1)


but giving the hostname in nfs mount shows some permission isse

[root@spnas1 log]# mount -tnfs spnas1:/data1 /mnt
mount: spnas1:/data1 failed, reason given by server: Permission denied
 
Old 10-21-2009, 06:48 PM   #6
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Quote:
Originally Posted by linuxguy08 View Post
I tried the above , it works and mounted in locally
mount -tnfs localhost:/data1 /mnt

the message in /var/log is

Oct 21 16:31:50 spnas1 mountd[25875]: authenticated mount request from 127.0.0.1:750 for /data1 (/data1)


but giving the hostname in nfs mount shows some permission isse

[root@spnas1 log]# mount -tnfs spnas1:/data1 /mnt
mount: spnas1:/data1 failed, reason given by server: Permission denied
have you added all of the NFS clients you want to share data with to your /etc/exports file? (ref: exports(5) ?)

For example, mine reads:
Code:
/fs 192.168.1.0/24(rw,subtree_check)
/root/.snapshots 127.0.0.1(ro,no_root_squash,subtree_check)
I share a user filesystem (/fs) with my LAN on the 192.168.1.0 subnet, and a locally mounted snapshots backup directly only with the localhost. (This is hack to get a readonly copy of a rw physical filesystem.)

Last edited by jhwilliams; 10-21-2009 at 06:52 PM.
 
Old 10-21-2009, 06:52 PM   #7
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
yes i have added


# which indicates my earlier entry for the two clients but it doesnot work now


#/data1 192.168.0.32(rw,async) 192.168.0.33(rw,async)
/data1 localhost(rw,sync,no_root_squash)
 
Old 10-21-2009, 07:02 PM   #8
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
In the first case (with the other machines, not with localhost) is there no nfs or server-side errors in the logs?

Worth highlighting that the mountd error you posted was technically a client-side error that just happened to appear on the same box; The nfsd or rpc errors will be the juicy ones.

Do you have any funny business going on in /etc/hosts? Does anything change if you no_root_squash the commented out line, above? Who are the owner and permissions of the server's NFS share? Does that owner have the same user name, user id, group name, group id as the one on the client? (i.e. are these root, and 0 respectively?)

I'm afraid I'm running short on ideas otherwise, linuxguy.
 
Old 10-21-2009, 07:20 PM   #9
linuxguy08
Member
 
Registered: Apr 2008
Posts: 155

Original Poster
Blog Entries: 2

Rep: Reputation: 15
It works now after adding the parameter sync,no_root_squash for client in nfs exports
But not sure why so?

Anyway thanks for the help!!
 
Old 10-21-2009, 07:31 PM   #10
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Root squashing is one such facet of NFS for which I have not gained a full technical appreciation, to date. :-) Seems to mess stuff up if the on/off bit is in the wrong position though. Does anyone have less of a bit explanation for linuxguy's example? Even a two-bit explanation (hoho?)
 
  


Reply



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
Problem With NFS Server rajesh.bahl Linux - Server 9 04-08-2009 08:02 AM
NFS problem whit AIX nfs server . uglumen Solaris / OpenSolaris 1 10-17-2008 06:10 AM
problem with NFS server yadava Linux - Newbie 1 10-02-2008 02:11 PM
problem with nfs server yadava Linux - Newbie 5 08-14-2008 03:05 PM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:57 AM.

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
Open Source Consulting | Domain Registration